Nightly VM rejects bigint subtraction assigned to a field; temporary local works
On 0.18.1-nightly.20260909.a, assigning a bigint subtraction directly to a class field fails in the VM. Computing exactly the same expression in a temporary local works.
Environment: Linux x86_64; reproduced both on an Ubuntu workstation and an H100 host. No model, credentials, GPU, network call, SDK, or external dependency is required.
Save as repro.baml:
class Timer { elapsed: bigint }
function now() -> bigint {
baml.time.Instant.now().to_timestamp_milliseconds()
}
function main() -> bigint {
let started = now();
let result = Timer { elapsed: 0n };
result.elapsed = now() - started;
result.elapsed
}Run:
baml toolchain install 0.18.1-nightly.20260909.a
BAML_VERSION=0.18.1-nightly.20260909.a baml run --file repro.baml --output-format json
echo $?Actual stderr:
error: Traceback (most recent call last):
File "repro.baml", line 8, in user.main
VM internal error: cannot apply binary operation: bigint - bigintstdout is empty. The shell exit status is 0, despite the runtime failure (possibly related to #4588). A caller must currently inspect output/artifacts rather than trust successful process exit.
Expected: a nonnegative elapsed duration (typically serialized as "0" or "1"), and nonzero exit status for a runtime error.
This workaround succeeds:
let elapsed = now() - started;
result.elapsed = elapsed;Standalone 10n - 3n and now() - now() also succeed. This suggests a field-assignment compilation/runtime issue rather than missing bigint subtraction support. We have not diagnosed the compiler internals.
Impact: a pure-BAML OCR/extraction workflow completes its real worker calls but aborts while recording classifier latency. Moving the expression into a temporary local unblocks the workflow. This minimal reproduction contains no document data.
Source: BoundaryML/baml