aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs154
diff options
context:
space:
mode:
authoraclement <aclement>2007-11-19 16:53:54 +0000
committeraclement <aclement>2007-11-19 16:53:54 +0000
commit3d5c7ab0bff432c50f2634e6c149aa1e640786fc (patch)
tree985b7e36e3e3f53e858b2db8a2530e3ec0568984 /tests/bugs154
parent915aaa9d09a7aa104c96c73739e15464616e7326 (diff)
downloadaspectj-3d5c7ab0bff432c50f2634e6c149aa1e640786fc.tar.gz
aspectj-3d5c7ab0bff432c50f2634e6c149aa1e640786fc.zip
86818: testcode
Diffstat (limited to 'tests/bugs154')
-rw-r--r--tests/bugs154/pr86818/Four.java18
-rw-r--r--tests/bugs154/pr86818/One.java11
-rw-r--r--tests/bugs154/pr86818/Three.java15
-rw-r--r--tests/bugs154/pr86818/Two.java15
4 files changed, 59 insertions, 0 deletions
diff --git a/tests/bugs154/pr86818/Four.java b/tests/bugs154/pr86818/Four.java
new file mode 100644
index 000000000..6ed474fd0
--- /dev/null
+++ b/tests/bugs154/pr86818/Four.java
@@ -0,0 +1,18 @@
+// Four.m() is ITD from another aspect - and itd is annotated
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME) @interface A {}
+
+public class Four {
+// public void m() {} --> gone to aspect
+ public static void main(String []argv) {
+ if (!(new Four() instanceof java.io.Serializable)) System.err.println("declare parents failed");
+ }
+}
+
+aspect Y {
+ public void Four.m() {}
+}
+aspect X {
+ declare parents: hasmethod(@A * * *(..)) implements java.io.Serializable;
+}
diff --git a/tests/bugs154/pr86818/One.java b/tests/bugs154/pr86818/One.java
new file mode 100644
index 000000000..18113d5f1
--- /dev/null
+++ b/tests/bugs154/pr86818/One.java
@@ -0,0 +1,11 @@
+// Should work fine, One gets Serializable
+public class One {
+ public void m() {}
+ public static void main(String []argv) {
+ if (!(new One() instanceof java.io.Serializable)) System.err.println("declare parents failed");
+ }
+}
+
+aspect X {
+ declare parents: hasmethod(public void m()) implements java.io.Serializable;
+}
diff --git a/tests/bugs154/pr86818/Three.java b/tests/bugs154/pr86818/Three.java
new file mode 100644
index 000000000..59eb5592a
--- /dev/null
+++ b/tests/bugs154/pr86818/Three.java
@@ -0,0 +1,15 @@
+// Three.m() is ITD from another aspect. Aspects other way round to case Two
+
+public class Three {
+// public void m() {} --> gone to aspect
+ public static void main(String []argv) {
+ if (!(new Three() instanceof java.io.Serializable)) System.err.println("declare parents failed");
+ }
+}
+
+aspect Y {
+ public void Three.m() {}
+}
+aspect X {
+ declare parents: hasmethod(public void m()) implements java.io.Serializable;
+}
diff --git a/tests/bugs154/pr86818/Two.java b/tests/bugs154/pr86818/Two.java
new file mode 100644
index 000000000..5bec66649
--- /dev/null
+++ b/tests/bugs154/pr86818/Two.java
@@ -0,0 +1,15 @@
+// Two.m() is ITD from another aspect
+public class Two {
+// public void m() {} --> gone to aspect
+ public static void main(String []argv) {
+ if (!(new Two() instanceof java.io.Serializable)) System.err.println("declare parents failed");
+ }
+}
+
+
+aspect X {
+ declare parents: hasmethod(public void m()) implements java.io.Serializable;
+}
+aspect Y {
+ public void Two.m() {}
+}