]> source.dussan.org Git - aspectj.git/commitdiff
267559: generic itd npe: fix
authoraclement <aclement>
Mon, 9 Mar 2009 22:09:39 +0000 (22:09 +0000)
committeraclement <aclement>
Mon, 9 Mar 2009 22:09:39 +0000 (22:09 +0000)
weaver5/java5-testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java

index 6377b693aecd05d11271e3e1a5be519dbc421a21..da5fef342b20e0db3dbacab520d94c72d2cf5bc5 100644 (file)
@@ -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() {