Skip to content

Commit 4ad93dc

Browse files
committed
Sema: Check worseThanBestSolution() in a better place
1 parent fca570c commit 4ad93dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/CSStep.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ StepResult ComponentStep::take(bool prevFailed) {
319319
// One of the previous components created by "split"
320320
// failed, it means that we can't solve this component.
321321
if ((prevFailed && DependsOnPartialSolutions.empty()) ||
322-
CS.isTooComplex(Solutions))
322+
CS.isTooComplex(Solutions) || CS.worseThanBestSolution())
323323
return done(/*isSuccess=*/false);
324324

325325
// Setup active scope, only if previous component didn't fail.
@@ -924,6 +924,7 @@ StepResult ConjunctionStep::resume(bool prevFailed) {
924924

925925
// Rewind back the constraint system information.
926926
ActiveChoice.reset();
927+
//restoreBestScore();
927928

928929
if (CS.isDebugMode())
929930
getDebugLogger() << ")\n";

0 commit comments

Comments
 (0)