From e5e33611d75b333492221e407e485a7dbfb438aa Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Wed, 10 Jan 2024 23:26:36 +0100 Subject: fix(tvix/eval): catchable-aware `elem` `elem` did not catch the list being a catchable. This surfaced during Nixpkgs evaluation. Change-Id: Icf19b94e914e35a435c4412d769ee63ba59ab7b0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10599 Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/eval/src/builtins/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tvix') diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 2070f6591e47..eb24c0559f30 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -397,6 +397,10 @@ mod pure_builtins { #[builtin("elem")] async fn builtin_elem(co: GenCo, x: Value, xs: Value) -> Result { + if xs.is_catchable() { + return Ok(xs); + } + for val in xs.to_list()? { match generators::check_equality(&co, x.clone(), val, PointerEquality::AllowAll).await? { -- cgit 1.4.1