Crystal: Formatter bug with newline before comma in method call

Created on 10 Aug 2018  路  1Comment  路  Source: crystal-lang/crystal

Trying to format this:

def method(a, b)
end
method(1
,2)

gives

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

expecting ,, not `NEWLINE, `, at :3:9 (Exception)
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???
  from ???

Most helpful comment

In Ruby that's a syntax error. Maybe in Crystal it should be a syntax error too.

>All comments

In Ruby that's a syntax error. Maybe in Crystal it should be a syntax error too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nabeelomer picture nabeelomer  路  3Comments

relonger picture relonger  路  3Comments

costajob picture costajob  路  3Comments

lgphp picture lgphp  路  3Comments

ArthurZ picture ArthurZ  路  3Comments