-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Open
Labels
Description
Port, board and/or hardware
unix, coverage build, x86_64 linx
MicroPython version
v1.27.0-preview-32-g141f7d0c35
Reproduction
- Build the unix "longlong variant"
- in the repl, type
int("-9223372036854775808")
- in the repl, type
-9223372036854775808
Expected behaviour
The integer constant can be parsed.
Observed behaviour
Each case results in OverflowError: result overflows long long storage
. However, they're slightly different:
- the first one reaches mp_parse_num_integer with the string argument
"-9223372036854775808"
. This may be relatively straightforward to fix. - the second reaches mp_parse_num_integer with the string argument
"9223372036854775808"
(no leading "-"). Fixing this would require making the byte compiler recognize unary negation of an integer constant as special.
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree