aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs154
diff options
context:
space:
mode:
authoraclement <aclement>2007-11-07 11:03:17 +0000
committeraclement <aclement>2007-11-07 11:03:17 +0000
commit60f020069426ff561d89b034d2849d1f07495e02 (patch)
tree61d11148db0086478e8bbe0cb916af7f73081614 /tests/bugs154
parent035b27d00333ef36a35042f2e7a254c2f80814f1 (diff)
downloadaspectj-60f020069426ff561d89b034d2849d1f07495e02.tar.gz
aspectj-60f020069426ff561d89b034d2849d1f07495e02.zip
pr202088: test and fix for coping with abstract annotation pointcuts with context
Diffstat (limited to 'tests/bugs154')
-rw-r--r--tests/bugs154/pr202088/Bug.java8
-rw-r--r--tests/bugs154/pr202088/Bug2.java33
2 files changed, 41 insertions, 0 deletions
diff --git a/tests/bugs154/pr202088/Bug.java b/tests/bugs154/pr202088/Bug.java
new file mode 100644
index 000000000..cc4077423
--- /dev/null
+++ b/tests/bugs154/pr202088/Bug.java
@@ -0,0 +1,8 @@
+package tracing;
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public abstract class Bug {
+ @Pointcut
+ public abstract void traced(Object thiz);
+} \ No newline at end of file
diff --git a/tests/bugs154/pr202088/Bug2.java b/tests/bugs154/pr202088/Bug2.java
new file mode 100644
index 000000000..6b2ccb3cd
--- /dev/null
+++ b/tests/bugs154/pr202088/Bug2.java
@@ -0,0 +1,33 @@
+package tracing;
+import org.aspectj.lang.annotation.*;
+
+@Aspect abstract class Bug {
+ @Pointcut
+ public abstract void traced(Object thiz);
+
+ @Before("traced(o) && execution(* m(..))")
+ public void b1(Object o) {
+ System.out.println("o is '"+o+"'");
+ }
+
+}
+
+public @Aspect class Bug2 extends Bug {
+ @Pointcut("this(thiz)")
+ public void traced(Object thiz) {}
+
+ public static void main(String []argv) {
+ C.main(argv);
+ }
+}
+
+class C {
+ public static void main(String []argv) {
+ new C().m();
+ }
+ public void m() {
+
+ }
+
+ public String toString() { return "instance of C";}
+} \ No newline at end of file