mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Return type in the closure signature is often redundant when expanding placeholders, because the type of the clossures are usually inferred from the context (i.e. calling function), users don't need to write the return type explicitly. They are not only redundant, but also sometimes harmful when the return type is a generic parameter or its requirement. Actually, there is no correct spelling in such cases. So omit the return type and the parentheses around the parameter clause. rdar://problem/63607976
3.5 KiB
3.5 KiB