Skip to content

Commit 3bbac32

Browse files
committed
Fix #6946: Fix generic signature for synthetic function types
1 parent bc81953 commit 3bbac32

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,10 @@ object GenericSignatures {
222222
else
223223
jsig(unboxedSeen, toplevel, primitiveOK)
224224
}
225-
else if (defn.isXXLFunctionClass(sym))
226-
classSig(defn.FunctionXXLClass)
225+
else if (defn.isSyntheticFunctionClass(sym)) {
226+
val erased = defn.erasedFunctionClass(sym)
227+
classSig(erased, pre, if (erased.typeParams.isEmpty) Nil else args)
228+
}
227229
else if (sym.isClass)
228230
classSig(sym, pre, args)
229231
else

0 commit comments

Comments
 (0)