aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs162
diff options
context:
space:
mode:
authoraclement <aclement>2008-08-22 21:07:25 +0000
committeraclement <aclement>2008-08-22 21:07:25 +0000
commitfbac9e5426de8b2a2cbd4408e812dd34648a6a10 (patch)
tree08d8691fa0d45f2ef37bfded14a66615e31cef24 /tests/bugs162
parent36df743803c35f9715f4c0c5cffa79989a672992 (diff)
downloadaspectj-fbac9e5426de8b2a2cbd4408e812dd34648a6a10.tar.gz
aspectj-fbac9e5426de8b2a2cbd4408e812dd34648a6a10.zip
198341: test and fix
Diffstat (limited to 'tests/bugs162')
-rw-r--r--tests/bugs162/pr198341/AnnotationAspect.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/bugs162/pr198341/AnnotationAspect.java b/tests/bugs162/pr198341/AnnotationAspect.java
new file mode 100644
index 000000000..a67c2641b
--- /dev/null
+++ b/tests/bugs162/pr198341/AnnotationAspect.java
@@ -0,0 +1,30 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@interface TestAnnotation1 {}
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@interface TestAnnotation2{}
+
+@TestAnnotation1
+class Annotated {}
+
+interface Marker {}
+
+public aspect AnnotationAspect {
+
+ declare @type: @TestAnnotation1 *: @TestAnnotation2;
+
+ // of cource this matches
+ // declare parents: (@TestAnnotation1 *) implements Marker;
+ // this matches, too
+ // declare parents: (@TestAnnotation2 *) implements Marker;
+
+ // this does not match on Annotated
+ declare parents: (@TestAnnotation2 *) && !java.lang.annotation.Annotation implements Marker;
+ // but this does match on annotated
+ // declare parents: (@TestAnnotation1 *) && !java.lang.annotation.Annotation implements Marker;
+}
+