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 #4782
Comments
makenowjust
added a commit
to makenowjust/crystal
that referenced
this issue
Aug 3, 2017
…tation Fix crystal-lang#4782 For example, current compiler cannot compile this: a = [1, 2, 3] a[ index: 1, ] # Syntax error in foo.cr:4: expected named argument, not ] Because the compiler does not allow comma after named arguments in index notation. This fixes it so above is now working.
This is a bug about the parser because trailing comma in index notation should be parsed also. I fixed this in #4784. Thank you for reporting 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code:
After first format, gets formatted to: (note the extra comma after "bar")
After second format:
Syntax Error: expected named argument, not ]
Crystal version:
Crystal 0.23.1 (2017-07-13) LLVM 4.0.1
The text was updated successfully, but these errors were encountered: