]> source.dussan.org Git - aspectj.git/commitdiff
generics: decp tests
authoraclement <aclement>
Fri, 8 Jul 2005 09:56:01 +0000 (09:56 +0000)
committeraclement <aclement>
Fri, 8 Jul 2005 09:56:01 +0000 (09:56 +0000)
tests/java5/generics/decp/Basic2b.aj [new file with mode: 0644]
tests/java5/generics/decp/Basic2c.aj [new file with mode: 0644]
tests/java5/generics/decp/Basic2d.aj [new file with mode: 0644]

diff --git a/tests/java5/generics/decp/Basic2b.aj b/tests/java5/generics/decp/Basic2b.aj
new file mode 100644 (file)
index 0000000..8cfc497
--- /dev/null
@@ -0,0 +1,11 @@
+interface I<T>{ }
+
+public class Basic2b implements I {
+
+  public static void main(String[]argv) {
+  }
+}
+
+aspect X{
+    declare parents: Basic2b implements I<Integer>; // error
+}
diff --git a/tests/java5/generics/decp/Basic2c.aj b/tests/java5/generics/decp/Basic2c.aj
new file mode 100644 (file)
index 0000000..bdf7bec
--- /dev/null
@@ -0,0 +1,11 @@
+interface I<T>{ }
+
+public class Basic2c implements I<Double> {
+
+  public static void main(String[]argv) {
+  }
+}
+
+aspect X{
+    declare parents: Basic2c implements I; // error
+}
diff --git a/tests/java5/generics/decp/Basic2d.aj b/tests/java5/generics/decp/Basic2d.aj
new file mode 100644 (file)
index 0000000..d4e6305
--- /dev/null
@@ -0,0 +1,12 @@
+// OK - since new parent matches
+interface I<T>{ }
+
+public class Basic2d implements I<Double> {
+
+  public static void main(String[]argv) {
+  }
+}
+
+aspect X{
+    declare parents: Basic2d implements I<Double>;
+}