We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 4.2
XCode 10
md5: 020949e93fb879241aa7d36764f82f7d
relates to:
Issue Description:
class AClass { var add: (Int) -> Int { return { num in return num + 1 } } func add(_ num: Int) -> Int { return num + 20 } }
Now in some other place I have this code:
let a = AClass() print(a.add(1))
I have run this code, and the result is 2 (which means the variable's block is called).
So here are the questions:
The text was updated successfully, but these errors were encountered:
You can get to the function by referring to it by full name in this case…
let add = a.add(_:) print(add(1))
…but that's not a good general answer.
Sorry, something went wrong.
No branches or pull requests
Environment
Swift 4.2
XCode 10
Additional Detail from JIRA
md5: 020949e93fb879241aa7d36764f82f7d
relates to:
Issue Description:
Now in some other place I have this code:
I have run this code, and the result is 2 (which means the variable's block is called).
So here are the questions:
The text was updated successfully, but these errors were encountered: