-
-
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
reserved keywords error messages #6042
Comments
Reduced example: def foo(out : String)
bar = begin
puts out
end
bar # can't use variable name 'bar' inside assignment to variable 'bar'
end I initially expected this to be resolved by #5930, but Still, there seems to be some issue with it. It would be easy to simply restrict the use of |
#5930 was merged 18 days ago which means it will be available on next release correct? |
@stern0 it's correct (unless core team decides to release half-baked version like |
A similar issue was raised in #4121
It would be good to produce proper error messages for using reserved keywords in the language.
The below example shows I am using the
out
keyword.The compiler throw the following error at compile time. Same with
crystal tool format
.The above message gives no idea about
out
been a reserved keyword and suggestsbar
is.Displaying proper errors for builtin types would be good.
Crystal 0.24.2 (2018-03-10) LLVM: 5.0.1
x86_64-apple-macosx
The text was updated successfully, but these errors were encountered: