`instanceof Function` incorrectly refines to a callable
Open
Typing: refinements
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
The code
```
const f = Object.create(Function);
if (f instanceof Function) {
f();
}
```
should result in a Flow error since `f` is not actually callable (executing the code results in a `TypeError: f is not a function`).
In other words: After the type refinement `typeof f === 'function'` it's OK to assume `f` is callable, but after `f instanceof Function` it's not OK.
See also [this Stack Overflow question & answer](https://stackoverflow.com/a/38470194/643091).
Contributor guide
Assessment
This issue has not been assessed yet.