Crystal: Format tool: couldn't format minitest/reporter.cr

Created on 22 Mar 2016  路  2Comments  路  Source: crystal-lang/crystal

Hi,

running crystal tool format in a project I got this error:

Syntax Error: the syntax for an argument with a default value V and type T is `arg : T = V` at ./libs/minitest/minitest/assertions.cr:5:33
Error:, couldn't format './libs/minitest/minitest/reporter.cr', please report a bug including the contents of it: https://github.com/crystal-lang/crystal/issues

Indeed crystal tool format is not able to format:
https://github.com/ysbaddaden/minitest.cr/blob/f2014c2175064e0b41bdfdc4b64f8a69b25da075/src/minitest/reporter.cr

Do you need more information?

Kind regards,
Peter

bug topicformatter

Most helpful comment

Actually, seems that this reproduces it:

foo &.bar.is_a?(Baz)

I'll fix it soon. @splattael Thanks for reporting this.

All 2 comments

The culprit seems to be getter :symbol where the colon is understood as a type separator.

Actually, seems that this reproduces it:

foo &.bar.is_a?(Baz)

I'll fix it soon. @splattael Thanks for reporting this.

Was this page helpful?
0 / 5 - 0 ratings