about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/eval/src/compiler/mod.rs2
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-nested-assertions.exp (renamed from tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-nested-assertions.exp)0
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-nested-assertions.nix (renamed from tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-nested-assertions.nix)0
3 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index b6b5bc6860..831b92b67a 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -836,6 +836,7 @@ impl Compiler<'_> {
         // Compile the assertion condition to leave its value on the stack.
         self.compile(slot, node.condition().unwrap());
         self.emit_force(&node.condition().unwrap());
+        let throw_idx = self.push_op(OpCode::OpJumpIfCatchable(JumpOffset(0)), node);
         let then_idx = self.push_op(OpCode::OpJumpIfFalse(JumpOffset(0)), node);
 
         self.push_op(OpCode::OpPop, node);
@@ -848,6 +849,7 @@ impl Compiler<'_> {
         self.push_op(OpCode::OpAssertFail, &node.condition().unwrap());
 
         self.patch_jump(else_idx);
+        self.patch_jump(throw_idx);
     }
 
     /// Compile conditional expressions using jumping instructions in the VM.
diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-nested-assertions.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-assertions.exp
index c508d5366f..c508d5366f 100644
--- a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-nested-assertions.exp
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-assertions.exp
diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-nested-assertions.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-assertions.nix
index b0397e268e..b0397e268e 100644
--- a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-nested-assertions.nix
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-assertions.nix