blob: c178fbc2a5395d7f05daa96f7f4384f7aefa30e1 [file] [log] [blame]
/*
* @test /nodynamiccopyright/
* @bug 8006775
* @summary A cast cannot consist of only an annotation.
* @author Werner Dietl
* @compile/fail/ref=BadCast.out -XDrawDiagnostics BadCast.java
*/
import java.lang.annotation.*;
class BadCast {
static void main() {
Object o = (@A) "";
}
}
@Target(ElementType.TYPE_USE)
@interface A { }