{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/587","labels_url":"https://api.github.com/repos/facebook/flow/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/587/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/587/events","html_url":"https://github.com/facebook/flow/issues/587","id":92126553,"number":587,"title":"Flow 0.13.1 issue with short-circuit operator","user":{"login":"danvk","id":98301,"avatar_url":"https://avatars.githubusercontent.com/u/98301?v=3","gravatar_id":"","url":"https://api.github.com/users/danvk","html_url":"https://github.com/danvk","followers_url":"https://api.github.com/users/danvk/followers","following_url":"https://api.github.com/users/danvk/following{/other_user}","gists_url":"https://api.github.com/users/danvk/gists{/gist_id}","starred_url":"https://api.github.com/users/danvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danvk/subscriptions","organizations_url":"https://api.github.com/users/danvk/orgs","repos_url":"https://api.github.com/users/danvk/repos","events_url":"https://api.github.com/users/danvk/events{/privacy}","received_events_url":"https://api.github.com/users/danvk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-30T15:36:27Z","updated_at":"2015-06-30T15:46:12Z","closed_at":null,"body":"This snippet type checks in Flow 0.12.0, but not in Flow 0.13.1:\r\n\r\n```javascript\r\n/** @flow */\r\n\r\nclass PairOfNumbers {\r\n  a: number;\r\n  b: number;\r\n\r\n  compareTo(other: PairOfNumbers): number {\r\n    return this.a - other.a || this.b - other.b;\r\n  }\r\n}\r\n```\r\n\r\nThe error is that it's returning a boolean and not a number:\r\n\r\n```\r\n$ cat toy.js | flow check-contents\r\nOld server has exited\r\nFlow server launched for /Users/danvk/github/pileup.js\r\nSpawned flow server (child pid=23569)\r\nLogs will go to /private/var/folders/sc/1vw6pyfs1q100brbf7vmqxdh0000gn/T/flow/zSUserszSdanvkzSgithubzSpileup.js.log\r\nThe flow server will be ready in a moment.\r\nflow server still initializing. If it was just started this can take some time. Retrying... |\r\n-:10:12,27: boolean\r\nThis type is incompatible with\r\n-:9:36,41: number\r\n\r\nFound 1 error\r\n```\r\n\r\nThis is a spurious type error. The type of `number || number` in JavaScript is number, not boolean."},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/117234248","html_url":"https://github.com/facebook/flow/issues/587#issuecomment-117234248","issue_url":"https://api.github.com/repos/facebook/flow/issues/587","id":117234248,"user":{"login":"avikchaudhuri","id":5328177,"avatar_url":"https://avatars.githubusercontent.com/u/5328177?v=3","gravatar_id":"","url":"https://api.github.com/users/avikchaudhuri","html_url":"https://github.com/avikchaudhuri","followers_url":"https://api.github.com/users/avikchaudhuri/followers","following_url":"https://api.github.com/users/avikchaudhuri/following{/other_user}","gists_url":"https://api.github.com/users/avikchaudhuri/gists{/gist_id}","starred_url":"https://api.github.com/users/avikchaudhuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avikchaudhuri/subscriptions","organizations_url":"https://api.github.com/users/avikchaudhuri/orgs","repos_url":"https://api.github.com/users/avikchaudhuri/repos","events_url":"https://api.github.com/users/avikchaudhuri/events{/privacy}","received_events_url":"https://api.github.com/users/avikchaudhuri/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T15:46:12Z","updated_at":"2015-06-30T15:46:12Z","body":"Thanks for the report, @danvk. @mroch: do you think there is any way https://github.com/facebook/flow/commit/32bb69984037caae3b4589fc2722651d3b89a6f8 caused the regression?"}}