Skip to content

[Gardening] Simplify excessive conditional expression: (A && !B) || (!A && B) is equivalent to bool(A) != bool(B) #62721

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
Jan 25, 2023

Conversation

valeriyvan
Copy link
Contributor

No description provided.

@stephentyrone
Copy link
Contributor

@swift-ci test

@stephentyrone
Copy link
Contributor

@swift-ci test macOS

@valeriyvan
Copy link
Contributor Author

ping

@AnthonyLatsis AnthonyLatsis requested a review from hborla January 24, 2023 15:35
@AnthonyLatsis AnthonyLatsis added compiler The Swift compiler itself gardening labels Jan 24, 2023
@AnthonyLatsis
Copy link
Collaborator

@valeriyvan "Refactoring" refers a source tooling library and will be misinterpreted. Could you use "Gardening" instead in the commit message?

@valeriyvan valeriyvan changed the title [Refactoring] Simplify excessive conditional expression: (A && !B) || (!A && B) is equivalent to bool(A) != bool(B) [Gardening] Simplify excessive conditional expression: (A && !B) || (!A && B) is equivalent to bool(A) != bool(B) Jan 24, 2023
Copy link
Member

@hborla hborla left a comment

Choose a reason for hiding this comment

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

Heh, oops. Thanks for the simplification!

@AnthonyLatsis
Copy link
Collaborator

Could you use "Gardening" instead in the commit message?

Apparently you edited the pull request title, not the commit message.

…!A && B) is equivalent to bool(A) != bool(B)
@valeriyvan valeriyvan force-pushed the RequirementMachineRequests branch from a112cac to f3e7407 Compare January 25, 2023 14:59
@valeriyvan
Copy link
Contributor Author

Could you use "Gardening" instead in the commit message?

Apparently you edited the pull request title, not the commit message.

Edited commit message as well.

@AnthonyLatsis
Copy link
Collaborator

@swift-ci please smoke test and merge

@AnthonyLatsis AnthonyLatsis self-assigned this Jan 25, 2023
@AnthonyLatsis AnthonyLatsis added the type checker Area → compiler: Semantic analysis label Jan 25, 2023
@swift-ci swift-ci merged commit cfa0d63 into swiftlang:main Jan 25, 2023
@AnthonyLatsis AnthonyLatsis removed their assignment Jan 25, 2023
@valeriyvan valeriyvan deleted the RequirementMachineRequests branch January 26, 2023 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler itself gardening type checker Area → compiler: Semantic analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants