Skip to content

Commit 27c9fc5

Browse files
committed
Fix decomposeProto
Strip off capturing types before decomposing a function prototype
1 parent 25b23c1 commit 27c9fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ class Typer extends Namer
11271127
case _ => mapOver(t)
11281128
}
11291129

1130-
val pt1 = pt.stripTypeVar.dealias
1130+
val pt1 = pt.stripped.dealias
11311131
if (pt1 ne pt1.dropDependentRefinement)
11321132
&& defn.isContextFunctionType(pt1.nonPrivateMember(nme.apply).info.finalResultType)
11331133
then

0 commit comments

Comments
 (0)