[CSOptimizer] Remove an outdated optimization to compare resolved argument types with all else equal

This is already accounted for by `determineBestChoicesInContext`
and reflected in the overall score, which means that we no longer
need to use this in vacuum.
This commit is contained in:
Pavel Yaskevich
2024-08-06 23:03:24 -07:00
parent c429f5b9ec
commit 1760bd1f1e
3 changed files with 0 additions and 23 deletions

View File

@@ -662,16 +662,9 @@ ConstraintSystem::selectDisjunction() {
unsigned firstFavored = favorings[first].size();
unsigned secondFavored = favorings[second].size();
// Everything else equal, choose the disjunction with the greatest
// number of resolved argument types. The number of resolved argument
// types is always zero for disjunctions that don't represent applied
// overloads.
if (firstFavored == secondFavored) {
if (firstActive != secondActive)
return firstActive < secondActive;
return first->countResolvedArgumentTypes(*this) >
second->countResolvedArgumentTypes(*this);
}
firstFavored = firstFavored ? firstFavored : firstActive;