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: fails when assign to local var within parenthesis #5262

Closed
maiha opened this issue Nov 8, 2017 · 0 comments
Closed

Formatter: fails when assign to local var within parenthesis #5262

maiha opened this issue Nov 8, 2017 · 0 comments

Comments

@maiha
Copy link
Contributor

maiha commented Nov 8, 2017

code: test.cr

(
  a = 1
  a
)

run

% crystal tool format test.cr
Using compiled compiler at `.build/crystal'
Error: couldn't format 'test.cr', please report a bug including the contents of it: https://github.com/crystal-lang/crystal/issues

expecting =, not `IDENT, a`, at :2:3 (Exception)
  from /mnt/src/compiler/crystal/tools/formatter.cr:4564:7 in 'check'
  from /mnt/src/compiler/crystal/tools/formatter.cr:4539:7 in 'write_token'
  from /mnt/src/compiler/crystal/tools/formatter.cr:4545:7 in 'write_token'

version

% crystal --version
Using compiled compiler at `.build/crystal'
Crystal 0.24.0 [ea4187c] (2017-11-08)

LLVM: 3.8.0
Default target: x86_64-pc-linux-gnu

Thank you,

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