js-on-sx: fn proto chain walks through functions; fn.prototype = X persists
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 23s

This commit is contained in:
2026-05-09 12:07:34 +00:00
parent 4481f5f98b
commit adc4cb89c6
2 changed files with 10 additions and 0 deletions

View File

@@ -3300,6 +3300,8 @@
(cond
((= obj nil) js-undefined)
((js-undefined? obj) js-undefined)
((or (= (type-of obj) "lambda") (= (type-of obj) "function") (= (type-of obj) "component"))
(js-dict-get-walk (get js-function-global "prototype") skey))
((not (= (type-of obj) "dict")) js-undefined)
((dict-has? obj skey) (get obj skey))
((dict-has? obj "__proto__")
@@ -3383,6 +3385,12 @@
(dict-set! obj sk val)
val)))
((= (type-of obj) "list") (do (js-list-set! obj key val) val))
((and
(or (= (type-of obj) "lambda") (= (type-of obj) "function") (= (type-of obj) "component"))
(= (js-to-string key) "prototype"))
(let
((id (js-ctor-id obj)))
(begin (dict-set! __js_proto_table__ id val) val)))
(else val))))
(define
js-list-set!