Closed ptomato closed 3 years ago
According to this ToNumber(1n) should throw a TypeError. Instead the result is 1:
ToNumber(1n)
import ToNumber from 'es-abstract/2020/ToNumber'; import assert from 'assert'; assert.throws(() => ToNumber(1n), TypeError);
Thanks, good catch! Released in v1.18.3.
According to this
ToNumber(1n)
should throw a TypeError. Instead the result is 1: