-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
Array.new(size) error #7723
Comments
And why i can`t initialize array in this way It works only when i pass number |
For a first problem: only the first line don't works. This is because compiler must deduce type of |
Duplicate of #6390 Also, never user uninitialized and never recommend it, please. |
As a workaround explicitly define the type of each instance variable. |
I get error message when tring to initialize array in initialize method. i`m new in crystal, but i think it should works..
https://crystal-lang.org/api/0.28.0/Array.html#new%28size%3AInt%2C%26block%3AInt32-%3ET%29-class-method
The text was updated successfully, but these errors were encountered: