We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc14f00 commit 9087613Copy full SHA for 9087613
lib/Sema/CSApply.cpp
@@ -6113,9 +6113,9 @@ static bool applyTypeToClosureExpr(ConstraintSystem &cs,
6113
if (auto CE = dyn_cast<ClosureExpr>(expr)) {
6114
cs.setType(CE, toType);
6115
6116
- // If this closure isn't type-checked in its enclosing expression, write
6117
- // the type into the ClosureExpr directly here, since the visitor won't.
6118
- if (!shouldTypeCheckInEnclosingExpression(CE))
+ // If solution application for this closure is delayed, let's write the
+ // type into the ClosureExpr directly here, since the visitor won't.
+ if (!CE->hasSingleExpressionBody())
6119
CE->setType(toType);
6120
6121
return true;
0 commit comments