]> source.dussan.org Git - aspectj.git/commitdiff
375777 debug
authorAndy Clement <andrew.clement@gmail.com>
Fri, 25 May 2012 22:10:46 +0000 (15:10 -0700)
committerAndy Clement <andrew.clement@gmail.com>
Fri, 25 May 2012 22:10:46 +0000 (15:10 -0700)
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
org.aspectj.matcher/src/org/aspectj/weaver/World.java

index 53f3f72a4f6c3342d12f7a00d26b357f1a8542cc..97e9f5fc6ba71d999d317186875ab7c346ffb1df 100644 (file)
@@ -639,7 +639,7 @@ public class ReferenceType extends ResolvedType {
                }
                ResolvedType[] delegateInterfaces = getDelegate().getDeclaredInterfaces();
                if (isRawType()) {
-                       if (newInterfaces != null) {
+                       if (newInterfaces != null) {// debug 375777
                                throw new IllegalStateException(
                                                "The raw type should never be accumulating new interfaces, they should be on the generic type.  Type is "
                                                                + this.getName());
@@ -976,6 +976,11 @@ public class ReferenceType extends ResolvedType {
                if (typeKind == TypeKind.SIMPLE) {
                        typeKind = TypeKind.RAW;
                        signatureErasure = signature;
+                       if (newInterfaces != null) { // debug 375777
+                               throw new IllegalStateException(
+                                               "Simple type promoted to raw, but simple type had new interfaces/superclass.  Type is "
+                                                               + this.getName());
+                       }
                }
                if (typeKind == TypeKind.RAW) {
                        genericType.addDependentType(this);
@@ -1131,4 +1136,8 @@ public class ReferenceType extends ResolvedType {
                return null;
        }
 
+       public boolean hasNewInterfaces() {
+               return newInterfaces!=null;
+       }
+
 }
\ No newline at end of file
index e56fecd7f874dc83d1fa84b074cee3db76e798a8..960b05975df5752dfc2e0c9331481f126a091246 100644 (file)
@@ -487,6 +487,11 @@ public abstract class World implements Dump.INode {
                        if (delegate.isGeneric() && behaveInJava5Way) {
                                // ======== raw type ===========
                                simpleOrRawType.typeKind = TypeKind.RAW;
+                               if (simpleOrRawType.hasNewInterfaces()) { // debug 375777
+                                       throw new IllegalStateException(
+                                                       "Simple type promoted forced to raw, but it had new interfaces/superclass.  Type is "
+                                                                       + simpleOrRawType.getName());
+                               }
                                ReferenceType genericType = makeGenericTypeFrom(delegate, simpleOrRawType);
                                // name =
                                // ReferenceType.fromTypeX(UnresolvedType.forRawTypeNames(