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

25 lines
433 B
Java

/*
* @test /nodynamiccopyright/
* @bug 4979456
* @summary NPE while compiling static import of inaccessible class member
* @author gafter
*
* @compile/fail/ref=ImportPrivate.out -XDrawDiagnostics ImportPrivate.java
*/
package importPrivate;
import static importPrivate.A.m;
class A {
private static int m() {
return 8;
}
}
class MyTest {
public static void main(String argv[]) {
m();
}
}