1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/defaultMethods/Neg12.java Sun Nov 04 10:59:42 2012 +0000 1.3 @@ -0,0 +1,27 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @summary check that abstract methods are discarded in overload resolution diags 1.7 + * @compile/fail/ref=Neg12.out -XDallowDefaultMethods -XDrawDiagnostics Neg12.java 1.8 + */ 1.9 +class Neg12 { 1.10 + 1.11 + interface I1 { 1.12 + default void m(String s) {}; 1.13 + } 1.14 + 1.15 + interface I2 { 1.16 + void m(String s); 1.17 + } 1.18 + 1.19 + static class B { 1.20 + void m(Integer i) { } 1.21 + } 1.22 + 1.23 + static class C extends B implements I1 { } 1.24 + static class D extends B implements I2 { } 1.25 + 1.26 + void test(C c, D d) { 1.27 + c.m(); 1.28 + d.m(); 1.29 + } 1.30 +}