forked from M-Labs/artiq
1
0
Fork 0
artiq/lit-test/test/devirtualization/function.py

23 lines
513 B
Python
Raw Normal View History

# RUN: env ARTIQ_DUMP_IR=1 %python -m artiq.compiler.testbench.embedding +compile %s 2>%t
# RUN: OutputCheck %s --file-to-check=%t
from artiq.language.core import *
from artiq.language.types import *
2015-12-02 20:36:49 +08:00
# CHECK-L: call ()->NoneType delay('b) %local.testbench.entrypoint ; calls testbench.entrypoint
@kernel
def baz():
pass
class foo:
@kernel
def bar(self):
# CHECK-L: call ()->NoneType %local.testbench.baz ; calls testbench.baz
baz()
x = foo()
@kernel
def entrypoint():
x.bar()