Skip to content

Commit 18128ee

Browse files
committed
[CSClosure] Use rewritten expression when applying solution to a brace statement
It went un-noticed because currently only single-statement closures using this logic and their bodies are modeled as a single return statement.
1 parent c8e2dc1 commit 18128ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/CSClosure.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class ClosureConstraintApplication
181181
if (auto expr = node.dyn_cast<Expr *>()) {
182182
// Rewrite the expression.
183183
if (auto rewrittenExpr = rewriteExpr(expr))
184-
node = expr;
184+
node = rewrittenExpr;
185185
else
186186
hadError = true;
187187
} else if (auto stmt = node.dyn_cast<Stmt *>()) {

0 commit comments

Comments
 (0)