forked from M-Labs/artiq
transforms.iodelay_estimator: fix handling of methods.
This commit is contained in:
parent
b0c6b70971
commit
506725f78a
@ -258,7 +258,7 @@ class IODelayEstimator(algorithm.Visitor):
|
||||
args = {}
|
||||
for kw_node in node.keywords:
|
||||
args[kw_node.arg] = kw_node.value
|
||||
for arg_name, arg_node in zip(typ.args, node.args[offset:]):
|
||||
for arg_name, arg_node in zip(list(typ.args)[offset:], node.args):
|
||||
args[arg_name] = arg_node
|
||||
|
||||
free_vars = delay.duration.free_vars()
|
||||
|
12
lit-test/test/iodelay/class.py
Normal file
12
lit-test/test/iodelay/class.py
Normal file
@ -0,0 +1,12 @@
|
||||
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||
# RUN: OutputCheck %s --file-to-check=%t
|
||||
|
||||
# CHECK-L: g: ()->NoneType delay(s->mu(1.0) mu)
|
||||
def g(i):
|
||||
i.f(1.0)
|
||||
|
||||
class c:
|
||||
def f(self, x):
|
||||
delay(x)
|
||||
|
||||
g(c())
|
Loading…
Reference in New Issue
Block a user