test/tools/javac/defaultMethods/static/StaticInvoke.java

Wed, 13 Aug 2014 14:50:00 -0700

author
katleman
date
Wed, 13 Aug 2014 14:50:00 -0700
changeset 2549
0b6cc4ea670f
parent 0
959103a6100f
permissions
-rw-r--r--

Added tag jdk8u40-b01 for changeset bf89a471779d

     1 /* @test /nodynamiccopyright/
     2  * @bug 8037385
     3  * @summary Must not allow static interface method invocation in legacy code
     4  * @compile -source 8 -Xlint:-options StaticInvoke.java
     5  * @compile/fail/ref=StaticInvoke7.out -source 7 -Xlint:-options -XDrawDiagnostics StaticInvoke.java
     6  * @compile/fail/ref=StaticInvoke6.out -source 6 -Xlint:-options -XDrawDiagnostics StaticInvoke.java
     7  */
     8 import java.util.stream.Stream;
    10 class StaticInvoke {
    11     void test() {
    12         Stream.empty();
    13         java.util.stream.Stream.empty();
    14     }
    15 }

mercurial