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 to format named tuple with a string key and a extra whitespace #4311

Closed
veelenga opened this issue Apr 19, 2017 · 2 comments
Closed
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler
Milestone

Comments

@veelenga
Copy link
Contributor

$ cat test.cr
p typeof({"a" : 1}) # notice a whitespace between string literal and a semicolon

$ crystal test.cr
NamedTuple(a: Int32)

$ crystal tool format test.cr
Error:, couldn't format './test.cr', please report a bug including the contents of it: https://github.com/crystal-lang/crystal/issues

Formatter works ok on {"a": 1} (no whitespace)

@asterite
Copy link
Member

Hm, I'm not sure the first one should parse OK. The space there isn't supposed to be optional.

@asterite asterite added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler labels Apr 19, 2017
@bew
Copy link
Contributor

bew commented Apr 22, 2017

So is it a bug (need fix) ? Or does it stays like that (close issue) ?

@asterite asterite added this to the Next milestone Jun 3, 2017
asterite added a commit that referenced this issue Jun 4, 2017
asterite added a commit that referenced this issue Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler
Projects
None yet
Development

No branches or pull requests

3 participants