Commit d7946bf
committed
Make match types with no matching cases not an error
Modify the MatchReducer to return NoType in the case of no matches, rather than throwing a MatchTypeReductionError.
This makes it consistent with the other match type reduction failures, where being stuck does not result in an error, but simply in an unreduced match type.
We still get the explanations of the underlying error in the MatchTypeTrace, but in positions which need the reduction for conformance, rather than at application site of the match type.1 parent 5becaac commit d7946bf
File tree
3 files changed
+3
-6
lines changed- compiler/src/dotty/tools/dotc
- core
- typer
3 files changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3594 | 3594 | | |
3595 | 3595 | | |
3596 | 3596 | | |
3597 | | - | |
3598 | | - | |
| 3597 | + | |
| 3598 | + | |
3599 | 3599 | | |
3600 | 3600 | | |
3601 | 3601 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 56 | | |
60 | 57 | | |
61 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
| 666 | + | |
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| |||
0 commit comments