test/tools/javac/defaultMethods/Neg16.java

changeset 1393
d7d932236fee
child 1415
01c9d4161882
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/defaultMethods/Neg16.java	Sun Nov 04 10:59:42 2012 +0000
     1.3 @@ -0,0 +1,13 @@
     1.4 +/*
     1.5 + * @test /nodynamiccopyright/
     1.6 + * @summary check that level skipping in default super calls is correctly rejected
     1.7 + * @compile/fail/ref=Neg16.out -XDallowDefaultMethods -XDrawDiagnostics Neg16.java
     1.8 + */
     1.9 +class Neg16 {
    1.10 +    interface I { default void m() {  } }
    1.11 +    interface J extends I { default void m() {  } }
    1.12 +
    1.13 +    static class C implements I, J {
    1.14 +        void foo() { I.super.m(); }
    1.15 +    }
    1.16 +}

mercurial