fix condition and branch body getting passed same scope

This commit is contained in:
Kasey White
2023-02-16 16:10:54 -05:00
committed by Lucas
parent d1ca85c4bc
commit d7cfca2a57

View File

@@ -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);
}