Browse Source

214994: generic itds alias NPE: tests and fix

tags/V1_6_0rc1
aclement 16 years ago
parent
commit
659bd1bd5a

+ 22
- 0
tests/bugs160/pr214994/Broke.java View File

@@ -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;
}

}

+ 3
- 0
tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java View 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");
}

+ 5
- 0
tests/src/org/aspectj/systemtest/ajc160/ajc160.xml View 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>

Loading…
Cancel
Save