about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorRyan Lahfa <tvl@lahfa.xyz>2023-12-26T02·53+0100
committerclbot <clbot@tvl.fyi>2024-01-03T18·49+0000
commit951854defc536786f8e919d529f3db6f6d1f525d (patch)
tree4a20896fc5b9ee503fe3c1f75696cd54f11fa3c7 /tvix
parent9d43c265768b4577bbb1171676154ba09d75827a (diff)
feat(tvix/eval): contextful string coercion r/7334
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 <tvl@lahfa.xyz>
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/vm/generators.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/vm/generators.rs b/tvix/eval/src/vm/generators.rs
index 716aaf96b498..bbf79f47c05d 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: {}",