Goofy `instanceof` refinement under a bounded polymorphic function
Đang mở
bug
Typing: refinements
- Ngôn ngữ chính
- Rust
- Star
- 22.3k
- Fork
- 1.9k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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).
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.