1 /* @test /nodynamiccopyright/ 2 * @bug 7192246 3 * @summary check that default overrides are properly type-checked 4 * @compile/fail/ref=Neg07.out -XDrawDiagnostics Neg07.java 5 */ 6 7 class Neg07 { 8 interface I { m()9 default int m() { return 1; } 10 } 11 12 static class C1 { m()13 public void m() { } //incompatible return 14 } 15 16 static class C2 extends C1 implements I { } 17 18 static class C3 implements I { m()19 public void m() { } //incompatible return 20 } 21 } 22