Skip to content

Fix 'simplify conditional expression' with VB value equality#57487

Merged
CyrusNajmabadi merged 12 commits intodotnet:mainfrom
CyrusNajmabadi:negateConditional
Nov 1, 2021
Merged

Fix 'simplify conditional expression' with VB value equality#57487
CyrusNajmabadi merged 12 commits intodotnet:mainfrom
CyrusNajmabadi:negateConditional

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

@CyrusNajmabadi CyrusNajmabadi commented Oct 31, 2021

Fixes #57472

Should be reviewed as two separate commits.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner October 31, 2021 02:23
@ghost ghost added the Area-IDE label Oct 31, 2021
Else
Throw ExceptionUtilities.UnexpectedValue(negatedKind)
End If
End Function
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is the main part of the fix. In VB, when negating an equality expression, we defer to the original syntax to decide what to negate to. so = becomes <> and Is becomes IsNot (and vice versa).

Copy link
Copy Markdown
Member

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

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

Should be reviewed as two separate commits.

image

🤷‍♂️

@CyrusNajmabadi CyrusNajmabadi merged commit 78db81e into dotnet:main Nov 1, 2021
@ghost ghost added this to the Next milestone Nov 1, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the negateConditional branch November 1, 2021 20:15
@allisonchou allisonchou modified the milestones: Next, 17.1.P2 Nov 30, 2021
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.

Suggested change would break code

4 participants