diff options
author | sterni <sternenseemann@systemli.org> | 2022-09-21T20·20+0200 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2022-09-22T23·12+0000 |
commit | 64d3efcc2ce055ffe45034ed169569ece961f04d (patch) | |
tree | 1e3f199b768182684f8dc85d1513d0d4ff671a98 /tvix/eval/src/tests/tvix_tests/eval-okay-builtins-add.nix | |
parent | 55459f02fcdca8612673f2df8ba54cb995ae06b6 (diff) |
fix(tvix/eval): handle thunks in arithmetic builtins r/4960
The simplest solution seems to be to pass references to arithmetic_op!() which avoids the moving annoyance we had to deal with in the builtins (no more popping!). We then use .force() to force the values and dereference any Thunks (which arithmetic_op! doesn't do for us). Change-Id: I0eb8ad60e80a0b3ba9d9f411e973ef8bcf136989 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6724 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-builtins-add.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-add.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-add.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-add.nix index 6b2a29d7982c..b04b1d1fa6ba 100644 --- a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-add.nix +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-add.nix @@ -4,4 +4,5 @@ (builtins.add 7 11.9) (builtins.add 7.2 11.9) (builtins.add 7.1 11.9) + (builtins.add (builtins.add 21 10) 11) ] |