@@ -880,21 +880,6 @@ bool ConjunctionStep::attempt(const ConjunctionElement &element) {
880
880
CS.Timer .emplace (element.getLocator (), CS);
881
881
}
882
882
883
- assert (!ModifiedOptions.has_value () &&
884
- " Previously modified options should have been restored in resume" );
885
- if (CS.isForCodeCompletion () &&
886
- !element.mightContainCodeCompletionToken (CS) &&
887
- !getLocator ()->isForSingleValueStmtConjunctionOrBrace ()) {
888
- ModifiedOptions.emplace (CS.Options );
889
- // If we know that this conjunction element doesn't contain the code
890
- // completion token, type check it in normal mode without any special
891
- // behavior that is intended for the code completion token.
892
- // Avoid doing this for SingleValueStmtExprs, because we can more eagerly
893
- // prune branches in that case, which requires us to detect the code
894
- // completion option while solving the conjunction.
895
- CS.Options -= ConstraintSystemFlags::ForCodeCompletion;
896
- }
897
-
898
883
auto success = element.attempt (CS);
899
884
900
885
// If element attempt has failed, mark whole conjunction
@@ -906,9 +891,6 @@ bool ConjunctionStep::attempt(const ConjunctionElement &element) {
906
891
}
907
892
908
893
StepResult ConjunctionStep::resume (bool prevFailed) {
909
- // Restore the old ConstraintSystemOptions if 'attempt' modified them.
910
- ModifiedOptions.reset ();
911
-
912
894
// Return from the follow-up splitter step that
913
895
// attempted to apply information gained from the
914
896
// isolated constraint to the outer context.
0 commit comments