C#: Remove expanded assignments.#21452
Draft
michaelnebel wants to merge 9 commits intogithub:mainfrom
Draft
Conversation
c94de85 to
1d8d712
Compare
abb75be to
5021ea9
Compare
adc3882 to
41fef59
Compare
…se operations are operator calls.
…o extend OperatorCall and add AssignOperation classes.
…ct expanded assignments.
…nments (those that was previously covered by expanded assignments).
…ove hack that rotates children of assignments.
41fef59 to
07144c2
Compare
Contributor
Author
|
@hvitved : I would really appreciate a review of this PR even though it is still in draft mode. The PR still needs upgrade/downgrade scripts and more DCA runs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has two goals, primarily to avoid making multiple upgrade/downgrade scripts:
a += b, it would synthesizea = a + b.Review on a commit-by-commit basis is encouraged.
Implementation notes
a += b(e.g., whenaandbare int) as an operator call, since it implicitly invokes the user-defined static operator onInt32.??=as the null-coalescing operator is a built-in short-circuit like operation.AddOperation, which can represent eithera + bora += b).DCA notes
cs/unsynchronized-getteris due to removal of a false positive: the query did not properly account for expanded assignments.cs/web/xsslooks acceptable: one alert is removed, but it is essentially a shorter path to the same underlying alert (which is here)cs/useless-upcastlook acceptable.