Skip to content

Commit bc2e9ce

Browse files
committed
freeze gadt in both cases of isSubInfo
1 parent 7844f5d commit bc2e9ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
18651865
matchingMethodParams(info1, info2, precise = false)
18661866
&& isSubInfo(info1.resultType, info2.resultType.subst(info2, info1), symInfo1.resultType)
18671867
&& sigsOK(symInfo1, info2)
1868-
case _ => isSubType(info1, info2)
1868+
case _ => inFrozenGadtIf(tp1IsSingleton) { isSubType(info1, info2) }
18691869
case _ => inFrozenGadtIf(tp1IsSingleton) { isSubType(info1, info2) }
18701870

18711871
val info1 = m.info.widenExpr

0 commit comments

Comments
 (0)