tvl-depot/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-mul.nix
sterni 64d3efcc2c fix(tvix/eval): handle thunks in arithmetic builtins
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>
2022-09-22 23:12:29 +00:00

7 lines
129 B
Nix

[
(builtins.mul 4 9)
(builtins.mul 0 7)
(builtins.mul 7 0)
(builtins.mul 7 2)
(builtins.mul (builtins.mul 4 0.5) 21)
]