File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -2251,6 +2251,7 @@ class ConstraintSystem {
2251
2251
friend class SplitterStep ;
2252
2252
friend class ComponentStep ;
2253
2253
friend class TypeVariableStep ;
2254
+ friend class DisjunctionStep ;
2254
2255
friend class ConjunctionStep ;
2255
2256
friend class ConjunctionElement ;
2256
2257
friend class RequirementFailure ;
@@ -2402,6 +2403,10 @@ class ConstraintSystem {
2402
2403
// / the current constraint system.
2403
2404
llvm::MapVector<ConstraintLocator *, unsigned > DisjunctionChoices;
2404
2405
2406
+ // / The stack of all disjunctions selected during current path in order.
2407
+ // / This stack is managed by the \c DisjunctionStep.
2408
+ llvm::SmallVector<Constraint *, 4 > SelectedDisjunctions;
2409
+
2405
2410
// / A map from applied disjunction constraints to the corresponding
2406
2411
// / argument function type.
2407
2412
llvm::SmallMapVector<ConstraintLocator *, const FunctionType *, 4 >
Original file line number Diff line number Diff line change @@ -653,6 +653,7 @@ class DisjunctionStep final : public BindingStep<DisjunctionChoiceProducer> {
653
653
assert (Disjunction->getKind () == ConstraintKind::Disjunction);
654
654
pruneOverloadSet (Disjunction);
655
655
++cs.solverState ->NumDisjunctions ;
656
+ cs.SelectedDisjunctions .push_back (Disjunction);
656
657
}
657
658
658
659
~DisjunctionStep () override {
@@ -663,6 +664,8 @@ class DisjunctionStep final : public BindingStep<DisjunctionChoiceProducer> {
663
664
// Re-enable previously disabled overload choices.
664
665
for (auto *choice : DisabledChoices)
665
666
choice->setEnabled ();
667
+
668
+ CS.SelectedDisjunctions .pop_back ();
666
669
}
667
670
668
671
StepResult resume (bool prevFailed) override ;
You can’t perform that action at this time.
0 commit comments