]> source.dussan.org Git - aspectj.git/commitdiff
modified type parameter check to allow co-dependent generic declare parents to work...
authoraclement <aclement>
Tue, 1 Nov 2005 09:40:05 +0000 (09:40 +0000)
committeraclement <aclement>
Tue, 1 Nov 2005 09:40:05 +0000 (09:40 +0000)
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java

index 6a29148c7ab73b8e5d021cd477541bb75c86e1e2..b76a1f6af7ebaac33b88925750b94efdecd1fbc5 100644 (file)
@@ -911,7 +911,16 @@ public class WildTypePattern extends TypePattern {
                if (typeParameters.areAllExactWithNoSubtypesAllowed()) {
                        for (int i = 0; i < tvs.length; i++) {
                                UnresolvedType ut = typeParamPatterns[i].getExactType();
-                               if (!tvs[i].canBeBoundTo(ut.resolve(scope.getWorld()))) {
+                               boolean continueCheck = true;
+                               // FIXME asc dont like this but ok temporary measure.  If the type parameter 
+                               // is itself a type variable (from the generic aspect) then assume it'll be
+                               // ok... (see pr112105)  Want to break this? Run GenericAspectK test.
+                               if (ut.isTypeVariableReference()) {
+                                       continueCheck = false;
+                               }
+                               
+                               if (continueCheck &&    
+                                               !tvs[i].canBeBoundTo(ut.resolve(scope.getWorld()))) {
                                        // issue message that type parameter does not meet specification
                                        String parameterName = ut.getName();
                                        if (ut.isTypeVariableReference()) parameterName = ((TypeVariableReference)ut).getTypeVariable().getDisplayName();