compiler: fix incorrect with behavior

This commit is contained in:
pca006132 2020-10-07 18:59:35 +08:00 committed by Sebastien Bourdeauducq
parent 7f79a54255
commit 86a6fe4606
1 changed files with 1 additions and 2 deletions

View File

@ -855,8 +855,7 @@ class ARTIQIRGenerator(algorithm.Visitor):
self.current_assign = None
none = self.append(ir.Alloc([], builtins.TNone()))
call = self._user_call(exit_fn, [none, none, none], {})
cleanup.append(lambda: call)
cleanup.append(lambda fn=exit_fn: self._user_call(fn, [none, none, none], {}))
self._try_finally(
body_gen=lambda: self.visit(node.body),