diff --git a/artiq/compiler/transforms/iodelay_estimator.py b/artiq/compiler/transforms/iodelay_estimator.py index aaae55676..a28e9e793 100644 --- a/artiq/compiler/transforms/iodelay_estimator.py +++ b/artiq/compiler/transforms/iodelay_estimator.py @@ -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() diff --git a/lit-test/test/iodelay/class.py b/lit-test/test/iodelay/class.py new file mode 100644 index 000000000..32580c4c6 --- /dev/null +++ b/lit-test/test/iodelay/class.py @@ -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())