Skip to content
New issue

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

[SR-7488] [Bool].reduce can't work with && simply #50031

Closed
swift-ci opened this issue Apr 20, 2018 · 1 comment
Closed

[SR-7488] [Bool].reduce can't work with && simply #50031

swift-ci opened this issue Apr 20, 2018 · 1 comment
Labels
compiler The Swift compiler in itself improvement

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-7488
Radar rdar://problem/21786778
Original Reporter nuomi1 (JIRA User)
Type Improvement
Status Resolved
Resolution Duplicate
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
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
@AnnaZaks
Copy link
Mannequin

AnnaZaks mannequin commented Apr 26, 2018

cc @rudkx

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself improvement
Projects
None yet
Development

No branches or pull requests

1 participant