aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/PR600
diff options
context:
space:
mode:
authorwisberg <wisberg>2002-12-16 18:51:06 +0000
committerwisberg <wisberg>2002-12-16 18:51:06 +0000
commit144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch)
treeb12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/PR600
parentfafae443719b26159ab2d7dac1c9b46b5e00b671 (diff)
downloadaspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz
aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip
initial version
Diffstat (limited to 'tests/new/PR600')
-rw-r--r--tests/new/PR600/A.java1
-rw-r--r--tests/new/PR600/B.java1
-rw-r--r--tests/new/PR600/C.java1
-rw-r--r--tests/new/PR600/Main.java14
-rw-r--r--tests/new/PR600/My_error.java30
5 files changed, 47 insertions, 0 deletions
diff --git a/tests/new/PR600/A.java b/tests/new/PR600/A.java
new file mode 100644
index 000000000..9f4b93d84
--- /dev/null
+++ b/tests/new/PR600/A.java
@@ -0,0 +1 @@
+public class A {}
diff --git a/tests/new/PR600/B.java b/tests/new/PR600/B.java
new file mode 100644
index 000000000..b90c4517f
--- /dev/null
+++ b/tests/new/PR600/B.java
@@ -0,0 +1 @@
+public class B {}
diff --git a/tests/new/PR600/C.java b/tests/new/PR600/C.java
new file mode 100644
index 000000000..9d83983cd
--- /dev/null
+++ b/tests/new/PR600/C.java
@@ -0,0 +1 @@
+public class C {}
diff --git a/tests/new/PR600/Main.java b/tests/new/PR600/Main.java
new file mode 100644
index 000000000..bf6ecc27b
--- /dev/null
+++ b/tests/new/PR600/Main.java
@@ -0,0 +1,14 @@
+
+/** @testcase PR#600 AbstractMethodError for introduced methods under some orderings of input files */
+public class Main {
+ public static void main(String[] args) {
+ A a = new A();
+ B b = new B();
+ C c = new C();
+
+ a.setNext(b);
+ b.setNext(c);
+
+ a.doIt();
+ }
+}
diff --git a/tests/new/PR600/My_error.java b/tests/new/PR600/My_error.java
new file mode 100644
index 000000000..a827670ef
--- /dev/null
+++ b/tests/new/PR600/My_error.java
@@ -0,0 +1,30 @@
+aspect My_error {
+
+ interface Queue {}
+ Queue Queue.next = null;
+
+ public void Queue.doIt() {
+ if (next == null) {
+ System.out.println("End of queue reached");
+ } else {
+ System.out.println("\tCall received by: "+this.getClass().getName());
+ System.out.println("\tCall forwarded to: "+next.getClass().getName());
+ next.doIt();
+ }
+ }
+
+ public void Queue.setNext(Queue next) {
+ this.next = next;
+ }
+
+ declare parents: A implements Queue;
+ declare parents: B implements Queue;
+ declare parents: C implements Queue;
+
+ // This is the problematic declaration. If removed, the program works fine.
+ // If replaced by an around advice, the program also works fine.
+
+ public void C.doIt() {
+ System.out.println("Hurray! The call has been received by C!");
+ }
+}