Wed, 27 Apr 2016 01:34:52 +0800
Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/
changeset: 2573:53ca196be1ae
tag: jdk8u25-b17
aoqi@0 | 1 | /* @test /nodynamiccopyright/ |
aoqi@0 | 2 | * @bug 7192246 |
aoqi@0 | 3 | * @summary check that abstract methods are discarded in overload resolution diags |
aoqi@0 | 4 | * @compile/fail/ref=Neg12.out -XDrawDiagnostics Neg12.java |
aoqi@0 | 5 | */ |
aoqi@0 | 6 | class Neg12 { |
aoqi@0 | 7 | |
aoqi@0 | 8 | interface I1 { |
aoqi@0 | 9 | default void m(String s) {}; |
aoqi@0 | 10 | } |
aoqi@0 | 11 | |
aoqi@0 | 12 | interface I2 { |
aoqi@0 | 13 | void m(String s); |
aoqi@0 | 14 | } |
aoqi@0 | 15 | |
aoqi@0 | 16 | static class B { |
aoqi@0 | 17 | void m(Integer i) { } |
aoqi@0 | 18 | } |
aoqi@0 | 19 | |
aoqi@0 | 20 | static class C extends B implements I1 { } |
aoqi@0 | 21 | static class D extends B implements I2 { } |
aoqi@0 | 22 | |
aoqi@0 | 23 | void test(C c, D d) { |
aoqi@0 | 24 | c.m(); |
aoqi@0 | 25 | d.m(); |
aoqi@0 | 26 | } |
aoqi@0 | 27 | } |