diff options
Diffstat (limited to 'tests/new/CallsVRec.java')
-rw-r--r-- | tests/new/CallsVRec.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/new/CallsVRec.java b/tests/new/CallsVRec.java new file mode 100644 index 000000000..bb3140cd7 --- /dev/null +++ b/tests/new/CallsVRec.java @@ -0,0 +1,43 @@ +import org.aspectj.compiler.base.ast.*; + +public class CallsVRec { + public static void main(String[] args) { + new CallsVRec().realMain(args); + } + public void realMain(String[] args) { + org.aspectj.testing.Tester.check(true, "Compiled!"); + } + + public CallsVRec() { + } +} + + + + +aspect Wins { + + pointcut showError(ASTObject ast, String msg): + target(ast) + && call(void ASTObject.showError(String)) + && args(msg); + + void around(ASTObject ast, String msg): showError(ast, msg) { + System.out.println("hi"); + proceed(ast, msg); + } +} + +aspect Loses { + + pointcut showError(ASTObject ast, String msg): + target(ast) + && call/*s*/(void ASTObject.showError(String)) + && args(msg); + + void around(ASTObject ast, String msg): showError(ast, msg) { + System.out.println("hi"); + proceed(ast, msg); + } +} + |