aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features1611/declareMinus/Code.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features1611/declareMinus/Code.java')
-rw-r--r--tests/features1611/declareMinus/Code.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/features1611/declareMinus/Code.java b/tests/features1611/declareMinus/Code.java
new file mode 100644
index 000000000..133c60249
--- /dev/null
+++ b/tests/features1611/declareMinus/Code.java
@@ -0,0 +1,20 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Anno {}
+
+aspect Foo {
+ declare @field: * Code.someField: -@Anno;
+}
+
+public class Code {
+
+ @Anno
+ public static int someField;
+
+ public static void main(String[]argv) throws Exception {
+ Object o = Code.class.getDeclaredField("someField").getAnnotation(Anno.class);
+ System.out.println(o==null?"no annotation":"has annotation");
+ }
+}
+