aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs160
diff options
context:
space:
mode:
authoraclement <aclement>2007-02-20 16:09:22 +0000
committeraclement <aclement>2007-02-20 16:09:22 +0000
commit1aef8a8cf7dfbaa164a464ee5b10e7688b6a0964 (patch)
treec37037f025d97fa0c63fd4f29e8a8c0c88e3c514 /tests/bugs160
parente1770f1714a29b2f42777374a526fa873345a601 (diff)
downloadaspectj-1aef8a8cf7dfbaa164a464ee5b10e7688b6a0964.tar.gz
aspectj-1aef8a8cf7dfbaa164a464ee5b10e7688b6a0964.zip
171953#1 - test and fix for generic method introduction and compilation errors varying depending on order of source file processing
Diffstat (limited to 'tests/bugs160')
-rw-r--r--tests/bugs160/pr171953_2/test/AbstractProcessor.java5
-rw-r--r--tests/bugs160/pr171953_2/test/ListFactory.java9
-rw-r--r--tests/bugs160/pr171953_2/test/ListFactoryAspect.aj30
-rw-r--r--tests/bugs160/pr171953_2/test/ListFactoryConsumer.java6
-rw-r--r--tests/bugs160/pr171953_2/test/Processor.java5
-rw-r--r--tests/bugs160/pr171953_2/test/SimpleListFactoryConsumer.java16
6 files changed, 71 insertions, 0 deletions
diff --git a/tests/bugs160/pr171953_2/test/AbstractProcessor.java b/tests/bugs160/pr171953_2/test/AbstractProcessor.java
new file mode 100644
index 000000000..008fba159
--- /dev/null
+++ b/tests/bugs160/pr171953_2/test/AbstractProcessor.java
@@ -0,0 +1,5 @@
+package test;
+
+public abstract class AbstractProcessor implements Processor {
+
+}
diff --git a/tests/bugs160/pr171953_2/test/ListFactory.java b/tests/bugs160/pr171953_2/test/ListFactory.java
new file mode 100644
index 000000000..473ccac20
--- /dev/null
+++ b/tests/bugs160/pr171953_2/test/ListFactory.java
@@ -0,0 +1,9 @@
+package test;
+
+import java.util.List;
+
+public interface ListFactory {
+
+ <T> List<T> createList();
+ <T> List<T> createList(int initialCapacity);
+}
diff --git a/tests/bugs160/pr171953_2/test/ListFactoryAspect.aj b/tests/bugs160/pr171953_2/test/ListFactoryAspect.aj
new file mode 100644
index 000000000..acfc27e70
--- /dev/null
+++ b/tests/bugs160/pr171953_2/test/ListFactoryAspect.aj
@@ -0,0 +1,30 @@
+package test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public aspect ListFactoryAspect {
+
+ private ListFactory listFactory = new ListFactory() {
+ public <T> List<T> createList() {
+ return new ArrayList<T>();
+ };
+ public <T> List<T> createList(int initialCapacity) {
+ return new ArrayList<T>();
+ };
+ };
+
+ declare parents: Processor implements ListFactoryConsumer;
+
+ public ListFactory ListFactoryConsumer.getListFactory() {
+ return ListFactoryAspect.aspectOf().listFactory;
+ }
+
+ public <T> List<T> ListFactoryConsumer.createList() {
+ return getListFactory().<T>createList();
+ }
+
+ public <T> List<T> ListFactoryConsumer.createList(int initialCapacity) {
+ return getListFactory().<T>createList(initialCapacity);
+ }
+}
diff --git a/tests/bugs160/pr171953_2/test/ListFactoryConsumer.java b/tests/bugs160/pr171953_2/test/ListFactoryConsumer.java
new file mode 100644
index 000000000..41747d902
--- /dev/null
+++ b/tests/bugs160/pr171953_2/test/ListFactoryConsumer.java
@@ -0,0 +1,6 @@
+package test;
+
+public interface ListFactoryConsumer {
+
+ ListFactory getListFactory();
+}
diff --git a/tests/bugs160/pr171953_2/test/Processor.java b/tests/bugs160/pr171953_2/test/Processor.java
new file mode 100644
index 000000000..c76cdaaf9
--- /dev/null
+++ b/tests/bugs160/pr171953_2/test/Processor.java
@@ -0,0 +1,5 @@
+package test;
+
+public interface Processor {
+
+}
diff --git a/tests/bugs160/pr171953_2/test/SimpleListFactoryConsumer.java b/tests/bugs160/pr171953_2/test/SimpleListFactoryConsumer.java
new file mode 100644
index 000000000..ab1ec7cf7
--- /dev/null
+++ b/tests/bugs160/pr171953_2/test/SimpleListFactoryConsumer.java
@@ -0,0 +1,16 @@
+package test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SimpleListFactoryConsumer extends AbstractProcessor {
+
+ public void run() {
+ //List<List<String>> list1 = getListFactory().createList();
+ List<List<String>> list2 = this.createList();
+ }
+
+ public static void main(String[] args) {
+ new SimpleListFactoryConsumer().run();
+ }
+}