Created
April 4, 2015 21:07
-
-
Save shadeslayer/efb8b6f874859a2f22aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error in ./t.cr:6: instantiating 'Node#each()' | |
root.each { |x| puts x.data } | |
^~~~ | |
in ./node.cr:11: undefined method 'each' for Nil | |
left.each(&block) if left | |
^~~~ | |
================================================================================ | |
Nil trace: | |
macro getter (in /opt/crystal/src/object.cr:191):4 | |
def left | |
^~~~ | |
macro getter (in /opt/crystal/src/object.cr:191):5 | |
@left | |
^~~~~ | |
================================================================================ | |
Error: instance variable '@left' of Node was not initialized in all of the 'initialize' methods, rendering it nilable. | |
Specifically in this one: | |
./node.cr:6 | |
def initialize(data) | |
^~~~~~~~~~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment