From d7cfca2a57ef09704ca1b22b79aeb39adf84d6e5 Mon Sep 17 00:00:00 2001 From: Kasey White Date: Thu, 16 Feb 2023 16:10:54 -0500 Subject: [PATCH] fix condition and branch body getting passed same scope --- crates/aiken-lang/src/uplc.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/aiken-lang/src/uplc.rs b/crates/aiken-lang/src/uplc.rs index c055bcaf..603d496a 100644 --- a/crates/aiken-lang/src/uplc.rs +++ b/crates/aiken-lang/src/uplc.rs @@ -507,6 +507,10 @@ impl<'a> CodeGenerator<'a> { }); } self.build_ir(&branch.condition, &mut if_ir, branch_scope.clone()); + + let mut branch_scope = scope.clone(); + branch_scope.push(self.id_gen.next()); + self.build_ir(&branch.body, &mut if_ir, branch_scope); }