Closed novusnota closed 2 months ago
Is there a reference backing this?
The tests in https://github.com/tact-lang/tact/pull/766
They intentionally didn't introduce giant ints as they're automatically spotted by const-eval and reported as an error there. And runtime overflows also cause exit code 5.
It looks like we need to open an issue in ton-docs then: https://docs.ton.org/develop/func/statements#repeat-loop
If the number of times is less than -2^31 or greater than 2^31 - 1, range check exception is thrown.
It looks like we need to open an issue in ton-docs then: https://docs.ton.org/develop/func/statements#repeat-loop
If the number of times is less than -2^31 or greater than 2^31 - 1, range check exception is thrown.
Yes, there is no error for numbers less than -2^31. But there is for greater — I just made an whoopsie and looked at a different test, so this issue is incorrect :)
The exit code 5 will be thrown when the integer is out of its 257-bit signed bounds, NOT when the integer is bigger than $2^{31} - 1$