about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r--tvix/eval/src/builtins/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs
index 58fe6bbbcb0c..8ae0ae02d6ad 100644
--- a/tvix/eval/src/builtins/mod.rs
+++ b/tvix/eval/src/builtins/mod.rs
@@ -466,6 +466,12 @@ mod pure_builtins {
 
     #[builtin("getAttr")]
     async fn builtin_get_attr(co: GenCo, key: Value, set: Value) -> Result<Value, ErrorKind> {
+        if key.is_catchable() {
+            return Ok(key);
+        }
+        if set.is_catchable() {
+            return Ok(set);
+        }
         let k = key.to_str()?;
         let xs = set.to_attrs()?;