Open swift-ci opened 8 years ago
is duplicated by:
Issue Description:
General Swift cannot infer autoclosure when you apply a high order function, i.e.
func reduceBools(values: [Bool]) -> Bool { return values.reduce(false, combine: ||) }
Gives the error "Ambiguous reference to member '||'"
Expected results: Code compiles and works fine.
Related question on Swift forums today: https://forums.swift.org/t/adding-autoclosure-breaks-the-functions-usage/37738
Environment
Xcode 8.0 beta (8S128d) Playgrounds (Happens at least since Swift 2.0)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 2 | |Component/s | Compiler | |Labels | Bug, TypeChecker | |Assignee | None | |Priority | Medium | md5: a6cf52ed16f45c857930e752fd76c7b6is duplicated by:
Issue Description:
General Swift cannot infer autoclosure when you apply a high order function, i.e.
Gives the error "Ambiguous reference to member '||'"
Expected results: Code compiles and works fine.