Commit 88e449c
committed
Fix #5574
Re-typing the pattern in GADT context is unnecessary - reducing
the pattern will on its own perform the same subtyping checks.
Previously if a pattern binding a HK type was inlined, a warning
saying that its kind is different from the kind of its parameter
was emitted _after_ preparing for reduction. This replaced the type
of the Bind node with an error, preventing the bind from being
located and narrowed when reducing the inline match.1 parent 3a259ce commit 88e449c
File tree
2 files changed
+15
-2
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/pos
2 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
855 | 855 | | |
856 | 856 | | |
857 | 857 | | |
858 | | - | |
859 | 858 | | |
860 | 859 | | |
861 | | - | |
| 860 | + | |
862 | 861 | | |
863 | 862 | | |
864 | 863 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments