Skip to content

Commit fdbf98a

Browse files
[NFC] Clarify comments for SR-15843
1 parent 1218d7f commit fdbf98a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3710,8 +3710,7 @@ static bool diagnoseConflictingGenericArguments(ConstraintSystem &cs,
37103710
llvm::SmallDenseMap<TypeVariableType *,
37113711
std::pair<GenericTypeParamType *, SourceLoc>, 4>
37123712
genericParams;
3713-
// Consider only representative type variables shared across
3714-
// all of the solutions.
3713+
// Consider all representative type variables across all solutions.
37153714
for (auto &solution : solutions) {
37163715
for (auto &typeBinding : solution.typeBindings) {
37173716
auto *typeVar = typeBinding.first;
@@ -3748,10 +3747,9 @@ static bool diagnoseConflictingGenericArguments(ConstraintSystem &cs,
37483747
for (const auto &solution : solutions) {
37493748
auto type = solution.typeBindings.lookup(typeVar);
37503749
// 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.
37553753
if (!type)
37563754
continue;
37573755

0 commit comments

Comments
 (0)