File tree 2 files changed +10
-1
lines changed
compiler/src/dotty/tools/dotc/transform/patmat
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -674,7 +674,7 @@ object SpaceEngine {
674
674
val superType = child.typeRef.superType
675
675
if typeArgs.exists(_.isBottomType) && superType.isInstanceOf [ClassInfo ] then
676
676
val parentClass = superType.asInstanceOf [ClassInfo ].declaredParents.find(_.classSymbol == parent).get
677
- val paramTypeMap = Map .from(parentClass.argTypes .map(_.typeSymbol).zip(typeArgs))
677
+ val paramTypeMap = Map .from(parentClass.argInfos .map(_.typeSymbol).zip(typeArgs))
678
678
val substArgs = child.typeRef.typeParamSymbols.map(param => paramTypeMap.getOrElse(param, WildcardType ))
679
679
substArgs
680
680
else Nil
Original file line number Diff line number Diff line change
1
+ sealed trait Foo [T ]
2
+ class Bar extends Foo [? ]
3
+
4
+ def mkFoo [T ]: Foo [T ] =
5
+ ???
6
+
7
+ def test : Unit =
8
+ mkFoo match
9
+ case _ => ()
You can’t perform that action at this time.
0 commit comments