You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function create(a: any): { type: 'B', data: number } | { type: 'A', data: string }
{
return {
type: 'A',
data: a
}
}
but fails on OSX El Capitan with flow 0.21
test$ flow version
Flow, a static type checker for JavaScript, version 0.21.0
test$ flow
test.js:4
4: return {
^ object literal. This type is incompatible with
2: function create(a: any): { type: 'B', data: number } | { type: 'A', data: string }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ union: object type(s)
Found 1 error
The text was updated successfully, but these errors were encountered:
the following program passes on flow 0.19 and in http://tryflow.org/#57c61a492a07f6e77eeb451064a5e2e4
but fails on OSX El Capitan with flow 0.21
The text was updated successfully, but these errors were encountered: