Incorrect minification with a bigint value created by a binary operator inside conditions (original) (raw)

For input

export function foo(a, b) { if ((a | b) === 0) { throw new Error() } }

esbuild outputs

export function foo(o,r){if(!(o|r))throw new Error}

But this changes the behavior when foo(0n, 0n) is called.
No error happens before minification, but an error happens after minification.