langtools/test/tools/javac/annotations/typeAnnotations/failures/BadCast.java
changeset 15385 ee1eebe7e210
child 21041 99f5e5e97425
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/BadCast.java	Wed Jan 23 13:27:24 2013 -0800
@@ -0,0 +1,14 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8006775
+ * @summary A cast cannot consist of only an annotation.
+ * @author Werner Dietl
+ * @compile/fail/ref=BadCast.out -XDrawDiagnostics BadCast.java
+ */
+class BadCast {
+  static void main() {
+    Object o = (@A) "";
+  }
+}
+
+@interface A { }