Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ object GenericSignatures {

case mtpe: MethodType =>
// phantom method parameters do not make it to the bytecode.
val params = mtpe.paramInfos.filterNot(_.isPhantom)
val restpe = mtpe.resultType
val params = mtpe.paramInfoss.flatten.filterNot(_.isPhantom)
val restpe = mtpe.finalResultType
builder.append('(')
// TODO: Update once we support varargs
params.foreach { tp =>
Expand Down
1 change: 1 addition & 0 deletions tests/generic-java-signatures/i3411.check
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public <U> float Foo$.foo(int,java.lang.String,long,boolean,U,java.lang.String,java.lang.Object)
10 changes: 10 additions & 0 deletions tests/generic-java-signatures/i3411.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
object Foo {
def foo[U](i: Int, s: String, x: Long)(c: Boolean, a: U, d: String)(e: Object): Float = 0.0f
}

object Test {
def main(args: Array[String]): Unit = {
val f1 = Foo.getClass.getMethods.find(_.getName.endsWith("foo")).get
println(f1.toGenericString)
}
}