Goofy `instanceof` refinement under a bounded polymorphic function
Offen
bug
Typing: refinements
- Vorherrschende Sprache
- Rust
- Sterne
- 22.3k
- Forks
- 1.9k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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).
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.