aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2012-05-25 15:10:46 -0700
committerAndy Clement <andrew.clement@gmail.com>2012-05-25 15:10:46 -0700
commit0435426892c16b1b86f526ca4d4cfe62bbd3376b (patch)
tree536607197b2d321798358f6e5a2d00f239bd5920 /org.aspectj.matcher
parent30c38582eef681e4a8f1098a298c143a190fd840 (diff)
downloadaspectj-0435426892c16b1b86f526ca4d4cfe62bbd3376b.tar.gz
aspectj-0435426892c16b1b86f526ca4d4cfe62bbd3376b.zip
375777 debug
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java11
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/World.java5
2 files changed, 15 insertions, 1 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
index 53f3f72a4..97e9f5fc6 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
@@ -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
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java
index e56fecd7f..960b05975 100644
--- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java
+++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java
@@ -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(