aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs170
diff options
context:
space:
mode:
authoraclement <aclement>2011-11-17 18:16:12 +0000
committeraclement <aclement>2011-11-17 18:16:12 +0000
commit7f5af3ab0a71ad330667fa15bcaa373ec2de968d (patch)
tree079f443237c5dad8427d4b8e4cf41c09c4843e41 /tests/bugs170
parentfc95d9e3cb3524abc45cf0fc1a3cd5952ee033c6 (diff)
downloadaspectj-7f5af3ab0a71ad330667fa15bcaa373ec2de968d.tar.gz
aspectj-7f5af3ab0a71ad330667fa15bcaa373ec2de968d.zip
363979
Diffstat (limited to 'tests/bugs170')
-rw-r--r--tests/bugs170/pr363979/Example.java29
-rw-r--r--tests/bugs170/pr363979/Example2.java32
2 files changed, 61 insertions, 0 deletions
diff --git a/tests/bugs170/pr363979/Example.java b/tests/bugs170/pr363979/Example.java
new file mode 100644
index 000000000..0e5190000
--- /dev/null
+++ b/tests/bugs170/pr363979/Example.java
@@ -0,0 +1,29 @@
+import java.lang.annotation.*;
+
+aspect X {
+declare parents:
+ @SomeAnnotation(a = @Foo) * implements java.io.Serializable;
+}
+
+ @SomeAnnotation(a = @Foo)
+ public class Example {
+
+public static void main(String []argv) {
+ Example e = new Example();
+if (e instanceof java.io.Serializable) {
+System.out.println("yes");
+} else {
+System.out.println("no");
+}
+}
+
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo {}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface SomeAnnotation {
+ Foo a();
+}
+
diff --git a/tests/bugs170/pr363979/Example2.java b/tests/bugs170/pr363979/Example2.java
new file mode 100644
index 000000000..d9b3bbf00
--- /dev/null
+++ b/tests/bugs170/pr363979/Example2.java
@@ -0,0 +1,32 @@
+// nested values, more complex than just a marker
+import java.lang.annotation.*;
+
+aspect X {
+declare parents:
+ @SomeAnnotation(a = @Foo(value="123")) * implements java.io.Serializable;
+}
+
+ @SomeAnnotation(a = @Foo(value="123"))
+ public class Example {
+
+ public static void main(String []argv) {
+ Example e = new Example();
+ if (e instanceof java.io.Serializable) {
+ System.out.println("yes");
+ } else {
+ System.out.println("no");
+ }
+ }
+
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foo {
+ String value();
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface SomeAnnotation {
+ Foo a();
+}
+