File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -769,7 +769,8 @@ object TypeOps:
769
769
this (tref)
770
770
else {
771
771
prefixTVar = WildcardType // prevent recursive call from assigning it
772
- prefixTVar = newTypeVar(TypeBounds .upper(this (tref)))
772
+ val tref2 = this (tref.applyIfParameterized(tref.typeParams.map(_ => TypeBounds .empty)))
773
+ prefixTVar = newTypeVar(TypeBounds .upper(tref2))
773
774
prefixTVar
774
775
}
775
776
case tp => mapOver(tp)
Original file line number Diff line number Diff line change
1
+ 13: Pattern Match Exhaustivity: A(_), C(_)
2
+ 21: Pattern Match
Original file line number Diff line number Diff line change
1
+ class X [T ] {
2
+ sealed trait P
3
+
4
+ case class A (id : Long ) extends P
5
+ case class B (id : Long , x : Long ) extends P
6
+ case class C (id : Long ) extends P
7
+
8
+ def m (p : P ): Unit = p match {
9
+ case B (_, x) =>
10
+ case _ =>
11
+ }
12
+
13
+ def n (p : P ): Unit = p match {
14
+ case B (_, x) =>
15
+ }
16
+
17
+ def o (p : P ): Unit = p match {
18
+ case A (_) =>
19
+ case B (_, x) =>
20
+ case C (_) =>
21
+ case _ =>
22
+ }
23
+
24
+ }
You can’t perform that action at this time.
0 commit comments