Files
scriptc/packages/compiler/test
Chris Tateandespetro fd8ac00e63 Convert global isFinite's argument with ToNumber
Global isFinite now converts any argument with ToNumber before the test,
the same way global isNaN does, and only Number.isFinite stays strict.
Before, an argument that wasn't typed as a number, such as a checker-unknown
or dynamic value, refused with SC2012.

The shared ToNumber conversion for these arguments (isNaN, isFinite, the
Math functions, String.fromCharCode, DataView offsets) now handles every
value kind: strings parse as numeric literals, booleans and null convert
to numbers, undefined is NaN, and dynamic values call valueOf/toString or
throw Node's TypeError for a Symbol or BigInt. Before, a dynamic value
went through a checked number cast and threw a TypeError for a string,
and a string or boolean in a JavaScript file reached a run-time SC1090.

Fixes #1386

Co-authored-by: espetro <26749475+espetro@users.noreply.github.com>
2026-10-21 08:53:09 -05:00
..
2026-10-14 21:17:46 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-19 07:55:06 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-14 21:09:51 -05:00
2026-10-20 11:00:03 -05:00