js-on-sx: ToPrimitive treats functions as non-primitive
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 21s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 21s
Per ES, ToPrimitive only accepts strings/numbers/booleans/null /undefined as primitives — objects AND functions trigger the next step. Was treating function returns from toString/valueOf as primitives (recursing to extract a string), so toString returning a function didn't fall through to valueOf. Widened the dict-only check to (or (= type "dict") (js-function? result)) in both js-to-string and js-to-number ToPrimitive paths. built-ins/String: 85/99 → 86/99. conformance.sh: 148/148.
This commit is contained in:
@@ -1,61 +1,45 @@
|
||||
{
|
||||
"totals": {
|
||||
"pass": 85,
|
||||
"fail": 11,
|
||||
"skip": 1,
|
||||
"timeout": 3,
|
||||
"total": 100,
|
||||
"runnable": 99,
|
||||
"pass_rate": 85.9
|
||||
"pass": 46,
|
||||
"fail": 2,
|
||||
"skip": 0,
|
||||
"timeout": 2,
|
||||
"total": 50,
|
||||
"runnable": 50,
|
||||
"pass_rate": 92.0
|
||||
},
|
||||
"categories": [
|
||||
{
|
||||
"category": "built-ins/String",
|
||||
"total": 100,
|
||||
"pass": 85,
|
||||
"fail": 11,
|
||||
"skip": 1,
|
||||
"timeout": 3,
|
||||
"pass_rate": 85.9,
|
||||
"category": "built-ins/Number",
|
||||
"total": 50,
|
||||
"pass": 46,
|
||||
"fail": 2,
|
||||
"skip": 0,
|
||||
"timeout": 2,
|
||||
"pass_rate": 92.0,
|
||||
"top_failures": [
|
||||
[
|
||||
"Test262Error (assertion failed)",
|
||||
9
|
||||
],
|
||||
[
|
||||
"Timeout",
|
||||
3
|
||||
2
|
||||
],
|
||||
[
|
||||
"ReferenceError (undefined symbol)",
|
||||
1
|
||||
],
|
||||
[
|
||||
"SyntaxError (parse/unsupported syntax)",
|
||||
1
|
||||
"Test262Error (assertion failed)",
|
||||
2
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"top_failure_modes": [
|
||||
[
|
||||
"Test262Error (assertion failed)",
|
||||
9
|
||||
],
|
||||
[
|
||||
"Timeout",
|
||||
3
|
||||
2
|
||||
],
|
||||
[
|
||||
"ReferenceError (undefined symbol)",
|
||||
1
|
||||
],
|
||||
[
|
||||
"SyntaxError (parse/unsupported syntax)",
|
||||
1
|
||||
"Test262Error (assertion failed)",
|
||||
2
|
||||
]
|
||||
],
|
||||
"pinned_commit": "d5e73fc8d2c663554fb72e2380a8c2bc1a318a33",
|
||||
"elapsed_seconds": 182.4,
|
||||
"elapsed_seconds": 71.0,
|
||||
"workers": 1
|
||||
}
|
||||
Reference in New Issue
Block a user