@@ -858,12 +858,25 @@ class ConjunctionStep : public BindingStep<ConjunctionElementProducer> {
858
858
// / system step before conjunction step.
859
859
Optional<SolverSnapshot> Snapshot;
860
860
861
+ // / A set of previously deduced solutions. This is used upon
862
+ // / successful solution of an isolated conjunction to introduce
863
+ // / all of the inferred information back into the outer context.
864
+ SmallVectorImpl<Solution> &OuterSolutions;
865
+
866
+ // / Solutions produced while attempting elements of an isolated conjunction.
867
+ // /
868
+ // / Note that this is what `BindingStep` is initialized with
869
+ // / in isolated mode.
870
+ SmallVector<Solution, 4 > IsolatedSolutions;
871
+
861
872
public:
862
873
ConjunctionStep (ConstraintSystem &cs, Constraint *conjunction,
863
874
SmallVectorImpl<Solution> &solutions)
864
- : BindingStep(cs, {cs, conjunction}, solutions),
875
+ : BindingStep(cs, {cs, conjunction},
876
+ conjunction->isIsolated () ? IsolatedSolutions : solutions),
865
877
BestScore(getBestScore()), CurrentScore(getCurrentScore()),
866
- Conjunction (conjunction), AfterConjunction(erase(conjunction)) {
878
+ Conjunction(conjunction), AfterConjunction(erase(conjunction)),
879
+ OuterSolutions(solutions) {
867
880
assert (conjunction->getKind () == ConstraintKind::Conjunction);
868
881
869
882
// Make a snapshot of the constraint system state before conjunction.
0 commit comments