{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/flow/issues/1371","repository_url":"https://api.github.com/repos/facebook/flow","labels_url":"https://api.github.com/repos/facebook/flow/issues/1371/labels{/name}","comments_url":"https://api.github.com/repos/facebook/flow/issues/1371/comments","events_url":"https://api.github.com/repos/facebook/flow/issues/1371/events","html_url":"https://github.com/facebook/flow/issues/1371","id":131629405,"number":1371,"title":"disjoint unions regression between 0.19 and 0.21","user":{"login":"sakari","id":379600,"avatar_url":"https://avatars.githubusercontent.com/u/379600?v=3","gravatar_id":"","url":"https://api.github.com/users/sakari","html_url":"https://github.com/sakari","followers_url":"https://api.github.com/users/sakari/followers","following_url":"https://api.github.com/users/sakari/following{/other_user}","gists_url":"https://api.github.com/users/sakari/gists{/gist_id}","starred_url":"https://api.github.com/users/sakari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakari/subscriptions","organizations_url":"https://api.github.com/users/sakari/orgs","repos_url":"https://api.github.com/users/sakari/repos","events_url":"https://api.github.com/users/sakari/events{/privacy}","received_events_url":"https://api.github.com/users/sakari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-05T12:19:38Z","updated_at":"2016-02-05T13:09:13Z","closed_at":null,"body":"the following program passes on flow 0.19 and in http://tryflow.org/#57c61a492a07f6e77eeb451064a5e2e4\r\n\r\n```\r\nfunction create(a: any): { type: 'B', data: number } | { type: 'A', data: string }\r\n {\r\n  return {\r\n    type: 'A',\r\n    data: a\r\n  }\r\n}\r\n```\r\n\r\nbut fails on OSX El Capitan with flow 0.21\r\n\r\n```\r\ntest$ flow version\r\nFlow, a static type checker for JavaScript, version 0.21.0\r\ntest$ flow\r\ntest.js:4\r\n  4:   return {\r\n              ^ object literal. This type is incompatible with\r\n  2: function create(a: any): { type: 'B', data: number } | { type: 'A', data: string }\r\n                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ union: object type(s)\r\n\r\n\r\nFound 1 error\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/flow/issues/comments/180349977","html_url":"https://github.com/facebook/flow/issues/1371#issuecomment-180349977","issue_url":"https://api.github.com/repos/facebook/flow/issues/1371","id":180349977,"user":{"login":"sakari","id":379600,"avatar_url":"https://avatars.githubusercontent.com/u/379600?v=3","gravatar_id":"","url":"https://api.github.com/users/sakari","html_url":"https://github.com/sakari","followers_url":"https://api.github.com/users/sakari/followers","following_url":"https://api.github.com/users/sakari/following{/other_user}","gists_url":"https://api.github.com/users/sakari/gists{/gist_id}","starred_url":"https://api.github.com/users/sakari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakari/subscriptions","organizations_url":"https://api.github.com/users/sakari/orgs","repos_url":"https://api.github.com/users/sakari/repos","events_url":"https://api.github.com/users/sakari/events{/privacy}","received_events_url":"https://api.github.com/users/sakari/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T13:09:13Z","updated_at":"2016-02-05T13:09:13Z","body":"interestingly if i set `type: 'B'` in the object literal flow does not complain"}}