Open davedelong opened 4 years ago
I just found that this limitation is under the "Future Directions" part of the original proposal: https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md#implicit-conversions-to-function
@swift-ci create
@grynspan I actually just ran into this trying to pass a Testing.Confirmation
instance directly to a function that expected a closure.
Okay?
Environment
Xcode 11.4 beta 1 on macOS Catalina 10.15.3Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 18260971602ef5ab0897e8edc3b45ff0Issue Description:
I was disappointed to find out that this doesn't work:
Since the syntax for invoking a function/closure is the same syntax as invoking a type that has a
callAsFunction
method, I should be able to use acallAsFunction
type anywhere I can use a closure.