diff options
Diffstat (limited to 'tvix/eval/src/builtins')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 341ee6096924..a79199339c13 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -551,10 +551,9 @@ mod pure_builtins { #[builtin("hasContext")] #[allow(non_snake_case)] - async fn builtin_hasContext(_co: GenCo, #[lazy] _e: Value) -> Result<Value, ErrorKind> { - Ok(Value::Catchable(CatchableErrorKind::UnimplementedFeature( - "hasContext".to_string(), - ))) + async fn builtin_hasContext(co: GenCo, e: Value) -> Result<Value, ErrorKind> { + let v = e.to_str()?; + Ok(Value::Bool(v.has_context())) } #[builtin("hashString")] |