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

27 lines
466 B
Java

/*
* @test /nodynamiccopyright/
* @bug 6537020
* @summary JCK tests: a compile-time error should be given in case of ambiguously imported fields (types, methods)
*
* @compile/fail/ref=T6537020.out -XDrawDiagnostics T6537020.java
*/
package p;
import static p.T6537020.C.s;
class T6537020 {
static class A {
static String s;
}
interface B {
String s = "";
}
static class C extends A implements B { }
Object o = s;
}