9714a0ead5
There was a missing call to MP_F_CONVERT_NATIVE_TO_OBJ. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
26 lines
268 B
Python
26 lines
268 B
Python
# test storing an attribute with a value of different viper types
|
|
|
|
|
|
class X:
|
|
def __str__(self):
|
|
return "X"
|
|
|
|
|
|
x = X()
|
|
|
|
|
|
@micropython.viper
|
|
def a():
|
|
x.i0 = 0
|
|
x.i7 = 7
|
|
x.s = "hello"
|
|
x.o = x
|
|
|
|
|
|
a()
|
|
|
|
print(x.i0)
|
|
print(x.i7)
|
|
print(x.s)
|
|
print(x.o)
|