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

bug: Sniper printer fails to prepend whitespace to CtModifiable added at start of non-empty collection #3855

Closed
slarse opened this issue Mar 23, 2021 · 1 comment · Fixed by #3856
Labels

Comments

@slarse
Copy link
Collaborator

slarse commented Mar 23, 2021

If you add a type member at the top of a class, the sniper printer prints it on the same line as the header, just after the opening curly bracket. This happens only if the class is non-empty, with an empty class the newline and indentation is properly prepended to the type member.

This applies to all kinds of type members. Working on a fix.

@slarse slarse added the bug label Mar 23, 2021
@slarse slarse changed the title bug: Sniper printer fails to prepend whitespace to type member added at top of non-empty class bug: Sniper printer fails to prepend whitespace to CtModifiable added at start of non-empty collection Mar 23, 2021
@slarse
Copy link
Collaborator Author

slarse commented Mar 23, 2021

The same bug affects local variables in statement lists. In fact, it affects any subtype of CtModifiable in a collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant