Normally, when passing a closure as the only argument in a function call, you can move the closure outside the argument list and then discard the empty argument list. However, using Xcode 11.4.1, in this code
init?(id: String) {
guard id.allSatisfy { $0.isASCII } else {return nil }
I get the error messages
Cannot convert value of type '((String.Element) throws -> Bool) throws -> Bool' (aka '((Character) throws -> Bool) throws -> Bool') to expected condition type 'Bool'
Expected 'else' after 'guard' condition
Anonymous closure argument not contained in a closure
If I put parentheses around the closure, turning it back into an ordinary argument, the compiler is happy.
Is this some language restriction I'm not familiar with?