When referencing a class variable in the assignment of an instance variable, the crystal compiler errors with BUG:@@next_id = @@next_id + 1at /testing/test.cr:3:15 has no type (Exception). The code that produces this is below.
class IdHaver
@@next_id : Int32 = 0
@id : Int32 = @@next_id += 1
end
ider = IdHaver.new
I'm on openSUSE Leap 42.3, and the output of crystal -v is included below.
When referencing a class variable in the assignment of an instance variable, the crystal compiler errors with
BUG:
@@next_id = @@next_id + 1at /testing/test.cr:3:15 has no type (Exception)
. The code that produces this is below.I'm on openSUSE Leap 42.3, and the output of
crystal -v
is included below.