swift
f5c007a3 - [Sema] Avoid forming double braced single expression closures

Commit
2 years ago
[Sema] Avoid forming double braced single expression closures For a single expression closure, just use the expression as the body in the case where we're coercing to Void, as the return is already implied. This avoids crashing in `ClosureExpr::getSingleExpressionBody` with a double braced body. Surprisingly it seems nothing is currently calling `ClosureExpr::getSingleExpressionBody` after type-checking, so no test case, but later commits in this patch will exercise this case.
Author
Committer
Parents
Loading