]> source.dussan.org Git - aspectj.git/commitdiff
308773
authoraclement <aclement>
Tue, 13 Apr 2010 20:19:32 +0000 (20:19 +0000)
committeraclement <aclement>
Tue, 13 Apr 2010 20:19:32 +0000 (20:19 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedMemberImpl.java

index fc623d7dc37ddae61defef022e9136d1bd3f7e49..3890488d0beffde028ad363076866b0a980a867d 100644 (file)
@@ -671,8 +671,13 @@ public class ResolvedMemberImpl extends MemberImpl implements IHasPosition, Anno
         */
        public ResolvedMemberImpl parameterizedWith(UnresolvedType[] typeParameters, ResolvedType newDeclaringType,
                        boolean isParameterized, List aliases) {
+               // PR308773
+               // this check had problems for the inner type of a generic type because the inner type can be represented
+               // by a 'simple type' if it is only sharing type variables with the outer and has none of its own.  To avoid the
+               // check going bang in this case we check for $ (crap...) - we can't check the outer because the declaring type
+               // is considered unresolved...          
                if (// isParameterized && <-- might need this bit...
-               !getDeclaringType().isGenericType()) {
+               !getDeclaringType().isGenericType()  && getDeclaringType().getName().indexOf("$")==-1) {
                        throw new IllegalStateException("Can't ask to parameterize a member of non-generic type: " + getDeclaringType()
                                        + "  kind(" + getDeclaringType().typeKind + ")");
                }