From 951854defc536786f8e919d529f3db6f6d1f525d Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Tue, 26 Dec 2023 03:53:08 +0100 Subject: feat(tvix/eval): contextful string coercion String with contexts are always coerced to a string with the same context. Change-Id: I224814febd9cad196bb28876793e76bed564dc72 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10440 Tested-by: BuildkiteCI Autosubmit: raitobezarius Reviewed-by: sterni --- tvix/eval/src/vm/generators.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/eval') diff --git a/tvix/eval/src/vm/generators.rs b/tvix/eval/src/vm/generators.rs index 716aaf96b4..bbf79f47c0 100644 --- a/tvix/eval/src/vm/generators.rs +++ b/tvix/eval/src/vm/generators.rs @@ -604,7 +604,7 @@ pub async fn request_string_coerce( _ => match co.yield_(VMRequest::StringCoerce(val, kind)).await { VMResponse::Value(Value::Catchable(c)) => Err(c), VMResponse::Value(value) => Ok(value - .to_str() + .to_contextful_str() .expect("coerce_to_string always returns a string")), msg => panic!( "Tvix bug: VM responded with incorrect generator message: {}", -- cgit 1.4.1