jdk-24/langtools/test/tools/javac/annotations/neg/NoDefaultAbstract.java
Eric McCorkle 5b76a0d216 8022322: Reject default and static methods in annotation
Causes javac to reject static and default method declarations inside an annotation

Reviewed-by: jjg
2013-09-09 16:26:55 -04:00

10 lines
253 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8022322
* @summary Default methods are not allowed in an annotation.
* @compile/fail/ref=NoDefaultAbstract.out -XDrawDiagnostics NoDefaultAbstract.java
*/
@interface NoDefaultAbstract {
default int m();
}