diff options
author | aclement <aclement> | 2005-10-17 10:45:35 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-10-17 10:45:35 +0000 |
commit | 0b5a5420704f7e32509fffaef66d8c94dcedcf17 (patch) | |
tree | 67add3222a3b8e780a03e96f7a7b08e532a6350e /org.aspectj.ajdt.core | |
parent | e1537b247640bd0fa3bb8db2616a890b8be9ca58 (diff) | |
download | aspectj-0b5a5420704f7e32509fffaef66d8c94dcedcf17.tar.gz aspectj-0b5a5420704f7e32509fffaef66d8c94dcedcf17.zip |
Fix for pr112602
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java | 18 |
1 files changed, 12 insertions, 6 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 1977c32b7..4b6287d77 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 @@ -211,16 +211,22 @@ public class EclipseFactory { if (binding instanceof WildcardBinding) { WildcardBinding eWB = (WildcardBinding) binding; - UnresolvedType ut = TypeFactory.createTypeFromSignature(CharOperation.charToString(eWB.genericTypeSignature())); - // If the bound for the wildcard is a typevariable, e.g. '? extends E' then + UnresolvedType theType = TypeFactory.createTypeFromSignature(CharOperation.charToString(eWB.genericTypeSignature())); + + + // Repair the bound + // e.g. If the bound for the wildcard is a typevariable, e.g. '? extends E' then // the type variable in the unresolvedtype will be correct only in name. In that // case let's set it correctly based on the one in the eclipse WildcardBinding + UnresolvedType theBound = null; if (eWB.bound instanceof TypeVariableBinding) { - UnresolvedType tVar = fromTypeVariableBinding((TypeVariableBinding)eWB.bound); - if (ut.isGenericWildcard() && ut.isSuper()) ut.setLowerBound(tVar); - if (ut.isGenericWildcard() && ut.isExtends()) ut.setUpperBound(tVar); + theBound = fromTypeVariableBinding((TypeVariableBinding)eWB.bound); + } else { + theBound = fromBinding(eWB.bound); } - return ut; + if (theType.isGenericWildcard() && theType.isSuper()) theType.setLowerBound(theBound); + if (theType.isGenericWildcard() && theType.isExtends()) theType.setUpperBound(theBound); + return theType; } if (binding instanceof ParameterizedTypeBinding) { |