Skip to content

Commit 3cba055

Browse files
authored
Merge pull request #4287 from dotty-staging/fix/3653
Fix #3653: generic Java signature of FunctionXXL
2 parents 07fa870 + 82add93 commit 3cba055

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ object GenericSignatures {
212212
else
213213
jsig(unboxedSeen, toplevel, primitiveOK)
214214
}
215+
else if (defn.isXXLFunctionClass(sym))
216+
jsig(defn.FunctionXXLType, toplevel, primitiveOK)
215217
else if (sym.isClass)
216218
classSig
217219
else
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public <T> scala.FunctionXXL Foo.bar()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Foo {
2+
def bar[T] =
3+
(a0: T, a1: T, a2: T, a3: T, a4: T, a5: T, a6: T, a7: T, a8: T, a9: T,
4+
b0: T, b1: T, b2: T, b3: T, b4: T, b5: T, b6: T, b7: T, b8: T, b9: T,
5+
c0: T, c1: T, c2: T, c3: T, c4: T, c5: T, c6: T, c7: T, c8: T, c9: T) => 0
6+
}
7+
8+
object Test {
9+
def main(args: Array[String]): Unit = {
10+
val meth = classOf[Foo].getDeclaredMethod("bar")
11+
println(meth.toGenericString)
12+
}
13+
}

0 commit comments

Comments
 (0)