diff options
Diffstat (limited to 'tvix/eval')
-rw-r--r-- | tvix/eval/src/vm.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index 72d672688217..39c9c6e822df 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -589,7 +589,12 @@ impl<'o> VM<'o> { Value::Thunk(thunk) => thunk .resolve_deferred_upvalues(&self.stack[self.frame().stack_offset..]), - v => panic!("compiler error: invalid finaliser value: {}", v), + // In functions with "formals" attributes, it is + // possible for `OpFinalise` to be called on a + // non-capturing value, in which case it is a no-op. + // + // TODO: detect this in some phase and skip the finalise; fail here + _ => { /* TODO: panic here again to catch bugs */ } } } |