Commit 68f7a25
committed
Deskolemise patterns to suppress exhaustivity warnings
Ideally I'd want to not be destructive with this widen, but it seems to
already being done on the other side: in `signature` where the
components of the unapply result type are obtained the call to:
mt.instantiate(scrutineeTp :: Nil).finalResultType
removes the more precise `blub.type` that was present in the signature.
So now, by widening the pattern the spaces cancel each other out,
thus the match is deemed exhaustive.1 parent ec15557 commit 68f7a25
File tree
2 files changed
+13
-4
lines changed- compiler/src/dotty/tools/dotc/transform/patmat
- tests/patmat
2 files changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | 357 | | |
361 | | - | |
| 358 | + | |
362 | 359 | | |
363 | 360 | | |
364 | 361 | | |
| |||
| 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