about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/mod.rs
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-09-19T11·09+0200
committersterni <sternenseemann@systemli.org>2022-09-20T10·59+0000
commit7506983ce2748fadef56aa390e61003dbf556a98 (patch)
treebaf43945e2dc9cd3dc5f70e1103276a79e6b8796 /tvix/eval/src/compiler/mod.rs
parente04ccc9354ee2112622fe9e6e6df8765bd7685fe (diff)
fix(tvix/eval): force condition of an assert r/4937
Change-Id: I3ad2234e8a8e4280e498c6d7af8ea0733ed4c7ea
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6699
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/compiler/mod.rs')
-rw-r--r--tvix/eval/src/compiler/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 160433904dc7..793f0566e9de 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -471,6 +471,7 @@ impl Compiler<'_> {
     fn compile_assert(&mut self, slot: LocalIdx, node: ast::Assert) {
         // Compile the assertion condition to leave its value on the stack.
         self.compile(slot, node.condition().unwrap());
+        self.emit_force(&node.condition().unwrap());
         self.push_op(OpCode::OpAssert, &node.condition().unwrap());
 
         // The runtime will abort evaluation at this point if the