浏览代码

test and fix for 171952: method overriding with ITD using generic return values

tags/Root_extensions
aclement 17 年前
父节点
当前提交
bce642eed8
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      weaver/src/org/aspectj/weaver/ReferenceType.java

+ 5
- 1
weaver/src/org/aspectj/weaver/ReferenceType.java 查看文件

@@ -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));

正在加载...
取消
保存