Skip to content

Commit cb64d7f

Browse files
committed
[ConstraintSystem] Fix build failures.
1 parent 34fa9c2 commit cb64d7f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

lib/Sema/CSStep.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,6 @@ bool DisjunctionStep::shortCircuitDisjunctionAt(
664664
currentChoice->getOverloadChoice().getDecl()->isOperator() &&
665665
lastSuccessfulChoice->getKind() == ConstraintKind::BindOverload &&
666666
lastSuccessfulChoice->getOverloadChoice().getDecl()->isOperator()) {
667-
return true;
668-
}
669667

670668
// If we have a SIMD operator, and the prior choice was not a SIMD
671669
// Operator, we're done.
@@ -690,14 +688,14 @@ bool DisjunctionStep::shortCircuitDisjunctionAt(
690688
continue;
691689

692690
auto choiceTyvar =
693-
CS.getType(simplifyLocatorToAnchor(CS, overload.getFirst()))
691+
CS.getType(simplifyLocatorToAnchor(overload.getFirst()))
694692
->getAs<TypeVariableType>();
695693
if (!choiceTyvar)
696694
continue;
697695

698696
auto rep = CS.getRepresentative(choiceTyvar);
699697
if (lastRep != rep) {
700-
CS.mergeEquivalenceClasses(rep, lastRep);
698+
CS.mergeEquivalenceClasses(rep, lastRep, /*updateWorkList=*/false);
701699
lastRep = CS.getRepresentative(lastRep);
702700
}
703701
}

lib/Sema/CSStep.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,12 +711,12 @@ class DisjunctionStep final : public BindingStep<DisjunctionChoiceProducer> {
711711
if (!repr || repr == typeVar)
712712
return;
713713

714-
for (auto *resolved = getResolvedOverloads(); resolved;
715-
resolved = resolved->Previous) {
716-
if (!resolved->BoundType->isEqual(repr))
714+
for (auto overload : CS.getResolvedOverloads()) {
715+
auto resolved = overload.second;
716+
if (!resolved.boundType->isEqual(repr))
717717
continue;
718718

719-
auto &representative = resolved->Choice;
719+
auto &representative = resolved.choice;
720720
if (!representative.isDecl())
721721
return;
722722

0 commit comments

Comments
 (0)