js-on-sx: number/boolean method dispatch falls back to Number/Boolean.prototype
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 40s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 40s
This commit is contained in:
@@ -442,11 +442,16 @@
|
||||
((= key "toPrecision") (js-to-string recv))
|
||||
((= key "toExponential") (js-to-string recv))
|
||||
(else
|
||||
(error
|
||||
(str
|
||||
"TypeError: "
|
||||
(js-to-string key)
|
||||
" is not a function (on number)"))))))
|
||||
(let
|
||||
((m (js-dict-get-walk (get Number "prototype") (js-to-string key))))
|
||||
(cond
|
||||
((js-undefined? m)
|
||||
(error
|
||||
(str
|
||||
"TypeError: "
|
||||
(js-to-string key)
|
||||
" is not a function (on number)")))
|
||||
(else (js-call-with-this recv m args))))))))
|
||||
|
||||
(define
|
||||
js-invoke-function-objproto
|
||||
@@ -472,11 +477,16 @@
|
||||
((= key "toString") (if recv "true" "false"))
|
||||
((= key "valueOf") recv)
|
||||
(else
|
||||
(error
|
||||
(str
|
||||
"TypeError: "
|
||||
(js-to-string key)
|
||||
" is not a function (on boolean)"))))))
|
||||
(let
|
||||
((m (js-dict-get-walk (get Boolean "prototype") (js-to-string key))))
|
||||
(cond
|
||||
((js-undefined? m)
|
||||
(error
|
||||
(str
|
||||
"TypeError: "
|
||||
(js-to-string key)
|
||||
" is not a function (on boolean)")))
|
||||
(else (js-call-with-this recv m args))))))))
|
||||
|
||||
(define
|
||||
js-num-to-str-radix
|
||||
|
||||
Reference in New Issue
Block a user