-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Missing parameter list in JavaGeneric signature #3411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Test case to add object Foo {
def foo[U](a: Int, b: Double)(c: Boolean, d: String)(e: Object): Int = a
}
object Test {
def main(args: Array[String]): Unit = {
val f1 = Foo.getClass.getMethods.find(_.getName.endsWith("foo")).get
val tParams = f1.getTypeParameters
println(f1.toGenericString)
tParams.foreach { tp =>
println(tp.getName + " <: " + tp.getBounds.map(_.getTypeName).mkString(", "))
}
}
} |
// GenericSignatures.scala
case mtpe: MethodType =>
// phantom method parameters do not make it to the bytecode.
val params = mtpe.paramInfos.filterNot(_.isPhantom)
val restpe = mtpe.resultType
builder.append('(')
// TODO: Update once we support varargs
params.foreach { tp =>
jsig(tp)
}
builder.append(')')
methodResultSig(restpe) does not handle the case where |
Duhemm
added a commit
to Duhemm/dotty
that referenced
this issue
Oct 31, 2017
We ignored the case where a `MethodType` had another `MethodType` as result type. This commit fixes the issue by collecting the parameters of the result type if it is a `MethodType`, recursively. Fixes scala#3411
Duhemm
added a commit
to Duhemm/dotty
that referenced
this issue
Oct 31, 2017
We ignored the case where a `MethodType` had another `MethodType` as result type. This commit fixes the issue by collecting the parameters of the result type if it is a `MethodType`, recursively. Fixes scala#3411
Duhemm
added a commit
to Duhemm/dotty
that referenced
this issue
Oct 31, 2017
We ignored the case where a `MethodType` had another `MethodType` as result type. This commit fixes the issue by collecting the parameters of the result type if it is a `MethodType`, recursively. Fixes scala#3411
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
will generate the signature
public <U> int Foo$.foo(int,double)
which misses all parameters not in the first parameter list.The text was updated successfully, but these errors were encountered: