Skip to content
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

sleep with too big integer compiles but doesn't work #7220

Closed
mlvzk opened this issue Dec 27, 2018 · 0 comments
Closed

sleep with too big integer compiles but doesn't work #7220

mlvzk opened this issue Dec 27, 2018 · 0 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:concurrency

Comments

@mlvzk
Copy link

mlvzk commented Dec 27, 2018

My crystal version:

$ crystal -v
Crystal 0.27.0 (2018-11-02)

LLVM: 6.0.1
Default target: x86_64-pc-linux-gnu

Code to reproduce the bug:

puts "1"
sleep 1231231231231
puts "2"

The above code prints "2" instantly after "1".

For integers that are bigger than UInt64 the compiler returns an error, which is good:
Syntax error in test.cr:2: 1231231231231231231231 doesn't fit in an UInt64
But my code compiles and doesn't work as expected.

I also checked if it works on play.crystal-lang.org, and it doesn't: https://play.crystal-lang.org/#/r/5v3m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:concurrency
Projects
None yet
Development

No branches or pull requests

2 participants