tvix/eval: arithmetic builtins don't handle thunks at all

Opened by sterni at 2022-09-19T10·28+00


tvix-repl> builtins.add (builtins.add 3 2) 3
ThunkForce(Error { kind: TypeError { expected: "number (either int or float)", actual: "int" }, span: Span { low: Pos(1), high: Pos(34) } })

This is because we reuse the arithmetic_op! macro from the VM which doesn't need to care about thunks because OpForce is emitted before and the unwrapped value pushed onto the stack.

  1. Not currently able to repro this as of canon

    grfn at 2022-10-08T17·27+00

  2. grfn closed this issue at 2022-10-08T17·27+00