diff options
author | aclement <aclement> | 2005-11-02 16:16:29 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-02 16:16:29 +0000 |
commit | ade32bc38c17b38811b617f54828feb43a4b7048 (patch) | |
tree | aa53047e5b454704ac84e6aeab7e664f9431ac76 /org.aspectj.ajdt.core | |
parent | 62d16d52c25f7b5ff389ee2de603bbb3dc186c8e (diff) | |
download | aspectj-ade32bc38c17b38811b617f54828feb43a4b7048.tar.gz aspectj-ade32bc38c17b38811b617f54828feb43a4b7048.zip |
test and fix for pr114744
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java index 48713779d..6768be64e 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java @@ -558,6 +558,11 @@ public class EclipseFactory { return ret; } + // When converting a parameterized type from our world to the eclipse world, these get set so that + // resolution of the type parameters may known in what context it is occurring (pr114744) + private ReferenceBinding baseTypeForParameterizedType; + private int indexOfTypeParameterBeingConverted; + private TypeBinding makeTypeBinding1(UnresolvedType typeX) { if (typeX.isPrimitiveType()) { if (typeX == ResolvedType.BOOLEAN) return BaseTypes.BooleanBinding; @@ -582,9 +587,13 @@ public class EclipseFactory { UnresolvedType[] typeParameters = typeX.getTypeParameters(); ReferenceBinding baseTypeBinding = lookupBinding(typeX.getBaseName()); TypeBinding[] argumentBindings = new TypeBinding[typeParameters.length]; + baseTypeForParameterizedType = baseTypeBinding; for (int i = 0; i < argumentBindings.length; i++) { + indexOfTypeParameterBeingConverted = i; argumentBindings[i] = makeTypeBinding(typeParameters[i]); } + indexOfTypeParameterBeingConverted = 0; + baseTypeForParameterizedType = null; ParameterizedTypeBinding ptb = lookupEnvironment.createParameterizedType(baseTypeBinding,argumentBindings,baseTypeBinding.enclosingType()); return ptb; @@ -610,8 +619,7 @@ public class EclipseFactory { } TypeBinding[] otherBounds = null; if (brt.getAdditionalBounds()!=null && brt.getAdditionalBounds().length!=0) otherBounds = makeTypeBindings(brt.getAdditionalBounds()); - // FIXME asc rank should not always be 0 ... - WildcardBinding wb = lookupEnvironment.createWildcard(null,0,bound,otherBounds,boundkind); + WildcardBinding wb = lookupEnvironment.createWildcard(baseTypeForParameterizedType,indexOfTypeParameterBeingConverted,bound,otherBounds,boundkind); return wb; } else { return lookupBinding(typeX.getName()); |