mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
1.7 KiB
1.7 KiB