We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I wanted to use the hello world example from this page: https://crystal-lang.org/2013/07/10/hello-world.html
but I encountered the following error:
Can't infer the type of instance variable '@name' of Greeter @name = name.capitalize ^~~~~
I fixed the issue, by adding a property statement
property statement
class Greeter property name : String def initialize(name) @name = name.capitalize end .... end
Another issue while trying to compile:
$ bin/crystal hello.cr $ ./hello Hello World $
this does not work anymore. It is enough to simply use:
$ bin/crystal hello.cr
and if you want to produce an executable:
$ bin/crystal compile hello.cr $ ./hello
My crystal version is: Crystal 0.18.2 (2016-06-17) [on Archlinux]
I think it would be a good idea to update this example.
By the way I really like that you show the hello world example as simple puts, class and block.
puts
The text was updated successfully, but these errors were encountered:
Thank you for reporting this! Fixed in 2072fe3
Sorry, something went wrong.
No branches or pull requests
Hello,
I wanted to use the hello world example from this page:
https://crystal-lang.org/2013/07/10/hello-world.html
but I encountered the following error:
I fixed the issue, by adding a
property statement
Another issue while trying to compile:
this does not work anymore. It is enough to simply use:
and if you want to produce an executable:
My crystal version is: Crystal 0.18.2 (2016-06-17) [on Archlinux]
I think it would be a good idea to update this example.
By the way I really like that you show the hello world example as simple
puts
, class and block.The text was updated successfully, but these errors were encountered: