stricter equality condition for typeParams

This commit is contained in:
Florian Steurer 2015-11-13 22:49:26 +01:00
parent fb82d8c3eb
commit fd5902f6dd
2 changed files with 9 additions and 3 deletions

View File

@ -8,7 +8,7 @@ public final class ExtendsType extends Type {
private Type extendedType;
public ExtendsType(Type extendedType) {
super("? extends " + extendedType.getTypeParams(), extendedType.getTypeParams());
super("? extends " + extendedType.getName(), extendedType.getTypeParams());
this.extendedType = extendedType;
}

View File

@ -61,8 +61,14 @@ public final class TypeParams implements Iterable<Type>{
TypeParams other = (TypeParams) obj;
// TODO
return other.size() == this.size();
if(other.size() != this.size())
return false;
for(int i = 0; i < this.size(); i++)
if(!(this.get(i).equals(other.get(i))))
return false;
return true;
}
}