Skip to content

Ensure the Bool overload of __checkBinaryOperation() is still preferred. #797

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

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Nov 2, 2024

We noticed that in some conditions, boolean arguments to #expect() would compile to use the optional overload of __checkBinaryOperation(), which would result in a pass when a failure should have occurred because the boolean value never evaluated to nil. This PR should resolve that issue.

Resolves rdar://138964155.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

…ferred.

We noticed that in some conditions, boolean arguments to `#expect()` would
compile to use the _optional_ overload of `__checkBinaryOperation()`, which
would result in a pass when a failure should have occurred because the boolean
value never evaluated to `nil`. This PR should resolve that issue.

Resolves rdar://138964155.
@grynspan grynspan added bug 🪲 Something isn't working issue-handling Related to Issue handling within the testing library labels Nov 2, 2024
@grynspan grynspan added this to the Swift 6.1 milestone Nov 2, 2024
@grynspan grynspan self-assigned this Nov 2, 2024
@grynspan
Copy link
Contributor Author

grynspan commented Nov 2, 2024

@swift-ci test

@grynspan
Copy link
Contributor Author

grynspan commented Nov 2, 2024

@swift-ci test Windows

Copy link
Contributor

@briancroom briancroom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and new test!

@grynspan grynspan merged commit 73d4948 into main Nov 3, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/138964155-wrong-overload branch November 3, 2024 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working issue-handling Related to Issue handling within the testing library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants