js-on-sx: js-to-number throws TypeError on non-primitive
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s

Mirrors the earlier js-to-string fix. Number(obj) must throw
if ToPrimitive cannot extract a primitive (both valueOf and
toString return objects). Was returning NaN silently. Replaced
the inner (js-nan-value) fallback with (raise (js-new-call
TypeError ...)).
built-ins/Number: 45/50 → 46/50. conformance.sh: 148/148.
This commit is contained in:
2026-05-08 10:53:58 +00:00
parent 4c11c4e1b9
commit f03aa3056d
4 changed files with 27 additions and 25 deletions

View File

@@ -1,29 +1,29 @@
{
"totals": {
"pass": 44,
"fail": 6,
"pass": 46,
"fail": 2,
"skip": 0,
"timeout": 0,
"timeout": 2,
"total": 50,
"runnable": 50,
"pass_rate": 88.0
"pass_rate": 92.0
},
"categories": [
{
"category": "built-ins/Object",
"category": "built-ins/Number",
"total": 50,
"pass": 44,
"fail": 6,
"pass": 46,
"fail": 2,
"skip": 0,
"timeout": 0,
"pass_rate": 88.0,
"timeout": 2,
"pass_rate": 92.0,
"top_failures": [
[
"ReferenceError (undefined symbol)",
4
"Timeout",
2
],
[
"SyntaxError (parse/unsupported syntax)",
"Test262Error (assertion failed)",
2
]
]
@@ -31,15 +31,15 @@
],
"top_failure_modes": [
[
"ReferenceError (undefined symbol)",
4
"Timeout",
2
],
[
"SyntaxError (parse/unsupported syntax)",
"Test262Error (assertion failed)",
2
]
],
"pinned_commit": "d5e73fc8d2c663554fb72e2380a8c2bc1a318a33",
"elapsed_seconds": 38.2,
"elapsed_seconds": 90.4,
"workers": 1
}