diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-12-13T13·02-0800 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-12-29T21·34+0000 |
commit | 9cb3cd10f5159a163ea494f765c583a389324c2d (patch) | |
tree | e63224629c9e40874e89fb96338e9230a98f6c5a /tvix/eval/src/builtins/mod.rs | |
parent | 2883b2d4bd948e090d46cee361bd69d6282d618c (diff) |
fix(tvix/eval): propagate catchables through builtins.intersectAttrs r/7276
Change-Id: I4ada8cf10611e98519cb1b1da11bfd06815f2932 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10358 Autosubmit: Adam Joseph <adam@westernsemico.com> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 6ecbb5028471..d75249e94a8b 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -576,6 +576,12 @@ mod pure_builtins { #[builtin("intersectAttrs")] async fn builtin_intersect_attrs(co: GenCo, x: Value, y: Value) -> Result<Value, ErrorKind> { + if x.is_catchable() { + return Ok(x); + } + if y.is_catchable() { + return Ok(y); + } let left_set = x.to_attrs()?; if left_set.is_empty() { return Ok(Value::attrs(NixAttrs::empty())); |