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 09e3aa2475..e088d22776 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -304,6 +304,12 @@ impl VM {
 
                     return Err(Error::UnknownDynamicVariable(ident.to_string()));
                 }
+
+                OpCode::OpAssert => {
+                    if !self.pop().as_bool()? {
+                        return Err(Error::AssertionFailed);
+                    }
+                }
             }
 
             #[cfg(feature = "disassembler")]