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.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index 818b5ff9b1..93bf853f9c 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -406,6 +406,10 @@ impl<'o> VM<'o> {
             Value::Attrs(ref attrs) => match attrs.select("__functor") {
                 None => Err(self.error(ErrorKind::NotCallable(callable.type_of()))),
                 Some(functor) => {
+                    if let Value::Thunk(thunk) = &functor {
+                        fallible!(self, thunk.force(self));
+                    }
+
                     // The functor receives the set itself as its first argument
                     // and needs to be called with it. However, this call is
                     // synthetic (i.e. there is no corresponding OpCall for the