mirror of https://github.com/m-labs/artiq.git
transforms.artiq_ir_generator: fix optarg codegen (closes #205).
This commit is contained in:
parent
cd8eccfd46
commit
690b2fd034
|
@ -1626,7 +1626,7 @@ class ARTIQIRGenerator(algorithm.Visitor):
|
|||
|
||||
for index, arg_node in enumerate(node.args):
|
||||
arg = self.visit(arg_node)
|
||||
if index < len(fn_typ.args):
|
||||
if index + offset < len(fn_typ.args):
|
||||
args[index + offset] = arg
|
||||
else:
|
||||
args[index + offset] = self.append(ir.Alloc([arg], ir.TOption(arg.type)))
|
||||
|
|
Loading…
Reference in New Issue