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
macOS 10.13.4
Xcode 9.3 (9E145)
Swift 4.1 (swiftlang-902.0.48 clang-902.0.37.1)
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Improvement
Assignee
None
Priority
Medium
md5: 78658e2f92e9d21a64028abd9c68c878
duplicates:
SR-1793 Type inference does not work with autoclosure
Issue Description:
let ints = [1, 2, 3]
let ia = ints.reduce(0, +) // OK
let ib = ints.reduce(0, { $0 + $1 }) // OK
let bools = [true, false]
let ba = bools.reduce(true, &&) // Cannot convert value of type '(Bool, @autoclosure () throws -> Bool) throws -> Bool' to expected argument type '(_, Bool) throws -> _'
let bb = bools.reduce(true, { $0 && $1 }) // OK
The text was updated successfully, but these errors were encountered:
Environment
macOS 10.13.4
Xcode 9.3 (9E145)
Swift 4.1 (swiftlang-902.0.48 clang-902.0.37.1)
Additional Detail from JIRA
md5: 78658e2f92e9d21a64028abd9c68c878
duplicates:
Issue Description:
The text was updated successfully, but these errors were encountered: