refactor(tvix/eval): point OpAssert span at condition
				
					
				
			This is more useful than pointing it at the entire assert expression, as that includes the body as well which is not going to be relevant in the error. Pointed out by sterni in cl/6391 Change-Id: I95a5d1edf90df65e7fa53d4d04502afd6e99e89a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6566 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									30de72fefb
								
							
						
					
					
						commit
						62623ef46c
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -515,7 +515,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.push_op(OpCode::OpAssert, &node); | ||||
|         self.push_op(OpCode::OpAssert, &node.condition().unwrap()); | ||||
| 
 | ||||
|         // The runtime will abort evaluation at this point if the
 | ||||
|         // assertion failed, if not the body simply continues on like
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue