]> source.dussan.org Git - aspectj.git/commitdiff
231396: Switch to new UnresolvedType for wildcards
authoraclement <aclement>
Fri, 30 May 2008 17:18:18 +0000 (17:18 +0000)
committeraclement <aclement>
Fri, 30 May 2008 17:18:18 +0000 (17:18 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java

index f00b0b27712201b5c82a01a3c14dbe7ffbbfc8de..5bb89b4782589a5f81a6de2c7e94708e9fd2978c 100644 (file)
@@ -71,6 +71,7 @@ import org.aspectj.weaver.TypeVariableDeclaringElement;
 import org.aspectj.weaver.TypeVariableReference;
 import org.aspectj.weaver.UnresolvedType;
 import org.aspectj.weaver.UnresolvedTypeVariableReferenceType;
+import org.aspectj.weaver.WildcardedUnresolvedType;
 import org.aspectj.weaver.World;
 import org.aspectj.weaver.UnresolvedType.TypeKind;
 
@@ -223,9 +224,6 @@ public class EclipseFactory {
                
                if (binding instanceof WildcardBinding) {
                        WildcardBinding eWB = (WildcardBinding) binding;
-                       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
@@ -236,8 +234,12 @@ public class EclipseFactory {
                        } else {
                                theBound = fromBinding(eWB.bound);
                        }
-                       if (theType.isGenericWildcard() && theType.isSuper()) theType.setLowerBound(theBound);
-                       if (theType.isGenericWildcard() && theType.isExtends()) theType.setUpperBound(theBound);
+            // if (eWB.boundKind == WildCard.SUPER) {
+            //
+            // }
+            WildcardedUnresolvedType theType = (WildcardedUnresolvedType) TypeFactory.createTypeFromSignature(CharOperation.charToString(eWB.genericTypeSignature()));
+            // if (theType.isGenericWildcard() && theType.isSuper()) theType.setLowerBound(theBound);
+            // if (theType.isGenericWildcard() && theType.isExtends()) theType.setUpperBound(theBound);
                        return theType;
                }