Consider the following code:
class C1
{
int _field;
void M()
{
this. /* comment1 */ _field /* comment 2 */ = 0;
}
}
If the MemerAccessExpressionSyntax for the field access is tagged with Simplifier.Annotation and the result run through the Simplifier the code will be transformed into.
class C1
{
int _field;
void M()
{
_field /* comment 2 */ = 0;
}
}
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.