jdk-24/test/langtools/tools/javac/6563143/InvalidAnonymous.java

13 lines
410 B
Java
Raw Normal View History

/*
* @test /nodynamiccopyright/
* @bug 8242802
* @summary Verify javac does not crash while checking for equals/hashCode overrides
* @compile/fail/ref=InvalidAnonymous.out -XDrawDiagnostics InvalidAnonymous.java
* @compile/fail/ref=InvalidAnonymous.out -XDrawDiagnostics -Xlint:overrides InvalidAnonymous.java
*/
public class InvalidAnonymous {
private void t() {
new Undefined() {};
}
}