Skip to content

Generic signature of lambda missing method parameters #3476

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

Closed
smarter opened this issue Nov 14, 2017 · 2 comments
Closed

Generic signature of lambda missing method parameters #3476

smarter opened this issue Nov 14, 2017 · 2 comments

Comments

@smarter
Copy link
Member

smarter commented Nov 14, 2017

I haven't managed to minimize it, but if you compile scalacheck with sbt jvm/compile and then do javap -p -v jvm/target/scala-0.5/classes/org/scalacheck/ArbitraryArities.class there's something fishy:

private static org.scalacheck.Gen<scala.Function1<T1, Z>> arbFunction1$$anonfun$1();
  descriptor: (Lorg/scalacheck/Arbitrary;Lorg/scalacheck/Cogen;)Lorg/scalacheck/Gen;
  // body skipped ...
  Signature: #1286                        // ()Lorg/scalacheck/Gen<Lscala/Function1<TT1;TZ;>;>;

The generic signature is missing the method parameters that can be seen in the descriptor. I noticed this because it crashes the cfr decompiler.

@smarter
Copy link
Member Author

smarter commented Nov 14, 2017

This bug is not detected by -Xverify-signature.

@Duhemm
Copy link
Contributor

Duhemm commented Nov 14, 2017

Thanks for the report @smarter, I'm on it. In the meantime and in case that's blocking you, you can use -Yno-generic-signatures to disable generic signatures altogether.

Duhemm added a commit to Duhemm/dotty that referenced this issue Nov 18, 2017
Disable java generic signature generation for symbols that are marked
with the `Artifact` or `Synthetic` flags.
smarter added a commit that referenced this issue Apr 10, 2018
Fix #3476: Add `Artifact` flag to closures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants