summaryrefslogtreecommitdiffstats
path: root/tests/bugs/pr53981
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/pr53981')
-rw-r--r--tests/bugs/pr53981/Proceeding1.aj26
-rw-r--r--tests/bugs/pr53981/Proceeding2.aj13
-rw-r--r--tests/bugs/pr53981/Proceeding3.aj14
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