aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features160
diff options
context:
space:
mode:
authoraclement <aclement>2008-04-26 18:38:31 +0000
committeraclement <aclement>2008-04-26 18:38:31 +0000
commit95fd0b5d754806866d836e56e15b9ecb8a3fa1ee (patch)
treebdeef1aeda9d4d77775172ca1143accfacc4535d /tests/features160
parent896000fba2b8c82c611ff36d58e70ab72f50c3d5 (diff)
downloadaspectj-95fd0b5d754806866d836e56e15b9ecb8a3fa1ee.tar.gz
aspectj-95fd0b5d754806866d836e56e15b9ecb8a3fa1ee.zip
rest of fix for 228980 - annotations bundled in with Nots
Diffstat (limited to 'tests/features160')
-rw-r--r--tests/features160/parameterAnnotationMatching/Test.java4
-rw-r--r--tests/features160/parameterAnnotationMatching/Test2.java25
2 files changed, 27 insertions, 2 deletions
diff --git a/tests/features160/parameterAnnotationMatching/Test.java b/tests/features160/parameterAnnotationMatching/Test.java
index 2a5aa2480..fb46dbfb0 100644
--- a/tests/features160/parameterAnnotationMatching/Test.java
+++ b/tests/features160/parameterAnnotationMatching/Test.java
@@ -8,7 +8,7 @@ public aspect Test {
declare warning : execution(* *(!(Object+), ..)) : "mOne: value parameter";
// Wrong (matches f1 and f2, should match only f1): a Not type pattern containing @A and negatedPattern Object+ is built
-//broke declare warning : execution(* *(@A (!(Object+)), ..)) : "mTwo: @A annotated value parameter";
+ declare warning : execution(* *(@A (!(Object+)), ..)) : "mTwo: @A annotated value parameter";
// OK (matches f1):
declare warning : execution(* *(@A (*), ..)) && execution(* *(!(Object+), ..)): "mThree: @A annotated value parameter.";
@@ -23,7 +23,7 @@ public aspect Test {
declare warning : execution(* *(@A (*), ..)) && execution(* *(Object+, ..)): "mSix: @A annotated reference parameter.";
// Wrong (matches f1 and f2, should match only f2):
-//broke declare warning : execution(* *(!@A (!(Object+)), ..)) : "mSeven: Non-@A annotated value parameter!";
+ declare warning : execution(* *(!@A (!(Object+)), ..)) : "mSeven: Non-@A annotated value parameter!";
// Wrong (matches f1 and f2, should match only f2):
declare warning : execution(* *(!@A (*), ..)) && execution(* *(!(Object+), ..)): "mEight: Non-@A annotated value parameter.";
diff --git a/tests/features160/parameterAnnotationMatching/Test2.java b/tests/features160/parameterAnnotationMatching/Test2.java
new file mode 100644
index 000000000..13fd815fb
--- /dev/null
+++ b/tests/features160/parameterAnnotationMatching/Test2.java
@@ -0,0 +1,25 @@
+ import java.lang.annotation.*;
+ import java.lang.annotation.Target;
+
+ public aspect Test2 {
+
+ declare warning : execution(* *(@A (!(Object+)), ..)) : "mOne"; // f1
+ declare warning : execution(* *(@A !String, ..)) : "mTwo"; // f3/f4
+
+ void f1(@A int i) {} // 9
+
+ void f2(int i) {} // 11
+
+ void f3(@A P i) {}
+
+ void f4(P i) {}
+
+ void f5(Integer i) {}
+
+ void f6(@A Integer i) {}
+
+ @Retention(RetentionPolicy.RUNTIME)
+ private static @interface A { }
+
+ @A static class P {}
+ } \ No newline at end of file