SE-0286: Forward Scan for Trailing Closures

Mmm, this is interesting, and I’m not sure I’d appreciated that. Currently, Any works with trailing closure syntax:

func f(_ x: Any) -> String { "Hello, \(x)!" }
print(f { "World" })
// “Hello, (Function)!”

Unless there’s a compelling reason, I don’t know that we should break that, and I’m not sure it’s touched on in the proposal.

1 Like