forked from JavaTX/JavaCompilerCore
Fix type variable being declared twice
This commit is contained in:
parent
aa9782edd7
commit
e231cf722b
@ -116,6 +116,8 @@ public class ASTToTargetAST {
|
||||
}
|
||||
return false;
|
||||
});
|
||||
} else if (input.stream().anyMatch(p -> p.getLeft().equals(pair.getLeft()))) {
|
||||
return;
|
||||
}
|
||||
|
||||
input.add(pair);
|
||||
@ -605,14 +607,14 @@ public class ASTToTargetAST {
|
||||
if (left.equals(tph)) {
|
||||
var pair = new PairTPHsmallerTPH(tph, right);
|
||||
if (!generics.contains(pair)) {
|
||||
generics.add(pair);
|
||||
addToPairs(generics, pair);
|
||||
findAllBounds(right, generics, equality);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
generics.add(new PairTPHequalRefTypeOrWildcardType(tph, OBJECT));
|
||||
addToPairs(generics, new PairTPHequalRefTypeOrWildcardType(tph, OBJECT));
|
||||
} else if (type instanceof RefType refType) {
|
||||
refType.getParaList().forEach(t -> findAllBounds(t, generics, equality));
|
||||
}
|
||||
@ -663,7 +665,6 @@ public class ASTToTargetAST {
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println(input);
|
||||
}
|
||||
|
||||
void findTphs(RefTypeOrTPHOrWildcardOrGeneric type, Set<TypePlaceholder> tphs, Map<TypePlaceholder, TypePlaceholder> equality) {
|
||||
|
Loading…
Reference in New Issue
Block a user