From 7f5af3ab0a71ad330667fa15bcaa373ec2de968d Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 17 Nov 2011 18:16:12 +0000 Subject: [PATCH] 363979 --- tests/bugs170/pr363979/Example.java | 29 +++++++++++++++++++++++++ tests/bugs170/pr363979/Example2.java | 32 ++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 tests/bugs170/pr363979/Example.java create mode 100644 tests/bugs170/pr363979/Example2.java 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(); +} + -- 2.39.5