Skip to content
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 does not preserve trivia for a bunch of simplifications #2142

Open
shyamnamboodiripad opened this issue Apr 21, 2015 · 0 comments

Comments

@shyamnamboodiripad
Copy link
Contributor

#50 reports one case where the simplifier doesn't preserve trivia. This case is addressed in PR #1965. However, there are several other cases where simplifier doesn't preserve trivia today -

  • System.\* comment *\ Int32 -> int (i.e. simplify to predefined type in both member access as well as qualified names)
  • System. \* comment *\ Int32 -> alias (i.e. simplify to alias both in both member access as well as qualified names)
  • Nullable< \*comment *\ T> -> T?
  • Preserving trivia when replacing generic names with aliases
  • Removing type arguments for generic methods
  • Simplifying alias qualified names global::System...

Logging this issue so that we can -

  • Audit all the parts of the simplifier 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
  • Test all the changes properly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants