Details
-
Bug
-
Resolution: Fixed
-
P2
-
8, 8-repo-lambda
-
b82
-
Verified
Description
Something is wrong in the bridging logic for method reference:
class Test {
interface SAM<X> {
void m(X ss, String s);
}
void m(String... s) { }
public static void main(String[] args) {
SAM<Test> st = Test::m;
st.m(new Test(), "");
}
}
This compiles but fails to execute:
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.Object.m([Ljava/lang/String;)V
at Test.lambda$0$bridge(Test.java:78)
at Test$$Lambda$1.m(Unknown Source)
at Test.main(Test.java:79)
class Test {
interface SAM<X> {
void m(X ss, String s);
}
void m(String... s) { }
public static void main(String[] args) {
SAM<Test> st = Test::m;
st.m(new Test(), "");
}
}
This compiles but fails to execute:
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.Object.m([Ljava/lang/String;)V
at Test.lambda$0$bridge(Test.java:78)
at Test$$Lambda$1.m(Unknown Source)
at Test.main(Test.java:79)