Commit 7825d77
committed
In compareMatch, check scrutinees are subtypes
From the Match Type paper, typing rule S-Match5 requires that the LHS
scrutinee "Ss" is a subtype of the RHS scrutinee "Ts": Ss <: Ts. It's
not required that they are the same type. This covers widening a skolem
or inline proxy tp1 scrutinee, without erroneously widening the RHS tp2
scrutinee.1 parent fcc753b commit 7825d77
File tree
3 files changed
+26
-4
lines changed- compiler/src/dotty/tools/dotc/core
- tests
- neg
- pos
3 files changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1007 | 1007 | | |
1008 | 1008 | | |
1009 | 1009 | | |
1010 | | - | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
| 1010 | + | |
1014 | 1011 | | |
1015 | 1012 | | |
1016 | 1013 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments