]> source.dussan.org Git - aspectj.git/commitdiff
214994: generic itds alias NPE: tests and fix
authoraclement <aclement>
Mon, 24 Mar 2008 19:48:27 +0000 (19:48 +0000)
committeraclement <aclement>
Mon, 24 Mar 2008 19:48:27 +0000 (19:48 +0000)
tests/bugs160/pr214994/Broke.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
tests/src/org/aspectj/systemtest/ajc160/ajc160.xml

diff --git a/tests/bugs160/pr214994/Broke.java b/tests/bugs160/pr214994/Broke.java
new file mode 100644 (file)
index 0000000..fa10522
--- /dev/null
@@ -0,0 +1,22 @@
+import java.util.*;
+
+interface Item {}
+interface Container {}
+interface CompositeItem<T> {}
+interface CompositeContainer<T extends CompositeItem> {}
+
+public abstract aspect Broke<Item, Container> {
+
+  private C CompositeItem<C>.container;
+
+  public List<I> CompositeContainer<I>.itemList = new ArrayList<I>();
+
+  public CompositeContainer<I> CompositeContainer<I>.addItem(I i) {
+    itemList.add(i);
+
+    i.container = this;
+
+    return this;
+  }
+
+}
\ No newline at end of file
index 93f01640bb743a7e668663e0221f3348ba47f151..61e6b9e27732e0e4f4d9ad3ec346b05777784206 100644 (file)
@@ -22,6 +22,9 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
 public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        
        // AspectJ1.6.0rc1
+    public void testGenericITDs_pr214994() { 
+        runTest("generic itd");
+    }
     public void testGenericDecpLtw_pr223605() {
         runTest("generic decp ltw");
     }
index b7167cc789d93406231a0459720478b7e9c4c119..bda4a19c877419ee6aa4ef70067f7e7dd5a58e14 100644 (file)
@@ -3,6 +3,11 @@
 <!-- AspectJ v1.6.0 Tests -->
 <suite>
 
+
+       <ajc-test dir="bugs160/pr214994" title="generic itd">
+               <compile files="Broke.java" options="-1.5"/>
+       </ajc-test>
+
        <ajc-test dir="bugs160/pr223605" title="generic decp ltw">
                <compile files="GenericConfigurableBugTest.java" options="-1.5"><!-- -showWeaveInfo"-->
                </compile>