Skip to content

Commit e3ea597

Browse files
committed
[CSSyntacticElement] Correctly determine whether body is a "single expression"
Result builder transformed bodies are always multi-statement. Resolves: #63264
1 parent bebd0d0 commit e3ea597

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Sema/CSSyntacticElement.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2396,7 +2396,10 @@ bool ConstraintSystem::applySolutionToBody(Solution &solution,
23962396
if (!body || application.hadError)
23972397
return true;
23982398

2399-
fn.setTypecheckedBody(cast<BraceStmt>(body), fn.hasSingleExpressionBody());
2399+
fn.setTypecheckedBody(cast<BraceStmt>(body),
2400+
solution.getAppliedBuilderTransform(fn)
2401+
? false
2402+
: fn.hasSingleExpressionBody());
24002403
return false;
24012404
}
24022405

0 commit comments

Comments
 (0)