diff options
Diffstat (limited to 'tests/micropython/viper_const.py')
-rw-r--r-- | tests/micropython/viper_const.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/micropython/viper_const.py b/tests/micropython/viper_const.py new file mode 100644 index 000000000..5085ede90 --- /dev/null +++ b/tests/micropython/viper_const.py @@ -0,0 +1,14 @@ +# test loading constants in viper functions + +@micropython.viper +def f(): + return b'bytes' +print(f()) + +@micropython.viper +def f(): + @micropython.viper + def g() -> int: + return 123 + return g +print(f()()) |