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
SR-1570 'Generic parameter 'Result' could not be inferred' compiler error for wrapper functions like autoreleasepool that return the result of their closure argument.
Issue Description:
Show the code:
classPhone {
// numbers inferred as [Int], works finevarnumbers = { [0, 1, 2] }()
// compiler complains of type inferring// unless the type is specified: var table : [Int] = { ...vartable = {
vardummy = 0return [0, 1, 2]
}()
}
The text was updated successfully, but these errors were encountered:
Following the links, I can see it's a trade-off decision.
Yet developers keep complaining about multi-statement closure return type inferring, will there be any chance supporting it in the future?
I won't say it's never going to happen, but it's a pretty big redesign, and I don't think it's the thing to focus on when we already have strong and non-trivial goals for Swift 3 and Swift 4.
Additional Detail from JIRA
md5: 6acd7cb4eab890acede87fb94da6cb28
duplicates:
Issue Description:
Show the code:
The text was updated successfully, but these errors were encountered: