You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler should always pick the initializer with the more specific type, which in this case is the "action" one, rather than being ambiguous. You're right that the current behavior is broken; it seems to be fixed ("You passed action: 42") in master.
Environment
Tested on Swift version 4.0.1
Additional Detail from JIRA
md5: 113ccc05cc7b9c5abec81c7174801c92
Issue Description:
Consider this example
Compiler will behave the same for non-generic class with generic initializer
Actual Results:
Compiler resolves V as closure (Function)
Compiler decides to apply trailing closure syntax rule
Compiler chooses `init(value: ()->Int)` and then it allows using trailing syntax by omitting value parameter
Expected Results
The text was updated successfully, but these errors were encountered: