2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-01-27 23:11:57 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 4855358
|
|
|
|
* @summary add support for JSR 201's static import facility
|
|
|
|
* @author gafter
|
|
|
|
*
|
2015-01-27 23:11:57 +00:00
|
|
|
* @compile/fail/ref=StaticImport2.out -XDrawDiagnostics StaticImport2.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|