From 7506983ce2748fadef56aa390e61003dbf556a98 Mon Sep 17 00:00:00 2001 From: sterni Date: Mon, 19 Sep 2022 13:09:03 +0200 Subject: fix(tvix/eval): force condition of an assert Change-Id: I3ad2234e8a8e4280e498c6d7af8ea0733ed4c7ea Reviewed-on: https://cl.tvl.fyi/c/depot/+/6699 Autosubmit: sterni Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/eval/src/compiler/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'tvix/eval/src/compiler') diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index 160433904d..793f0566e9 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 -- cgit 1.4.1