]> source.dussan.org Git - aspectj.git/commitdiff
242797: crappy bounds checking in TypeVariable
authoraclement <aclement>
Tue, 19 Aug 2008 20:43:56 +0000 (20:43 +0000)
committeraclement <aclement>
Tue, 19 Aug 2008 20:43:56 +0000 (20:43 +0000)
tests/bugs162/pr242797/case3/GenericMethodAspect.aj [new file with mode: 0644]
tests/bugs162/pr242797/case3/GenericMethodImpl.java [new file with mode: 0644]
tests/bugs162/pr242797/case3/GenericMethodImpl2.java [new file with mode: 0644]
tests/bugs162/pr242797/case3/GenericMethodInterface.java [new file with mode: 0644]
tests/bugs162/pr242797/case3/Type1.java [new file with mode: 0644]
tests/bugs162/pr242797/case3/Type2.java [new file with mode: 0644]

diff --git a/tests/bugs162/pr242797/case3/GenericMethodAspect.aj b/tests/bugs162/pr242797/case3/GenericMethodAspect.aj
new file mode 100644 (file)
index 0000000..8bd5d16
--- /dev/null
@@ -0,0 +1,10 @@
+import java.util.ArrayList;
+import java.util.List;
+
+public aspect GenericMethodAspect {
+       
+       public <T> List<T> GenericMethodInterface.getStuff(){
+               return new ArrayList<T>();
+       }
+
+}
diff --git a/tests/bugs162/pr242797/case3/GenericMethodImpl.java b/tests/bugs162/pr242797/case3/GenericMethodImpl.java
new file mode 100644 (file)
index 0000000..0c52185
--- /dev/null
@@ -0,0 +1,10 @@
+import java.util.LinkedList;
+import java.util.List;
+
+public class GenericMethodImpl<D extends Type1> implements GenericMethodInterface{
+       
+       public <T extends D> List<T> getStuff(){
+               return new LinkedList<T>();
+       }
+
+}
diff --git a/tests/bugs162/pr242797/case3/GenericMethodImpl2.java b/tests/bugs162/pr242797/case3/GenericMethodImpl2.java
new file mode 100644 (file)
index 0000000..0f79eb2
--- /dev/null
@@ -0,0 +1,15 @@
+import java.util.List;
+
+
+/*
+ * Created on Aug 19, 2008
+ */
+
+public class GenericMethodImpl2 extends GenericMethodImpl<Type2> {
+
+       @Override
+    public <T extends Type2> List<T> getStuff() {
+           return super.getStuff();
+    }
+
+}
diff --git a/tests/bugs162/pr242797/case3/GenericMethodInterface.java b/tests/bugs162/pr242797/case3/GenericMethodInterface.java
new file mode 100644 (file)
index 0000000..c99f2e9
--- /dev/null
@@ -0,0 +1,12 @@
+import java.util.List;
+
+
+/*
+ * Created on Aug 19, 2008
+ */
+
+public interface GenericMethodInterface {
+       
+       public <T> List<T> getStuff();
+
+}
diff --git a/tests/bugs162/pr242797/case3/Type1.java b/tests/bugs162/pr242797/case3/Type1.java
new file mode 100644 (file)
index 0000000..8d6f2ae
--- /dev/null
@@ -0,0 +1,8 @@
+
+/*
+ * Created on Aug 19, 2008
+ */
+
+public interface Type1 {
+
+}
diff --git a/tests/bugs162/pr242797/case3/Type2.java b/tests/bugs162/pr242797/case3/Type2.java
new file mode 100644 (file)
index 0000000..4e13f36
--- /dev/null
@@ -0,0 +1,8 @@
+
+/*
+ * Created on Aug 19, 2008
+ */
+
+public class Type2 implements Type1 {
+
+}