circuitpython/tests/micropython/viper_const.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
228 B
Python
Raw Normal View History

# test loading constants in viper functions
2021-04-20 01:22:44 -04:00
@micropython.viper
def f():
2021-04-20 01:22:44 -04:00
return b"bytes"
print(f())
2021-04-20 01:22:44 -04:00
@micropython.viper
def f():
@micropython.viper
def g() -> int:
return 123
2021-04-20 01:22:44 -04:00
return g
2021-04-20 01:22:44 -04:00
print(f()())