}
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());
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);
return null;
}
+ public boolean hasNewInterfaces() {
+ return newInterfaces!=null;
+ }
+
}
\ No newline at end of file
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(