Skip to content

Commit 6ade7c1

Browse files
authored
Merge pull request swiftlang#18523 from rudkx/bail-early
[ConstraintSystem] In selectDisjunction, bail early if we find no dis…
2 parents df923d9 + aabe7c2 commit 6ade7c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,6 +1948,9 @@ Constraint *ConstraintSystem::selectDisjunction() {
19481948
SmallVector<Constraint *, 4> disjunctions;
19491949

19501950
collectDisjunctions(disjunctions);
1951+
if (disjunctions.empty())
1952+
return nullptr;
1953+
19511954
if (auto *disjunction = selectBestBindingDisjunction(*this, disjunctions))
19521955
return disjunction;
19531956

0 commit comments

Comments
 (0)