forked from M-Labs/nac3
David Mak
4948395ca2
Primitive types only contain fields in its Type and not its TopLevelDef. This causes primitive object types to lack some fields.
25 lines
399 B
Python
25 lines
399 B
Python
from min_artiq import *
|
|
from numpy import int32
|
|
|
|
|
|
@nac3
|
|
class EmptyList:
|
|
core: KernelInvariant[Core]
|
|
|
|
def __init__(self):
|
|
self.core = Core()
|
|
|
|
@rpc
|
|
def get_empty(self) -> list[int32]:
|
|
return []
|
|
|
|
@kernel
|
|
def run(self):
|
|
a: list[int32] = self.get_empty()
|
|
if a != []:
|
|
raise ValueError
|
|
|
|
|
|
if __name__ == "__main__":
|
|
EmptyList().run()
|