Compiler fails to compile the following code:
import java.io.PrintStream;
interface A {
public <E extends Throwable> void foo() throws E ;
}
interface B extends A{
public void foo() throws Throwable ;
}
public class lmbd09501m0111{
public static void main(String argv[]) {
System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
}
public void boo() throws Throwable {}
public static int run(String argv[], PrintStream out) {
try {
B b = new lmbd09501m0111()::boo;
b.foo();
} catch(Throwable ex) {
return 2/*STATUS_FAILED*/;
}
return 0/*STATUS_PASSED*/;
}
}
Compiler output:
error: incompatible thrown types Throwable in method reference
B b = new lmbd09501m0111()::boo;
The following JCK tests fail:
lang/LMBD/lmbd095/lmbd09501m2111/lmbd09501m2111.html
lang/LMBD/lmbd095/lmbd09501m0111/lmbd09501m0111.html
lang/LMBD/lmbd095/lmbd09501m1111/lmbd09501m1111.html
lang/LMBD/lmbd095/lmbd09501m4111/lmbd09501m4111.html
lang/LMBD/lmbd095/lmbd09501m2111/lmbd09501m2111_rt.html
lang/LMBD/lmbd095/lmbd09501m0111/lmbd09501m0111_rt.html
lang/LMBD/lmbd095/lmbd09501m1111/lmbd09501m1111_rt.html
lang/LMBD/lmbd095/lmbd09501m4111/lmbd09501m4111_rt.html
import java.io.PrintStream;
interface A {
public <E extends Throwable> void foo() throws E ;
}
interface B extends A{
public void foo() throws Throwable ;
}
public class lmbd09501m0111{
public static void main(String argv[]) {
System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
}
public void boo() throws Throwable {}
public static int run(String argv[], PrintStream out) {
try {
B b = new lmbd09501m0111()::boo;
b.foo();
} catch(Throwable ex) {
return 2/*STATUS_FAILED*/;
}
return 0/*STATUS_PASSED*/;
}
}
Compiler output:
error: incompatible thrown types Throwable in method reference
B b = new lmbd09501m0111()::boo;
The following JCK tests fail:
lang/LMBD/lmbd095/lmbd09501m2111/lmbd09501m2111.html
lang/LMBD/lmbd095/lmbd09501m0111/lmbd09501m0111.html
lang/LMBD/lmbd095/lmbd09501m1111/lmbd09501m1111.html
lang/LMBD/lmbd095/lmbd09501m4111/lmbd09501m4111.html
lang/LMBD/lmbd095/lmbd09501m2111/lmbd09501m2111_rt.html
lang/LMBD/lmbd095/lmbd09501m0111/lmbd09501m0111_rt.html
lang/LMBD/lmbd095/lmbd09501m1111/lmbd09501m1111_rt.html
lang/LMBD/lmbd095/lmbd09501m4111/lmbd09501m4111_rt.html