-
Notifications
You must be signed in to change notification settings - Fork 1.8k
C++/C#/JS/Python: Replace 'if p() then q() else none()' with a conjunction #6865
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disagree on fixing the cases nested inside another else
.
2390883
to
bdc54bc
Compare
I've removed the results that @aschackmull didn't like and force-pushed the new changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but this should probably get a quick review from each language team.
@MathiasVP dismissed @aschackmull's review as his requested changes have been applied |
Thanks a lot! Since all the C# changes are in code related to the IR I'll merge this without waiting on their explicit approval. |
The pattern
if p() then q() else none()
is equivalent top() and q()
. Likewise, the patternif p() then none() else q()
is equivalent tonot p() and q()
.