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-12365] error: '(Bool, Bool) -> Bool' is not convertible to '(Bool, @autoclosure () throws -> Bool) -> Bool' when parsing a simple boolean expression #54799

Closed
swift-ci opened this issue Mar 13, 2020 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-12365
Radar rdar://60438231
Original Reporter aulanov (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee aulanov (JIRA)
Priority Medium

md5: 77f2eb6938432913009131a17185755f

Issue Description:

When compiling the attached code snippet with 5.1.4 I'm getting this error:

/Users/aulanov/src/NotEqual/Sources/NotEqual/NotEqual.swift:25:19: error: '(Bool, Bool) -> Bool' is not convertible to '(Bool, @autoclosure () throws -> Bool) -> Bool'
return a ![](= 0 && b )= 0

In 5.2-DEVELOPMENT-SNAPSHOT-2020-03-12-a the error is different:

/Users/aulanov/src/NotEqual/Sources/NotEqual/NotEqual.swift:15:14: error: binary operator '!=' cannot be applied to operands of type 'Double' and 'Int'
return a ![](= 0 && b )= 0

The issue goes away when I replace a![](=0 with a)=0.0

@kevints
Copy link
Mannequin

kevints mannequin commented Mar 14, 2020

@swift-ci create

@hborla
Copy link
Member

hborla commented Jul 23, 2020

This is fixed on master with #33060

Could you please verify using the next development snapshot from https://swift.org/download/#snapshots ? Thank you!

@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
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

2 participants