jdk-24/test/langtools/tools/javac/annotations/neg/WrongTarget2.java

14 lines
316 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 4973504
* @summary Compiler allows Inherited meta-attribute on local variable declaration.
* @author gafter
*
* @compile/fail/ref=WrongTarget2.out -XDrawDiagnostics WrongTarget2.java
2007-12-01 00:00:00 +00:00
*/
import java.lang.annotation.Inherited;
class Field {{
@Inherited int vec;
}}