aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/pointcutParameter
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new/pointcutParameter')
-rw-r--r--tests/new/pointcutParameter/Driver.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/new/pointcutParameter/Driver.java b/tests/new/pointcutParameter/Driver.java
new file mode 100644
index 000000000..7dc1c6194
--- /dev/null
+++ b/tests/new/pointcutParameter/Driver.java
@@ -0,0 +1,31 @@
+
+import org.aspectj.testing.Tester;
+
+// PR#290 compiler crashes with eachobject and named pointcuts with parameters
+
+public class Driver {
+
+ public static String s = "";
+
+ public static void main(String[] args){
+ new C().go();
+ Tester.checkEqual(s, "-before-go", "");
+ }
+
+}
+
+class C {
+ int x;
+
+ public void go() {
+ Driver.s += "-go";
+ }
+}
+
+aspect A /*of eachobject(A.testPointcut(C))*/ {
+ pointcut testPointcut(C c): target(c);
+
+ before(C c): target(c) && call(* *(..)) {
+ Driver.s += "-before";
+ }
+}