aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr115252/AndTypePattern.java
diff options
context:
space:
mode:
authoraclement <aclement>2005-11-18 14:47:31 +0000
committeraclement <aclement>2005-11-18 14:47:31 +0000
commitb1a8c138a6af2d94747a66a03dc9249d9c5554ce (patch)
treeede0fc774b5b7719f3475edb8a21d494fbb904e1 /tests/bugs150/pr115252/AndTypePattern.java
parent557f5b4676f6484dc9b43e2d1a5a8172ef76d5cf (diff)
downloadaspectj-b1a8c138a6af2d94747a66a03dc9249d9c5554ce.tar.gz
aspectj-b1a8c138a6af2d94747a66a03dc9249d9c5554ce.zip
tests for 115252
Diffstat (limited to 'tests/bugs150/pr115252/AndTypePattern.java')
-rw-r--r--tests/bugs150/pr115252/AndTypePattern.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs150/pr115252/AndTypePattern.java b/tests/bugs150/pr115252/AndTypePattern.java
new file mode 100644
index 000000000..2f404eeb2
--- /dev/null
+++ b/tests/bugs150/pr115252/AndTypePattern.java
@@ -0,0 +1,26 @@
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+@Target({ElementType.METHOD})
+@interface MethodAnnotation{}
+
+@Target({ElementType.FIELD})
+@interface FieldAnnotation{}
+
+public class AndTypePattern {
+
+ public void method1() {}
+
+ @FieldAnnotation
+ int field = 1;
+
+}
+
+aspect A {
+
+ // should display an xlint message because @FieldAnnotation can't be
+ // applied to methods
+ pointcut andPointcut() : execution(@(FieldAnnotation && MethodAnnotation) * *(..));
+ declare warning : andPointcut() : "andPointcut()";
+
+}