Commit 2beb67e
committed
Do match type reduction atPhaseNoLater than ElimOpaque
If a match type pattern is an opaque type, we use its bounds when checking the validity of the pattern.
Following the ElimOpaque phase however, the pattern is beta-reduced (as normal applied type aliases), which may result in an illegal pattern.1 parent 2329236 commit 2beb67e
File tree
3 files changed
+16
-1
lines changed- compiler/src/dotty/tools/dotc/core
- tests/pos
3 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| 249 | + | |
248 | 250 | | |
249 | 251 | | |
250 | 252 | | |
| |||
272 | 274 | | |
273 | 275 | | |
274 | 276 | | |
| 277 | + | |
275 | 278 | | |
276 | 279 | | |
277 | 280 | | |
| |||
511 | 514 | | |
512 | 515 | | |
513 | 516 | | |
| 517 | + | |
514 | 518 | | |
515 | 519 | | |
516 | 520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5026 | 5026 | | |
5027 | 5027 | | |
5028 | 5028 | | |
5029 | | - | |
| 5029 | + | |
5030 | 5030 | | |
5031 | 5031 | | |
5032 | 5032 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments