@@ -880,21 +880,6 @@ bool ConjunctionStep::attempt(const ConjunctionElement &element) {
880880 CS.Timer .emplace (element.getLocator (), CS);
881881 }
882882
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-
898883 auto success = element.attempt (CS);
899884
900885 // If element attempt has failed, mark whole conjunction
@@ -906,9 +891,6 @@ bool ConjunctionStep::attempt(const ConjunctionElement &element) {
906891}
907892
908893StepResult ConjunctionStep::resume (bool prevFailed) {
909- // Restore the old ConstraintSystemOptions if 'attempt' modified them.
910- ModifiedOptions.reset ();
911-
912894 // Return from the follow-up splitter step that
913895 // attempted to apply information gained from the
914896 // isolated constraint to the outer context.
0 commit comments