Skip to content

Commit 73561e8

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSStep.cpp

Lines changed: 1 addition & 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.

0 commit comments

Comments
 (0)