tvix-eval: division by zero crashes only for integers

#219
Opened by jrhahn at 2022-11-09T22·56+00

tvix-repl> 1 / 0
thread 'main' panicked at 'attempt to divide by zero', /build/rustc-1.64.0-src/library/core/src/ops/arith.rs:507:1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
tvix-repl> 1.0 / 0
=> inf :: float

for comparison:

nix-repl> 1 / 0
error: division by zero

       at «string»:1:1:

            1| 1 / 0
             | ^

nix-repl> 1.0 / 0
error: division by zero

       at «string»:1:1:

            1| 1.0 / 0
             | ^

  1. Fixed in https://cl.tvl.fyi/c/depot/+/7258

    jrhahn at 2022-11-09T23·52+00

  2. sterni closed this issue at 2022-11-10T14·18+00