@@ -3710,8 +3710,7 @@ static bool diagnoseConflictingGenericArguments(ConstraintSystem &cs,
3710
3710
llvm::SmallDenseMap<TypeVariableType *,
3711
3711
std::pair<GenericTypeParamType *, SourceLoc>, 4 >
3712
3712
genericParams;
3713
- // Consider only representative type variables shared across
3714
- // all of the solutions.
3713
+ // Consider all representative type variables across all solutions.
3715
3714
for (auto &solution : solutions) {
3716
3715
for (auto &typeBinding : solution.typeBindings ) {
3717
3716
auto *typeVar = typeBinding.first ;
@@ -3748,10 +3747,9 @@ static bool diagnoseConflictingGenericArguments(ConstraintSystem &cs,
3748
3747
for (const auto &solution : solutions) {
3749
3748
auto type = solution.typeBindings .lookup (typeVar);
3750
3749
// Type variables gathered from a solution's type binding context may not
3751
- // exist in another given solution because each solution could have a
3752
- // different set of overload choices picked, which implies that some of
3753
- // the generic parameters, and type variables that represent them, would
3754
- // be unique to that solution.
3750
+ // exist in another given solution because some solutions may have
3751
+ // additional type variables not present in other solutions due to taking
3752
+ // different paths in the solver.
3755
3753
if (!type)
3756
3754
continue ;
3757
3755
0 commit comments