From: aclement Date: Thu, 15 Jan 2009 17:33:08 +0000 (+0000) Subject: 261150: diagnostics X-Git-Tag: pre268419~222 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=29fe23e4bb449eea40dcf3ec78cd59a73088104d;p=aspectj.git 261150: diagnostics --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/AbstractReferenceTypeDelegate.java b/org.aspectj.matcher/src/org/aspectj/weaver/AbstractReferenceTypeDelegate.java index 52d0ade35..20e9f7994 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/AbstractReferenceTypeDelegate.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/AbstractReferenceTypeDelegate.java @@ -100,7 +100,11 @@ public abstract class AbstractReferenceTypeDelegate implements ReferenceTypeDele protected GenericSignature.FormalTypeParameter[] getFormalTypeParametersFromOuterClass() { List typeParameters = new ArrayList(); - ReferenceType outer = (ReferenceType) getOuterClass(); + ResolvedType outerClassType = getOuterClass(); + if (!(outerClassType instanceof ReferenceType)) { + throw new BCException("Whilst processing type '"+this.resolvedTypeX.getSignature()+"' - cannot cast the outer type to a reference type. Signature="+outerClassType.getSignature()+" toString()="+outerClassType.toString()); + } + ReferenceType outer = (ReferenceType) outerClassType; ReferenceTypeDelegate outerDelegate = outer.getDelegate(); AbstractReferenceTypeDelegate outerObjectType = (AbstractReferenceTypeDelegate) outerDelegate; if (outerObjectType.isNested()) {