Skip to content

Commit 3f33526

Browse files
committed
Fix handling of polytypes in isSubInfo
1 parent 3a18ff2 commit 3f33526

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

+3-2
Original file line numberDiff line numberDiff line change
@@ -1747,9 +1747,10 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
17471747
case info2: MethodType =>
17481748
info1 match
17491749
case info1: MethodType =>
1750+
val symInfo1 = symInfo.stripPoly
17501751
matchingMethodParams(info1, info2, precise = false)
1751-
&& isSubInfo(info1.resultType, info2.resultType.subst(info2, info1), symInfo.stripPoly.resultType)
1752-
&& sigsOK(symInfo, info2)
1752+
&& isSubInfo(info1.resultType, info2.resultType.subst(info2, info1), symInfo1.resultType)
1753+
&& sigsOK(symInfo1, info2)
17531754
case _ => isSubType(info1, info2)
17541755
case _ => isSubType(info1, info2)
17551756

0 commit comments

Comments
 (0)