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

costajob picture costajob  路  3Comments

oprypin picture oprypin  路  3Comments

asterite picture asterite  路  3Comments

lbguilherme picture lbguilherme  路  3Comments

pbrusco picture pbrusco  路  3Comments