Jan Lahoda d103a19b3a 8078561: Error message should be generated once when -source 6 is specified
Code to avoid duplicated errors about features not supported in the current source level moved to Log

Reviewed-by: jjg
2016-08-16 16:43:00 +02:00

15 lines
525 B
Java

/* @test /nodynamiccopyright/
* @bug 8037385
* @summary Must not allow static interface method invocation in legacy code
* @compile -source 8 -Xlint:-options StaticInvokeSimple.java
* @compile/fail/ref=StaticInvokeSimple7.out -source 7 -Xlint:-options -XDrawDiagnostics StaticInvokeSimple.java
* @compile/fail/ref=StaticInvokeSimple6.out -source 6 -Xlint:-options -XDrawDiagnostics StaticInvokeSimple.java
*/
import java.util.stream.Stream;
class StaticInvokeSimple {
void test() {
Stream.empty();
}
}