]> source.dussan.org Git - aspectj.git/commitdiff
test and fix for 171952: method overriding with ITD using generic return values
authoraclement <aclement>
Wed, 7 Feb 2007 09:13:13 +0000 (09:13 +0000)
committeraclement <aclement>
Wed, 7 Feb 2007 09:13:13 +0000 (09:13 +0000)
weaver/src/org/aspectj/weaver/ReferenceType.java

index e93db655aef665f12f49abb45948e19fb3b30c25..31313cad8fc394dc3f69c3da77770f8267bf78f0 100644 (file)
@@ -314,6 +314,9 @@ public class ReferenceType extends ResolvedType {
                                if (myParameters.length == theirParameters.length) {
                                        for (int i = 0; i < myParameters.length; i++) {
                                                if (myParameters[i] == theirParameters[i]) continue;
+                                               if (myParameters[i].isAssignableFrom(theirParameters[i],allowMissing)) {
+                                                       continue;
+                                               }
                                                if (!myParameters[i].isGenericWildcard()) {
                                                        parametersAssignable = false;
                                                        break;
@@ -340,7 +343,8 @@ public class ReferenceType extends ResolvedType {
                if (other.isTypeVariableReference()) {
                        TypeVariableReferenceType otherType = (TypeVariableReferenceType) other;
                        if (this instanceof TypeVariableReference) {
-                               return ((TypeVariableReference)this).getTypeVariable()==otherType.getTypeVariable();
+                               return ((TypeVariableReference)this).getTypeVariable().canBeBoundTo(otherType.getTypeVariable().getFirstBound().resolve(world));// pr171952
+//                             return ((TypeVariableReference)this).getTypeVariable()==otherType.getTypeVariable();
                        } else {
                            // FIXME asc should this say canBeBoundTo??
                                return this.isAssignableFrom(otherType.getTypeVariable().getFirstBound().resolve(world));