diff options
author | jhugunin <jhugunin> | 2003-03-12 23:07:08 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-03-12 23:07:08 +0000 |
commit | 7746fcb7e977c7a91bd70081a2197a999ec18ad3 (patch) | |
tree | 4e4e458141708cb69d58b31043883be4f6c2871b /tests/bugs/CflowBinding.java | |
parent | 519aa42cff336a34041df665c4c7e8f738274973 (diff) | |
download | aspectj-7746fcb7e977c7a91bd70081a2197a999ec18ad3.tar.gz aspectj-7746fcb7e977c7a91bd70081a2197a999ec18ad3.zip |
fix and test for Bugzilla Bug 34858
Weaver crash
Diffstat (limited to 'tests/bugs/CflowBinding.java')
-rw-r--r-- | tests/bugs/CflowBinding.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/bugs/CflowBinding.java b/tests/bugs/CflowBinding.java new file mode 100644 index 000000000..f127811d9 --- /dev/null +++ b/tests/bugs/CflowBinding.java @@ -0,0 +1,44 @@ +// for Bugzilla Bug 34858 +// Weaver crash w/ coverage + +import org.aspectj.testing.Tester; + +public class CflowBinding { + public static void main(String[] args) { + new Bar().bar(10); + } + + + static aspect A { + pointcut flow(int i, Object o): cflow(execution(void bar(int)) && this(o) && args(i)); + + Object around() : call(void m()) && flow(int, Object) { + return proceed(); + } + + Object around(final int i) : call(void m()) && flow(i, Object) { + System.out.println("i: " + i); + return proceed(i); + } + + Object around(final Object o) : call(void m()) && flow(int, o) { + System.out.println("o: " + o); + return proceed(o); + } + + Object around(final Object o, final int i) : call(void m()) && flow(i, o) { + System.out.println("o: " + o + ", i: " + i); + return proceed(o, i); + } + } +} + +class Bar { + void bar(int i) { + m(); + } + void m() { + System.out.println("m"); + } +} + |