about summary refs log tree commit diff
path: root/tvix/eval/src/vm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r--tvix/eval/src/vm.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index 7b3de6406549..316732dba0ed 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -381,6 +381,12 @@ impl VM {
 
                 OpCode::OpGetUpvalue(upv_idx) => {
                     let value = self.frame().closure.upvalue(upv_idx).clone();
+                    if let Value::DynamicUpvalueMissing(name) = value {
+                        return Err(
+                            ErrorKind::UnknownDynamicVariable(name.as_str().to_string()).into()
+                        );
+                    }
+
                     self.push(value);
                 }