-
Notifications
You must be signed in to change notification settings - Fork 21
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
2.12 emits static forwarder for bridge method in mirror class #10812
Comments
Turns out this is an older bug, also in 2.11. Making
Gives two static forwarders in The difference in 2.12 is: if We use this for member lookup (simplified of real):
|
Seems I can just do the member lookup in an earlier phase where we don't have bridges yet. |
Yay, thank you! |
Fixes scala/bug#11061 Ref scala/bug#10812 On 2.13.x branch scala#6531 removed the forwarder for bridge methods. I would like to do same in 2.12.x since Java 11-ea started to find them ambiguous as seen in akka/akka#25449 / scala/bug#11061. To keep binary compatibility, I am still emitting the forwarder for bridge methods, but with `ACC_BRIDGE` flag.
Fixes scala/bug#11061 Ref scala/bug#10812 On 2.13.x branch scala#6531 removed the mirror class forwarders for bridge methods. I would like to do same in 2.12.x since Java 11-ea started to find them ambiguous as seen in akka/akka#25449 / scala/bug#11061. To keep binary compatibility, I am still emitting the forwarders for bridge methods, but with `ACC_BRIDGE` flag.
Fixes scala/bug#11061 Ref scala/bug#10812 On 2.13.x branch scala#6531 removed the mirror class forwarders for bridge methods. I would like to do same in 2.12.x since Java 11-ea started to find them ambiguous as seen in akka/akka#25449 / scala/bug#11061. To keep binary compatibility, I am still emitting the forwarders for bridge methods, but with `ACC_BRIDGE` flag.
With 2.12.5, asm gives
In 2.11, we don't get the static forwarder for the bridge method. Luckily, javac picks one of the two (the more specific), but IntelliJ seems to complain.
https://discuss.lightbend.com/t/http-get-is-ambiguous-from-java/571/12
The text was updated successfully, but these errors were encountered: