-
Notifications
You must be signed in to change notification settings - Fork 21
java.lang.invoke.LambdaConversionException: Incorrect number of parameters for bridge signature #11373
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
Milestone
Comments
Interesting! Playing around with the repro, trying to minimise a bit more still: public interface Fun0 {
String ap();
default Fun0 test(Fun0 b) { return null; }
}
public interface Fun0Impl extends Fun0 {
default Fun0Impl test(Fun0 b) { return null; }
} object Test extends App {
(() => null): Fun0Impl
} |
Looks like the linked PR regressed here. The log says
the sam bridges are only intended for bridges for the actual sam method, whereas here |
I proposed a fix scheduled for 2.12.9 |
Thx, that was fast! |
Fixed in scala/scala#7668 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seems to be a general scala/scalac problem that does occur with Scala 2.12.7+ but not with Scala 2.12.4 for example. I also tested it with Scala 2.13.0-M5.
@2m originally reported it as possible Vavr bug: vavr-io/vavr#2337
I found a minimal example that only depends on standard Java 8 (or above).
Running it
Tested with Oracle JDK 1.8.0_181
Output
Notes
The example does run properly if we do one of the following modifications:
test()
:B test(B b)
:Thanks for looking into it!
The text was updated successfully, but these errors were encountered: