summaryrefslogtreecommitdiffstats
path: root/tests/new/ArgsInCflow2.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new/ArgsInCflow2.java')
-rw-r--r--tests/new/ArgsInCflow2.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/new/ArgsInCflow2.java b/tests/new/ArgsInCflow2.java
new file mode 100644
index 000000000..a2ddf1eb8
--- /dev/null
+++ b/tests/new/ArgsInCflow2.java
@@ -0,0 +1,25 @@
+
+import org.aspectj.testing.*;
+
+/** PR#660 name binding in around cflow */
+public class ArgsInCflow2 {
+ public static void main(String[] args) {
+ Tester.check(3==foo(1), "3==foo(1)");
+ Tester.checkAllEvents();
+ }
+ static int foo(int x) {return bar(x+1);}
+ static int bar(int x) {return x+1;}
+
+ static {
+ Tester.expectEvent("1-2");
+ }
+}
+
+aspect Test {
+ int around(final int x, final int y) :
+ cflow(call(int foo(int)) && args(x))
+ && call(int bar(int)) && args(y) {
+ Tester.event(x + "-" + y);
+ return proceed(x,y);
+ }
+}