about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/eval/src/compiler/scope.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs
index 3b75bdbc42..d3c9f83007 100644
--- a/tvix/eval/src/compiler/scope.rs
+++ b/tvix/eval/src/compiler/scope.rs
@@ -171,6 +171,8 @@ impl Scope {
     pub fn inherit(&self) -> Self {
         Self {
             poisoned_tokens: self.poisoned_tokens.clone(),
+            scope_depth: self.scope_depth + 1,
+            with_stack_size: self.with_stack_size + 1,
             ..Default::default()
         }
     }