js-on-sx: raise JS TypeError for non-callable callee, undefined()
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 59s

Calling a non-callable raised an OCaml-level Eval_error "Not callable"
that JS try/catch couldn't intercept. Added a (js-function? callable)
precheck in js-apply-fn that raises a TypeError instance via
(js-new-call TypeError (list msg)) so e instanceof TypeError is
true. Same swap for the undefined() branch in js-call-plain (was
raising a bare string). built-ins/String: 71/99 → 73/99 (canonical),
74/99 → 75/99 (isolated). conformance.sh: 148/148.
This commit is contained in:
2026-05-07 15:58:16 +00:00
parent cf0ba8a02a
commit 843c3a7e5e
4 changed files with 56 additions and 45 deletions

View File

@@ -1,22 +1,22 @@
{
"totals": {
"pass": 71,
"fail": 22,
"pass": 73,
"fail": 20,
"skip": 1,
"timeout": 6,
"total": 100,
"runnable": 99,
"pass_rate": 71.7
"pass_rate": 73.7
},
"categories": [
{
"category": "built-ins/String",
"total": 100,
"pass": 71,
"fail": 22,
"pass": 73,
"fail": 20,
"skip": 1,
"timeout": 6,
"pass_rate": 71.7,
"pass_rate": 73.7,
"top_failures": [
[
"Test262Error (assertion failed)",
@@ -31,11 +31,11 @@
6
],
[
"Unhandled: Not callable: \\\\\\",
2
"ReferenceError (undefined symbol)",
1
],
[
"ReferenceError (undefined symbol)",
"SyntaxError (parse/unsupported syntax)",
1
]
]
@@ -54,10 +54,6 @@
"Timeout",
6
],
[
"Unhandled: Not callable: \\\\\\",
2
],
[
"ReferenceError (undefined symbol)",
1
@@ -68,6 +64,6 @@
]
],
"pinned_commit": "d5e73fc8d2c663554fb72e2380a8c2bc1a318a33",
"elapsed_seconds": 375.3,
"elapsed_seconds": 280.3,
"workers": 1
}