diff --git a/lib/Sema/CSSyntacticElement.cpp b/lib/Sema/CSSyntacticElement.cpp index 55948351def78..59a78df6ca33d 100644 --- a/lib/Sema/CSSyntacticElement.cpp +++ b/lib/Sema/CSSyntacticElement.cpp @@ -2396,7 +2396,10 @@ bool ConstraintSystem::applySolutionToBody(Solution &solution, if (!body || application.hadError) return true; - fn.setTypecheckedBody(cast(body), fn.hasSingleExpressionBody()); + fn.setTypecheckedBody(cast(body), + solution.getAppliedBuilderTransform(fn) + ? false + : fn.hasSingleExpressionBody()); return false; }