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
Add explicit type to NamedTuple variable causes issues with Time::Span:
span = 180.days config = {max_age: span} config2 : NamedTuple(max_age: Time::Span) = {max_age: span} puts config.class puts config[:max_age].to_f puts config2.class puts config2[:max_age].to_f
The interpreter produces incorrect max_age for config2.
NamedTuple(max_age: Time::Span) 15552000.0 NamedTuple(max_age: Time::Span) 0.0
The compiled binary produces correct output:
NamedTuple(max_age: Time::Span) 15552000.0 NamedTuple(max_age: Time::Span) 15552000.0
This is a weird bug.
The text was updated successfully, but these errors were encountered:
Reduced:
x : Int32 = 1 puts x # prints 0
TypeDeclaration for local variables is completely ignored for the interpreter 🤦♂️ 😊
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Add explicit type to NamedTuple variable causes issues with Time::Span:
The interpreter produces incorrect max_age for config2.
The compiled binary produces correct output:
This is a weird bug.
The text was updated successfully, but these errors were encountered: