Skip to content

Commit

Permalink
Fix testTypeParameterConstructors04 and others
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Stryker <stryker@redhat.com>
  • Loading branch information
Rob Stryker committed Nov 25, 2024
1 parent ec651f9 commit 1ad70d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,13 @@ public String getName(boolean checkParameterized) {
ITypeBinding[] types = this.getUncheckedTypeArguments(this.type, this.typeSymbol);
if (types != null && types.length > 0) {
builder.append("<");
for (var typeArgument : types) {
if (typeArgument != null) {
builder.append(typeArgument.getName());
for (int z = 0; z < types.length; z++ ) {
ITypeBinding zBinding = types[z];
if (zBinding != null) {
builder.append(zBinding.getName());
if( z != types.length - 1) {
builder.append(",");
}
}
}
builder.append(">");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ protected int matchTypeParameter(ITypeBinding variable, boolean matchName) {
if (methBinding.getParameterTypes() == null) {
if (length == 0) return ACCURATE_MATCH;
} else if (methBinding.getParameterTypes().length == length){
ITypeBinding[] p = methBinding.getParameterTypes();
for (int i=0; i<length; i++) {
if (!matchesName(methBinding.getParameterTypes()[i].getName().toCharArray(), this.pattern.methodArgumentTypes[i])) {
if (!matchesName(this.pattern.methodArgumentTypes[i], p[i].getName().toCharArray())) {
return IMPOSSIBLE_MATCH;
}
}
Expand Down

0 comments on commit 1ad70d1

Please sign in to comment.