Skip to content

Commit 6a349b5

Browse files
committed
Turn on special handling for erased functions in TypeComparer
1 parent ffee8bd commit 6a349b5

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
@@ -665,7 +665,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
665665
case _ =>
666666
isSubType(info1, info2)
667667

668-
if defn.isFunctionType(tp2) then
668+
if defn.isFunctionType(tp2) || defn.isErasedFunctionType(tp2) then
669669
tp1w.widenDealias match
670670
case tp1: RefinedType =>
671671
return isSubInfo(tp1.refinedInfo, tp2.refinedInfo)

0 commit comments

Comments
 (0)