langtools/test/tools/javac/defaultMethods/static/StaticInvokeQualified.java
author jlahoda
Tue, 16 Aug 2016 16:43:00 +0200
changeset 40504 0a01f6710c84
parent 25277 langtools/test/tools/javac/defaultMethods/static/StaticInvoke.java@993f29159350
permissions -rw-r--r--
8078561: Error message should be generated once when -source 6 is specified Summary: Code to avoid duplicated errors about features not supported in the current source level moved to Log Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25277
993f29159350 8047407: Add test for JDK-8037385
dlsmith
parents:
diff changeset
     1
/* @test /nodynamiccopyright/
993f29159350 8047407: Add test for JDK-8037385
dlsmith
parents:
diff changeset
     2
 * @bug 8037385
993f29159350 8047407: Add test for JDK-8037385
dlsmith
parents:
diff changeset
     3
 * @summary Must not allow static interface method invocation in legacy code
40504
0a01f6710c84 8078561: Error message should be generated once when -source 6 is specified
jlahoda
parents: 25277
diff changeset
     4
 * @compile -source 8 -Xlint:-options StaticInvokeQualified.java
0a01f6710c84 8078561: Error message should be generated once when -source 6 is specified
jlahoda
parents: 25277
diff changeset
     5
 * @compile/fail/ref=StaticInvokeQualified7.out -source 7 -Xlint:-options -XDrawDiagnostics StaticInvokeQualified.java
0a01f6710c84 8078561: Error message should be generated once when -source 6 is specified
jlahoda
parents: 25277
diff changeset
     6
 * @compile/fail/ref=StaticInvokeQualified6.out -source 6 -Xlint:-options -XDrawDiagnostics StaticInvokeQualified.java
25277
993f29159350 8047407: Add test for JDK-8037385
dlsmith
parents:
diff changeset
     7
 */
993f29159350 8047407: Add test for JDK-8037385
dlsmith
parents:
diff changeset
     8
40504
0a01f6710c84 8078561: Error message should be generated once when -source 6 is specified
jlahoda
parents: 25277
diff changeset
     9
class StaticInvokeQualified {
25277
993f29159350 8047407: Add test for JDK-8037385
dlsmith
parents:
diff changeset
    10
    void test() {
993f29159350 8047407: Add test for JDK-8037385
dlsmith
parents:
diff changeset
    11
        java.util.stream.Stream.empty();
993f29159350 8047407: Add test for JDK-8037385
dlsmith
parents:
diff changeset
    12
    }
993f29159350 8047407: Add test for JDK-8037385
dlsmith
parents:
diff changeset
    13
}