aboutsummaryrefslogtreecommitdiffstats
path: root/weaver5
diff options
context:
space:
mode:
authoraclement <aclement>2009-03-09 22:09:39 +0000
committeraclement <aclement>2009-03-09 22:09:39 +0000
commita45da4ff22289b1048174b1f94e13d549b12d7b5 (patch)
tree0923f5244a6fc93c9ffae96e9a411258fa753a0f /weaver5
parent01b0ccdea69bf1d8a70b8cbe65f3130e9445a620 (diff)
downloadaspectj-a45da4ff22289b1048174b1f94e13d549b12d7b5.tar.gz
aspectj-a45da4ff22289b1048174b1f94e13d549b12d7b5.zip
267559: generic itd npe: fix
Diffstat (limited to 'weaver5')
-rw-r--r--weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java b/weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java
index 6377b693a..da5fef342 100644
--- a/weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java
+++ b/weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java
@@ -439,6 +439,36 @@ public class ReferenceTypeTestCase extends TestCase {
// error: arrayListOfString = listOfNumber;
assertFalse(ajArrayListOfString.isAssignableFrom(ajListOfNumber));
assertFalse(ajArrayListOfString.isCoerceableFrom(ajListOfNumber));
+
+ }
+
+ static class ClassA<T> {
+ }
+
+ static interface IMarker<H> {
+ }
+
+ static class ClassB<T> implements IMarker<ClassA<T>> {
+ }
+
+ static class ClassC<T> implements IMarker<T> {
+ }
+
+ public void testAssignability_pr267559() {
+ ClassB cb = new ClassB();
+ ClassB cb2 = new ClassB();
+
+ ReferenceType rcb = resolve("Lorg/aspectj/weaver/ReferenceTypeTestCase$ClassB;");
+ ReferenceType rcb2 = resolve("Lorg/aspectj/weaver/ReferenceTypeTestCase$ClassB;");
+ boolean b = rcb.isAssignableFrom(rcb2);
+ assertTrue(b);
+ b = rcb2.isAssignableFrom(rcb);
+ assertTrue(b);
+
+ rcb = resolve("Porg/aspectj/weaver/ReferenceTypeTestCase$IMarker<Porg/aspectj/weaver/ReferenceTypeTestCase$ClassA<TT;>;>;");
+ rcb2 = resolve("Lorg/aspectj/weaver/ReferenceTypeTestCase$ClassB;");
+ b = rcb.isAssignableFrom(rcb2);
+ assertTrue(b);
}
public void testAssignable03_method_m4() {