js-on-sx: TypeError-on-not-callable uses type-of, not (str fn-val)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 56s

Formatting wrapper dicts with (str fn-val) recursively walks the
proto chain through SX inspect — for String/Number wrappers whose
prototype contains lambdas this hangs. Switched the message to
(type-of fn-val), e.g. "dict is not a function". Less specific
but always terminates.
built-ins/String: 73/99 → 75/99 (canonical). conformance.sh:
148/148.
This commit is contained in:
2026-05-07 16:54:06 +00:00
parent 843c3a7e5e
commit 95fb5ef8ef
4 changed files with 22 additions and 20 deletions

View File

@@ -430,7 +430,7 @@
(raise
(js-new-call
TypeError
(list (str (str fn-val) " is not a function"))))
(list (str (type-of fn-val) " is not a function"))))
(cond
((= (len args) 0) (callable))
((= (len args) 1) (callable (nth args 0)))