Skip to content

Commit e2b4759

Browse files
committed
[ConstraintSystem] getExpressionTooComplex should check the flag before computing anything
1 parent 03fab67 commit e2b4759

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5450,6 +5450,9 @@ class ConstraintSystem {
54505450
}
54515451

54525452
bool getExpressionTooComplex(SmallVectorImpl<Solution> const &solutions) {
5453+
if (isExpressionAlreadyTooComplex)
5454+
return true;
5455+
54535456
size_t solutionMemory = 0;
54545457
for (auto const& s : solutions) {
54555458
solutionMemory += s.getTotalMemory();

0 commit comments

Comments
 (0)