facebook / facebook/flow

Right-hand side of `instanceof` does not have to be callable

Open
#7,553 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Flow version: 0.94.0

## Expected behavior

```js
// This should emit an error, e.g. "Right-hand side of 'instanceof' is not callable":
({}) instanceof ({});
```

## Actual behavior

No errors are emitted by Flow, but you'll get a runtime error when running that code.

([Try Flow](https://flow.org/try/#0BQbwvglABAlgdgZwC4EM4GMCmB7AZlUSAbiA))

Related: #7552

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.