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

Do not remove parentheses from arithmetic ops in 'checked' contexts #59552

Merged
merged 9 commits into from
Feb 18, 2022

Conversation

CyrusNajmabadi
Copy link
Member

Fixes #45100

arithmatic in checked contexts can overflow/underflow. ensure we leave necessary parens in to prevent teh order of operations changing which could cause that to happen.

@CyrusNajmabadi CyrusNajmabadi merged commit d868da8 into dotnet:main Feb 18, 2022
@ghost ghost added this to the Next milestone Feb 18, 2022
@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P2 Mar 1, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the removeParensOverflow branch May 3, 2022 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive for IDE0047: Parentheses can be removed
4 participants