js-on-sx: bind returns dict-with-__callable__ for property mutation + length
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 47s

This commit is contained in:
2026-05-09 14:47:54 +00:00
parent 802544fdc6
commit 7fc37abe02
2 changed files with 15 additions and 3 deletions

View File

@@ -373,9 +373,19 @@
(< (len args) 1)
(list)
(js-list-slice args 1 (len args)))))
(fn
(&rest more)
(js-call-with-this this-arg recv (js-list-concat bound more)))))))
(let
((target-len (js-fn-length recv)))
(let
((bound-len
(let ((d (- target-len (len bound))))
(if (< d 0) 0 d))))
{:__callable__
(fn
(&rest more)
(js-call-with-this this-arg recv (js-list-concat bound more)))
:length bound-len
:name "bound"
:__js_bound_target__ recv}))))))
((= key "toString")
(let
((override (js-dict-get-walk (get js-function-global "prototype") "toString")))