From 7d339d27627de12e7dc99f823e84c381281babfc Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 3 Mar 2023 23:55:00 +0300 Subject: fix(tvix/eval): handle `__toString` when JSON-serialising attrsets These must be serialised to a JSON string of the *result* of coercing the function application to a string. Change-Id: Ib7f49ccd950503ddbdbf99643cd59565e26b50da Reviewed-on: https://cl.tvl.fyi/c/depot/+/8204 Reviewed-by: raitobezarius Tested-by: BuildkiteCI --- tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tojson-tostring.exp | 1 + 1 file changed, 1 insertion(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tojson-tostring.exp (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tojson-tostring.exp') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tojson-tostring.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tojson-tostring.exp new file mode 100644 index 000000000000..2661fd257bf9 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tojson-tostring.exp @@ -0,0 +1 @@ +"\"it's 42\"" -- cgit 1.4.1