Flow version: 0.98.1
The code below used to be working fine on versions < 0.89
Now it breaks on versions > 0.90
// @flow
type A = {
foo: 'foo',
bar: () => void
};
type B = {
foo: 'foo'
};
function func(obj: A | B) {
if (typeof obj.bar === 'function') obj.bar();
}
Expected behavior
No error.
Actual behavior
Error: Cannot call obj.bar because the parameter types of an unknown function [1] are unknown.
Try-Flow
Flow version: 0.98.1
The code below used to be working fine on versions < 0.89
Now it breaks on versions > 0.90
Expected behavior
No error.
Actual behavior
Error: Cannot call
obj.barbecause the parameter types of an unknown function [1] are unknown.Try-Flow