]> source.dussan.org Git - aspectj.git/commitdiff
Diagnostics for https://bugs.eclipse.org/bugs/show_bug.cgi?id=543023
authorAndy Clement <aclement@pivotal.io>
Fri, 11 Jan 2019 18:49:09 +0000 (10:49 -0800)
committerAndy Clement <aclement@pivotal.io>
Fri, 11 Jan 2019 18:49:09 +0000 (10:49 -0800)
org.aspectj.matcher/src/org/aspectj/weaver/BoundedReferenceType.java

index dc28ad3c152a96826652275a66f3f49f4ac028c2..62bd4d23a4be9f950aa804b164f7228ca6773512 100644 (file)
@@ -110,7 +110,12 @@ public class BoundedReferenceType extends ReferenceType {
                                        parameterizedAdditionalInterfaces);
                } else {
                        // (this.kind == SUPER)
-                       return new BoundedReferenceType((ReferenceType) getLowerBound().parameterize(typeBindings), false, world,
+                       UnresolvedType parameterizedLowerBound = getLowerBound().parameterize(typeBindings);
+                       if (!(parameterizedLowerBound instanceof ReferenceType)) {
+                               throw new IllegalStateException("PR543023: Unexpectedly found a non reference type: "+
+                                               parameterizedLowerBound.getClass().getName()+" with signature "+parameterizedLowerBound.getSignature());
+                       }
+                       return new BoundedReferenceType((ReferenceType)parameterizedLowerBound , false, world,
                                        parameterizedAdditionalInterfaces);
                }
        }