Skip to content

Commit aabe7c2

Browse files
committed
[ConstraintSystem] In selectDisjunction, bail early if we find no disjunctions.
1 parent b8cb40b commit aabe7c2

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
@@ -1938,6 +1938,9 @@ Constraint *ConstraintSystem::selectDisjunction() {
19381938
SmallVector<Constraint *, 4> disjunctions;
19391939

19401940
collectDisjunctions(disjunctions);
1941+
if (disjunctions.empty())
1942+
return nullptr;
1943+
19411944
if (auto *disjunction = selectBestBindingDisjunction(*this, disjunctions))
19421945
return disjunction;
19431946

0 commit comments

Comments
 (0)