diff options
author | aclement <aclement> | 2005-11-01 09:40:05 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-01 09:40:05 +0000 |
commit | 70d2064e2c213077717844d66fedec4b2d7b9591 (patch) | |
tree | ab6ed4d4014db09f4e4bc769bff692444fb772a7 /weaver/src | |
parent | 4dfd580d0a6c5c6d67b52b262c0c455a8951027e (diff) | |
download | aspectj-70d2064e2c213077717844d66fedec4b2d7b9591.tar.gz aspectj-70d2064e2c213077717844d66fedec4b2d7b9591.zip |
modified type parameter check to allow co-dependent generic declare parents to work. not quite right but a little better.
Diffstat (limited to 'weaver/src')
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java index 6a29148c7..b76a1f6af 100644 --- a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java @@ -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(); |