test/tools/javac/lambda/StaticMethodNegTest.java

changeset 1604
8e82e4f225e4
parent 0
959103a6100f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/lambda/StaticMethodNegTest.java	Fri Feb 22 13:31:35 2013 +0000
     1.3 @@ -0,0 +1,26 @@
     1.4 +/**
     1.5 + * @test    /nodynamiccopyright/
     1.6 + * @bug     8008337
     1.7 + * @author  sogoel
     1.8 + * @summary static method is called via super
     1.9 + * @compile/fail/ref=StaticMethodNegTest.out -XDrawDiagnostics StaticMethodNegTest.java
    1.10 + */
    1.11 +
    1.12 +interface A {
    1.13 +  static String m() {
    1.14 +    return "A";
    1.15 +  }
    1.16 +}
    1.17 +
    1.18 +interface B {
    1.19 +  static String m() {
    1.20 +    return "B";
    1.21 +  }
    1.22 +}
    1.23 +
    1.24 +interface AB extends A, B {
    1.25 + static String m() {
    1.26 +   return A.super.m();
    1.27 + }
    1.28 +}
    1.29 +

mercurial