langtools/test/tools/javac/defaultMethods/static/StaticInvoke.java
changeset 40728 1ed235a29653
parent 40727 e9f4bcc8dfd3
parent 40568 fb5226b8ac7f
child 40729 aae3aa5fd024
equal deleted inserted replaced
40727:e9f4bcc8dfd3 40728:1ed235a29653
     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;
       
     9 
       
    10 class StaticInvoke {
       
    11     void test() {
       
    12         Stream.empty();
       
    13         java.util.stream.Stream.empty();
       
    14     }
       
    15 }