Skip to content

Commit 7dc3135

Browse files
committed
Fix condition for lambda abstracting in Namer
The previous condition could make a (derived) type a * type for a little while even though it had type parameters. This loophole caused collection/generic/MapFactory.scala and with it compile-stdlib to fail.
1 parent 6ed6857 commit 7dc3135

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/typer/Namer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ class Namer { typer: Typer =>
935935
//val toParameterize = tparamSyms.nonEmpty && !isDerived
936936
//val needsLambda = sym.allOverriddenSymbols.exists(_ is HigherKinded) && !isDerived
937937
def abstracted(tp: Type): Type =
938-
if (tparamSyms.nonEmpty && !isDerived) tp.LambdaAbstract(tparamSyms)
938+
if (tparamSyms.nonEmpty && !tp.isHK) tp.LambdaAbstract(tparamSyms)
939939
//else if (toParameterize) tp.parameterizeWith(tparamSyms)
940940
else tp
941941

0 commit comments

Comments
 (0)