diff options
author | Damien George <damien.p.george@gmail.com> | 2020-04-07 12:23:08 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-05-03 16:23:19 +1000 |
commit | 4ede70368722f4702320412f393a7c703cdf4276 (patch) | |
tree | 30615518e0a6d69c5bdd7e17b71816ee929348c6 /tests/micropython/const_error.py | |
parent | 40e92277339697159e9ae120d814b64b6d4bbf04 (diff) |
py/parse: Support constant folding of power operator for integers.
Constant expression like "2 ** 3" will now be folded, and the special form
"X = const(2 ** 3)" will now compile because the argument to the const is
now a constant.
Fixes issue #5865.
Diffstat (limited to 'tests/micropython/const_error.py')
-rw-r--r-- | tests/micropython/const_error.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/micropython/const_error.py b/tests/micropython/const_error.py index 395fe0f77..d35be530a 100644 --- a/tests/micropython/const_error.py +++ b/tests/micropython/const_error.py @@ -19,7 +19,7 @@ test_syntax("A = const(1); A = const(2)") # these operations are not supported within const test_syntax("A = const(1 @ 2)") test_syntax("A = const(1 / 2)") -test_syntax("A = const(1 ** 2)") +test_syntax("A = const(1 ** -2)") test_syntax("A = const(1 << -2)") test_syntax("A = const(1 >> -2)") test_syntax("A = const(1 % 0)") |