-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix issue where we weren't properly adding elastic trivia to newly generated members #79571
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
|
@jjonescz ptal. i can vouch for this, and this should fixup nearly all of the undesirable changes seen in your PR. Note: a small handful of changes will remain. But they represent appropriate differences. Specifically, when changing the modifiers of an existing construct, no line changes will happen now. |
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.
c
| Accessibility accessibility, | ||
| DeclarationModifiers modifiers, | ||
| bool withLeadingElasticMarker = false) | ||
| bool withLeadingElasticMarker = true) |
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.
i have audited all usages of these private functions (so they're only called within this type). In almost all cases we ues this when making a new member. So we want the elastic marker so the new member is placed properly. In the few cases we are just updating a modifieer list, we now explicitly pass in 'false' there.
To bring in dotnet/roslyn#79571.
* Handle extension members by 'make member static' * Suppress warning introduced by Roslyn bump * Suppress warning in test * Update tests * Update Roslyn To bring in dotnet/roslyn#79571. * Update Roslyn To bring in dotnet/roslyn#79576.
* Handle extension members by 'make member static' * Suppress warning introduced by Roslyn bump * Suppress warning in test * Update tests * Update Roslyn To bring in dotnet/roslyn#79571. * Update Roslyn To bring in dotnet/roslyn#79576.
Found when updating roslyn-analyzers to latest version of roslyn.
Introduced with: #76054