You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Base
property last_value : String
def initialize
@last_value = data
end
end
class Sub < Base
property url : String
def initialize
super
@url = ""
end
def data
url
end
end
pp Sub.new.last_value
Moving @url = "" before the super fixes the crash, but that should be caught by the compiler.
No, the original example mentions an instance variable. It's just a different bug. I actually can make the second one compile but it will still crash with a stack overflow.
This happens with 0.24.1, 0.24.2, and master, but for completeness here's the version string of master:
Crystal 0.24.2 (2018-05-26)
LLVM: 5.0.1
Default target: x86_64-unknown-linux-gnu
The OS is NixOS.
Moving
@url = ""
before thesuper
fixes the crash, but that should be caught by the compiler.Backtrace is:
The text was updated successfully, but these errors were encountered: