Skip to content

Commit 8fbf771

Browse files
committed
Skip Function1-3 in specializing child classes
1 parent d9a61d9 commit 8fbf771

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SpecializeFunctions extends MiniPhase with InfoTransformer {
3333
var arity = 0
3434
while (arity < 3) {
3535
val func = defn.FunctionClass(arity)
36-
if (sym.derivesFrom(func)) {
36+
if (sym != func && sym.derivesFrom(func)) {
3737
val baseType = tp.cls.typeRef.baseType(func)
3838
val paramTypes = baseType.argInfos
3939
val argTypes = paramTypes.init

0 commit comments

Comments
 (0)