about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/scope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/compiler/scope.rs')
-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 3b75bdbc42fe..d3c9f8300780 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()
         }
     }