1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/defaultMethods/Neg11.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,20 @@ 1.4 +/* @test /nodynamiccopyright/ 1.5 + * @bug 7192246 1.6 + * @summary check that default overrides are properly type-checked 1.7 + * @compile/fail/ref=Neg11.out -XDrawDiagnostics Neg11.java 1.8 + */ 1.9 +class Neg11 { 1.10 + interface I { 1.11 + default void m() { } 1.12 + } 1.13 + 1.14 + static class C1 { 1.15 + public void m() throws Exception { } //bad throws 1.16 + } 1.17 + 1.18 + static class C2 extends C1 implements I { } 1.19 + 1.20 + static class C3 implements I { 1.21 + public void m() throws Exception { } //bad throws 1.22 + } 1.23 +}