From baa012d5a3c70e06306e88f570fdbbed3c88591f Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 1 Sep 2022 17:26:52 +0300 Subject: feat(tvix/eval): track source spans for `assert` Change-Id: I5415f63ddde388847a261da4ce9a8d8235657535 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6391 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/compiler/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/eval/src/compiler/mod.rs') diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index 5e9131bf6263..7c3f2b253713 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -604,7 +604,7 @@ impl Compiler<'_> { fn compile_assert(&mut self, slot: Option, node: ast::Assert) { // Compile the assertion condition to leave its value on the stack. self.compile(slot, node.condition().unwrap()); - self.push_op_old(OpCode::OpAssert); + self.push_op(OpCode::OpAssert, &node); // The runtime will abort evaluation at this point if the // assertion failed, if not the body simply continues on like -- cgit 1.4.1