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

Formatter bug: "/=" after "else" in "case" #4620

Closed
konovod opened this issue Jun 25, 2017 · 0 comments
Closed

Formatter bug: "/=" after "else" in "case" #4620

konovod opened this issue Jun 25, 2017 · 0 comments

Comments

@konovod
Copy link
Contributor

konovod commented Jun 25, 2017

scale = 0
a = 0
case scale
when 0
  a = 0
else
  a /= 2
end

This code compiles and runs, but formatter fails to format it. Failing line is a /= 2, other are included just to make code correct. a /= 2 in when 0 section doesn't cause fail, neither do a /= 2 in if-else sections, only in case-else. a *= 2 doesn't fails too, so this is perhaps some of those "is not a regexp" things.

makenowjust added a commit to makenowjust/crystal that referenced this issue Jun 27, 2017
`skip_space_or_newline` is not needed because it is called inside
`format_nested`.
RX14 pushed a commit that referenced this issue Sep 10, 2017
`skip_space_or_newline` is not needed because it is called inside
`format_nested`.
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

1 participant