diff --git a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala index e71460b806e3..486325b20cf2 100644 --- a/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala +++ b/compiler/src/dotty/tools/dotc/transform/GenericSignatures.scala @@ -212,6 +212,8 @@ object GenericSignatures { else jsig(unboxedSeen, toplevel, primitiveOK) } + else if (defn.isXXLFunctionClass(sym)) + jsig(defn.FunctionXXLType, toplevel, primitiveOK) else if (sym.isClass) classSig else diff --git a/tests/generic-java-signatures/i3653.check b/tests/generic-java-signatures/i3653.check new file mode 100644 index 000000000000..4824f908da06 --- /dev/null +++ b/tests/generic-java-signatures/i3653.check @@ -0,0 +1 @@ +public scala.FunctionXXL Foo.bar() diff --git a/tests/generic-java-signatures/i3653.scala b/tests/generic-java-signatures/i3653.scala new file mode 100644 index 000000000000..4251aeb2f23b --- /dev/null +++ b/tests/generic-java-signatures/i3653.scala @@ -0,0 +1,13 @@ +class Foo { + def bar[T] = + (a0: T, a1: T, a2: T, a3: T, a4: T, a5: T, a6: T, a7: T, a8: T, a9: T, + b0: T, b1: T, b2: T, b3: T, b4: T, b5: T, b6: T, b7: T, b8: T, b9: T, + c0: T, c1: T, c2: T, c3: T, c4: T, c5: T, c6: T, c7: T, c8: T, c9: T) => 0 +} + +object Test { + def main(args: Array[String]): Unit = { + val meth = classOf[Foo].getDeclaredMethod("bar") + println(meth.toGenericString) + } +}