about summary refs log tree commit diff
path: root/tvix/eval/src/builtins
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-12-13T13·53-0800
committertazjin <tazjin@tvl.su>2023-12-29T21·34+0000
commit4b3f27ebc91c34c4a6a33d164e4d9f5fc975a48e (patch)
tree48c977b8dd0ee7ac0f1a16f94a21fe99245f47c0 /tvix/eval/src/builtins
parent9cb3cd10f5159a163ea494f765c583a389324c2d (diff)
fix(tvix/eval): propagate catchables through builtins.attrNames r/7277
Change-Id: Id14e39543239272aed041998fd9a78465c9cb8b2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10359
Autosubmit: Adam Joseph <adam@westernsemico.com>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/builtins')
-rw-r--r--tvix/eval/src/builtins/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs
index d75249e94a8b..341ee6096924 100644
--- a/tvix/eval/src/builtins/mod.rs
+++ b/tvix/eval/src/builtins/mod.rs
@@ -121,6 +121,9 @@ mod pure_builtins {
 
     #[builtin("attrNames")]
     async fn builtin_attr_names(co: GenCo, set: Value) -> Result<Value, ErrorKind> {
+        if set.is_catchable() {
+            return Ok(set);
+        }
         let xs = set.to_attrs()?;
         let mut output = Vec::with_capacity(xs.len());