Commit 4841ecb
committed
Fix #9067: avoid instantiate child parameters to Wildcard if possible
In tests/patmat/i9067.scala, for Foo[X1, X2] <: Base[Any, Any],
X1 and X2 can both be `Any` instead of `Wildcard`.
Inferring `Wildcard` will lead to the signature of `Foo.unapply`
be inferred as `Nothing => Nothing`, which causes the checker
to issue a false unexhaustive warning.1 parent 4fa9e5a commit 4841ecb
File tree
2 files changed
+18
-7
lines changed- compiler/src/dotty/tools/dotc/core
- tests/patmat
2 files changed
+18
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
622 | | - | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
623 | 624 | | |
624 | 625 | | |
625 | 626 | | |
| |||
685 | 686 | | |
686 | 687 | | |
687 | 688 | | |
| 689 | + | |
| 690 | + | |
688 | 691 | | |
689 | 692 | | |
690 | 693 | | |
691 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
692 | 698 | | |
693 | 699 | | |
694 | 700 | | |
| |||
715 | 721 | | |
716 | 722 | | |
717 | 723 | | |
718 | | - | |
719 | | - | |
720 | | - | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
721 | 728 | | |
722 | 729 | | |
723 | 730 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments