diff options
Diffstat (limited to 'tests/errors/BadFormalsToCalls.java')
-rw-r--r-- | tests/errors/BadFormalsToCalls.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/errors/BadFormalsToCalls.java b/tests/errors/BadFormalsToCalls.java new file mode 100644 index 000000000..17559bbe0 --- /dev/null +++ b/tests/errors/BadFormalsToCalls.java @@ -0,0 +1,26 @@ +import org.aspectj.testing.Tester; +public class BadFormalsToCalls { + + static boolean noargsCalled = false; + + public static void main(String[] args) { + new BadFormalsToCalls().go(); + } + + void go() { + new B().noargs(); + Tester.check(noargsCalled, "noargs wasn't called"); + } + + class B { + public void noargs() { + } + } +} + +aspect CallsNoArgsAspect { + pointcut noargs(BadFormalsToCalls.B b): call(void noargs()); + void around(BadFormalsToCalls.B b): noargs(b) { + proceed(b); + } +} |