Crystal: Formatter error with lambda initializer

Created on 13 Jun 2017  路  1Comment  路  Source: crystal-lang/crystal

class Heap(K, V)
  @comparator : Proc(K, K, Bool)

  def initialize(@comparator = ->(x : K, y : K) { (x <=> y) == -1 })
  end
end

this file compiles and runs, but when trying to tool format it formatter says
Error:, couldn't format 'zzz.cr', please report a bug including the contents of it: https://github.com/crystal-lang/crystal/issues

was discovered during fixing https://github.com/jtomschroeder/crystalline

bug topicformatter

Most helpful comment

Wow, 6 minutes from reported to fixed. Nice job @asterite!

>All comments

Wow, 6 minutes from reported to fixed. Nice job @asterite!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asterite picture asterite  路  3Comments

oprypin picture oprypin  路  3Comments

lbguilherme picture lbguilherme  路  3Comments

Papierkorb picture Papierkorb  路  3Comments

pbrusco picture pbrusco  路  3Comments