about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/compiler/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 6f48e8f3d5ba..928d39bae595 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -885,6 +885,7 @@ impl Compiler {
     // pop/remove the indices of attribute sets that are implicitly in
     // scope through `with` on the "with-stack".
     fn compile_with(&mut self, node: ast::With) {
+        self.begin_scope();
         // TODO: Detect if the namespace is just an identifier, and
         // resolve that directly (thus avoiding duplication on the
         // stack).
@@ -900,6 +901,7 @@ impl Compiler {
 
         self.chunk().push_op(OpCode::OpPopWith);
         self.scope_mut().with_stack.pop();
+        self.end_scope();
     }
 
     fn compile_lambda(&mut self, node: ast::Lambda) {