Skip to content

Fix RCS1009's handling of discard designations.#1063

Merged
josefpihrt merged 6 commits intodotnet:mainfrom
jamesHargreaves12:fix/RCS1009
Apr 14, 2023
Merged

Fix RCS1009's handling of discard designations.#1063
josefpihrt merged 6 commits intodotnet:mainfrom
jamesHargreaves12:fix/RCS1009

Conversation

@jamesHargreaves12
Copy link
Contributor

Currently, if you try to apply RCS1009 on a for each which contains discards e.g.

foreach(var (x,_) in items){...}

Then it will fail since these do not get parsed as DeclarationExpressions at Document Refactorings L92. This PR fixes this by adding cases for PredefinedTypeSyntax and MemberAccessExpression which are what string _ and System.DateTime _ get parsed to respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants