jdk-24/test/langtools/tools/javac/staticImport/StaticImport2.java
2017-09-12 19:03:39 +02:00

27 lines
397 B
Java

/*
* @test /nodynamiccopyright/
* @bug 4855358
* @summary add support for JSR 201's static import facility
* @author gafter
*
* @compile/fail/ref=StaticImport2.out -XDrawDiagnostics StaticImport2.java
*/
package p;
import static p.A.*;
import static p.B.*;
interface A {
int K = 3;
}
interface B {
int K = 4;
}
class C {
void f() {
int x = K; // ambiguous
}
}