Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8022815 | 8 | Maurizio Cimadamore | P2 | Closed | Fixed | b105 |
The compilation of the following code sample fails on b94:
-----------------------------------------------------------------
public static void main(String argv[]) {
method(() -> true ? ((int) 2) : ((int) 3));
}
interface I_int { int method(); }
static void method(I_int i_int) {
}
interface I_char { char method(); }
static void method(I_char i_char) {
}
interface I_byte { byte method(); }
static void method(I_byte i_byte) {
}
java: reference to method is ambiguous
both method method(lmbd086.I_char) in lmbd086 and method method(lmbd086.I_byte) in lmbd086 match
-----------------------------------------------------------------
But it compiles with b98, b100
The following JCK tests fail due to this issue:
lang/LMBD/lmbd086/lmbd08602m0/lmbd08602m0.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m03/lmbd08602m03.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m01/lmbd08602m01.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m02/lmbd08602m02.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m13/lmbd08602m13.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m11/lmbd08602m11.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m12/lmbd08602m12.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m1/lmbd08602m1.html: Failed. compilation did not fail as expected
-----------------------------------------------------------------
public static void main(String argv[]) {
method(() -> true ? ((int) 2) : ((int) 3));
}
interface I_int { int method(); }
static void method(I_int i_int) {
}
interface I_char { char method(); }
static void method(I_char i_char) {
}
interface I_byte { byte method(); }
static void method(I_byte i_byte) {
}
java: reference to method is ambiguous
both method method(lmbd086.I_char) in lmbd086 and method method(lmbd086.I_byte) in lmbd086 match
-----------------------------------------------------------------
But it compiles with b98, b100
The following JCK tests fail due to this issue:
lang/LMBD/lmbd086/lmbd08602m0/lmbd08602m0.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m03/lmbd08602m03.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m01/lmbd08602m01.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m02/lmbd08602m02.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m13/lmbd08602m13.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m11/lmbd08602m11.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m12/lmbd08602m12.html: Failed. compilation did not fail as expected
lang/LMBD/lmbd086/lmbd08602m1/lmbd08602m1.html: Failed. compilation did not fail as expected
- backported by
-
JDK-8022815 Javac doesn't report "java: reference to method is ambiguous" any more
-
- Closed
-