diff -r 352d130c47c5 -r d7d932236fee test/tools/javac/defaultMethods/Neg10.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/defaultMethods/Neg10.java Sun Nov 04 10:59:42 2012 +0000 @@ -0,0 +1,20 @@ +/* + * @test /nodynamiccopyright/ + * @summary check that default overrides are properly type-checked + * @compile/fail/ref=Neg10.out -Werror -Xlint:unchecked -XDallowDefaultMethods -XDrawDiagnostics Neg10.java + */ +class Neg10 { + interface I { + default void m() throws X { } + } + + static class C1 { + public void m() throws Exception { } //unchecked (throws) override + } + + static class C2 extends C1 implements I { } + + static class C3 implements I { + public void m() throws Exception { } //unchecked (throws) override + } +}