Preserve trivia when simplifier removes unnecessary this / Me keywords.#1965
Conversation
|
@srivatsn @tmeschter @jmarolf @mavasani @heejaechang Could you please take a look? |
|
How general is this fix? That is, does it only apply to situations where we remove
|
|
@tmeschter This fix only addresses simplification of But looks like we have same issue for `QualifiedNames`` too. Let me try and expand the fix to cover that case too. |
|
This seems like it would benefit from the |
|
@tmeschter, I started going down the route of fixing up the
In the end, seeing the number of changes I had to make I concluded that it would be better to postpone the larger fix to address all these cases until later. Although this is definitely buggy behavior, I feel this is lower priority than other bugs that need to be addressed + the effort spent on testing all these changes now is probably not worth it. When we have more time later, we should a. audit all the places that need fixing (in addition to the above list, I am also not sure whether we preserve trivia correctly in other reducers such as extension method simplification, parenthesis simplification etc. some of which can only be invoked via API) and b. test all the changes properly. I plan to check in the changes in this PR to address the one case mentioned in the above bug. I will log a separate issue to revisit this code to fix up remaining cases above. |
83a9545 to
d9fc374
Compare
|
👍 |
…movingThisQualification Preserve trivia when simplifier removes unnecessary this / Me keywords. Fixes #50
Fixes #50