From e23ed1546401f87e547c193643a9a0457dea9e57 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Tue, 6 Oct 2020 15:19:45 +0800 Subject: [PATCH] fixes with statement with multiple items Closes #1478 --- artiq/compiler/transforms/artiq_ir_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/compiler/transforms/artiq_ir_generator.py b/artiq/compiler/transforms/artiq_ir_generator.py index 4e3c3394b..a794e9990 100644 --- a/artiq/compiler/transforms/artiq_ir_generator.py +++ b/artiq/compiler/transforms/artiq_ir_generator.py @@ -853,8 +853,8 @@ class ARTIQIRGenerator(algorithm.Visitor): self.current_assign = None none = self.append(ir.Alloc([], builtins.TNone())) - cleanup.append(lambda: - self._user_call(exit_fn, [none, none, none], {})) + call = self._user_call(exit_fn, [none, none, none], {}) + cleanup.append(lambda: call) self._try_finally( body_gen=lambda: self.visit(node.body),