diff options
author | acolyer <acolyer> | 2004-08-10 13:22:08 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-08-10 13:22:08 +0000 |
commit | 05dabd1821fffd9f353d1e965a56658b962c82d7 (patch) | |
tree | ac21652c7b86d12a0deaf3f287e97b6f5d07f16b /tests/bugs/pr53981 | |
parent | b3f5f6fe945ef35f8a3b97ec71bb5cc57e89a641 (diff) | |
download | aspectj-05dabd1821fffd9f353d1e965a56658b962c82d7.tar.gz aspectj-05dabd1821fffd9f353d1e965a56658b962c82d7.zip |
fix for Bugzilla Bug 53981
proceed used as method name in around advice
Diffstat (limited to 'tests/bugs/pr53981')
-rw-r--r-- | tests/bugs/pr53981/Proceeding1.aj | 26 | ||||
-rw-r--r-- | tests/bugs/pr53981/Proceeding2.aj | 13 | ||||
-rw-r--r-- | tests/bugs/pr53981/Proceeding3.aj | 14 |
3 files changed, 53 insertions, 0 deletions
diff --git a/tests/bugs/pr53981/Proceeding1.aj b/tests/bugs/pr53981/Proceeding1.aj new file mode 100644 index 000000000..a64f28240 --- /dev/null +++ b/tests/bugs/pr53981/Proceeding1.aj @@ -0,0 +1,26 @@ +import org.aspectj.testing.Tester; + +public class Proceeding1 { + public static void main(String[] args) { + Tester.checkAllEvents(); + } + static aspect A { + interface IProceed { + void proceeds(Runnable next); + } + IProceed decorator = new IProceed() { + public void proceeds(Runnable next) { + Tester.event("IProceed.proceed()"); + next.run(); + } + }; + void around() : execution(void main(String[])) { + Tester.expectEvent("IProceed.proceed()"); + decorator.proceeds(new Runnable() { + public void run() { + proceed(); + } + }); + } + } +}
\ No newline at end of file diff --git a/tests/bugs/pr53981/Proceeding2.aj b/tests/bugs/pr53981/Proceeding2.aj new file mode 100644 index 000000000..f77854c83 --- /dev/null +++ b/tests/bugs/pr53981/Proceeding2.aj @@ -0,0 +1,13 @@ +import org.aspectj.testing.Tester; + +public class Proceeding2 { + public static void main(String[] args) { + Tester.checkFailed("Proceed with a receiver should be treated as a method call, not the special form"); + } + static aspect A { + void around() : execution(void main(String[])) { + Proceeding2.proceed(null); // BUG: treated as proceed(Object); + } + } + static void proceed(Object o) {} +}
\ No newline at end of file diff --git a/tests/bugs/pr53981/Proceeding3.aj b/tests/bugs/pr53981/Proceeding3.aj new file mode 100644 index 000000000..7033c393b --- /dev/null +++ b/tests/bugs/pr53981/Proceeding3.aj @@ -0,0 +1,14 @@ +import org.aspectj.testing.Tester; + +public class Proceeding3 { + public static void main(String[] args) { + } + static aspect A { + void around() : execution(void main(String[])) { + proceed(); // special form or Proceeding.proceed()? + } + } + void proceed() { + Tester.checkFailed("A bare call to proceed inside around advice should never refer to a method"); + } +}
\ No newline at end of file |