about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/compiler/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 619445f2ce85..cd2a669013bc 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -1014,7 +1014,7 @@ impl Compiler<'_> {
                         self.scope_mut().mark_needs_finaliser(slot);
                     } else {
                         // a self-reference
-                        if this_depth == target_depth && this_stack_slot == stack_idx {
+                        if slot == idx {
                             self.scope_mut().mark_must_thunk(slot);
                         }
                         self.push_op(OpCode::DataLocalIdx(stack_idx), &upvalue.span);