Remove duplicate type variables

This commit is contained in:
Victorious3 2022-08-26 16:05:59 +02:00
parent 6fb329ae1a
commit b0c1d5d96d

View File

@ -411,6 +411,15 @@ public class ASTToTargetAST {
}
}
} while (foundInfima);
// Remove duplicate bounds
for (var pair : new HashSet<>(input)) {
if (pair instanceof PairTPHequalRefTypeOrWildcardType) {
if (input.stream().anyMatch(p -> p instanceof PairTPHsmallerTPH && p.getLeft().equals(pair.getLeft()))) {
input.remove(pair);
}
}
}
}
TargetType get(TypePlaceholder tph) {