You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// automatically generated from `func_test.fc`
DECLPROC calc
DECLPROC main
calc PROC:<{
DROP
TRUE
}>
main PROC:<{
0 PUSHINT
calc CALLDICT
16 THROWIF
}>
Actual behavior when executed
calc always returns true.
Expected behavior when executed
Exit code 4, since -1 % x should produce a division by zero when x = 0.
Side note 1: The related expression ((-1 % x) % 1) == 0 also gets mapped to TRUE. Side note 2: Interestingly enough, the shorter expression (x % 1) <= 0 gets translated the expected way:
calc PROC:<{
1 PUSHINT
MOD
1 LESSINT
}>
The text was updated successfully, but these errors were encountered:
Based on tact-lang/tact#3019
Code to reproduce
Output Fift
Actual behavior when executed
calc
always returnstrue
.Expected behavior when executed
Exit code 4, since
-1 % x
should produce a division by zero whenx = 0
.Side note 1: The related expression
((-1 % x) % 1) == 0
also gets mapped toTRUE
.Side note 2: Interestingly enough, the shorter expression
(x % 1) <= 0
gets translated the expected way:The text was updated successfully, but these errors were encountered: