]> source.dussan.org Git - aspectj.git/commitdiff
avoid losing type variable information when resolving bindings
authoracolyer <acolyer>
Wed, 13 Jul 2005 13:04:03 +0000 (13:04 +0000)
committeracolyer <acolyer>
Wed, 13 Jul 2005 13:04:03 +0000 (13:04 +0000)
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java

index 4361032771d301328461132e2c86c940686e603d..8f67b446646643b085a0849ca79697a877494513 100644 (file)
@@ -519,8 +519,12 @@ public class WildTypePattern extends TypePattern {
                        // Only if the type is exact *and* the type parameters are exact should we create an 
                        // ExactTypePattern for this WildTypePattern                                    
                        if (typeParameters.areAllExact()) {
-                               String[] typeParamCleanNames = typeParameters.maybeGetCleanNames();
-                               TypeX tx = TypeX.forParameterizedTypeNames(rawType.getName(),typeParamCleanNames);
+                               TypePattern[] typePats = typeParameters.getTypePatterns();
+                               TypeX[] typeParameterTypes = new TypeX[typePats.length];
+                               for (int i = 0; i < typeParameterTypes.length; i++) {
+                                       typeParameterTypes[i] = ((ExactTypePattern)typePats[i]).getExactType();
+                               }
+                               TypeX tx = TypeX.forParameterizedTypes(rawType,typeParameterTypes);
                                TypeX type = scope.getWorld().resolve(tx,true); 
                                if (dim != 0) type = TypeX.makeArray(type, dim);
                                ret = new ExactTypePattern(type,includeSubtypes,isVarArgs);