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

15 lines
309 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8161985
* @summary Spurious override of Object.getClass leads to NPE
* @compile/fail/ref=T8161985b.out -XDrawDiagnostics T8161985b.java
*/
class T8161985b {
public String getClass() { return ""; }
void test() {
this.getClass().getSimpleName();
}
}