Goofy `instanceof` refinement under a bounded polymorphic function
Open
bug
Typing: refinements
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
I've got a polymorphic function taking two unrelated classes, and I'm trying to refine an union based on its inputs, e.g.
```js
class X {}
class Y {}
I was expecting `(value: B)` to pass, but it doesn't. Further, the consequent branch passes `A&B` (and any other permutations of `A` and `B` under union and intersection).
Contributor guide
Assessment
This issue has not been assessed yet.