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

[refmt] for-loop functions with comments that have single unit arg have weird formatting #1767

Closed
kyldvs opened this issue Jan 22, 2018 · 1 comment

Comments

@kyldvs
Copy link

kyldvs commented Jan 22, 2018

This (try reason link):

for (i in 0 to 1) {
  /* comment */
  print_newline()
};

Gets formatted to:

for (i in 0 to 1) {
  /* comment */
  print_newline
    ()
};

All of these are fine:

for (i in 0 to 1) {
  ();
  /* comment */
  print_newline()
};

for (i in 0 to 1) {
  print_newline()
};

for (i in 0 to 1) {
  /* comment */
  print_int(1)
};
@jordwalke
Copy link
Member

Remaining (more rare) issue tracked here: #1781

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

No branches or pull requests

2 participants