Maurizio Cimadamore a494f0ab86 8003280: Add lambda tests
Turn on lambda expression, method reference and default method support

Reviewed-by: jjg
2012-11-17 19:01:03 +00:00

17 lines
512 B
Java

/*
* @test /nodynamiccopyright/
* @summary check that abstract methods are compatible with inherited defaults
* @compile/fail/ref=Neg05.out -XDrawDiagnostics Neg05.java
*/
class Neg05 {
interface IA1 { default Number m() { return Neg05.m1(this); } }
interface IA2 extends IA1 { default Integer m() { return Neg05.m2(this); } }
interface IA3 extends IA2 { Number m(); } //error
static class C implements IA3{}
static int m1(IA1 a) { return 0; }
static int m2(IA2 b) { return 0; }
}