-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Simplifier removes trivia when eliminating 'this.' uses. #50
Labels
Milestone
Comments
shyamnamboodiripad
added a commit
to shyamnamboodiripad/roslyn
that referenced
this issue
Apr 14, 2015
shyamnamboodiripad
added a commit
to shyamnamboodiripad/roslyn
that referenced
this issue
Apr 21, 2015
shyamnamboodiripad
added a commit
that referenced
this issue
Apr 21, 2015
…movingThisQualification Preserve trivia when simplifier removes unnecessary this / Me keywords. Fixes #50
It no longer removes the comment but it does add a line break. This is probably the right behavior per formatting conventions: public class Class1
{
int _field;
void M()
{
/* comment1 */
_field /* comment 2 */ = 0;
}
} |
ghost
added
the
Verified
label
Jun 4, 2015
Verified as fixed. |
dibarbet
added a commit
to dibarbet/roslyn
that referenced
this issue
Mar 1, 2023
Add basic project implementation to unblock progress on LSP handlers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following code:
If the
MemerAccessExpressionSyntax
for the field access is tagged withSimplifier.Annotation
and the result run through theSimplifier
the code will be transformed into.Notice that
/* comment 1 */
has been removed. That seems like a bug. Removing non-comment trivia seems acceptable here but removing comments is potentially removing valuable documentation during the act of simplification. At the least it seems like there should be an option to prevent this from happening.The text was updated successfully, but these errors were encountered: