js-on-sx: JS functions accept extra args silently
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 22s

SX strictly arity-checks lambdas; JS allows passing more args than
declared (extras accessible via arguments). Was raising "f expects
1 args, got 2" whenever Array.from passed (value, index) to a
1-arg mapFn. Fixed in js-build-param-list: every JS param list
now ends with &rest __extra_args__ unless an explicit rest is
present, so extras are silently absorbed.
conformance.sh: 148/148.
This commit is contained in:
2026-05-08 06:36:54 +00:00
parent b1023f11d9
commit bfec2a4320
4 changed files with 5 additions and 3 deletions

View File

@@ -56,6 +56,6 @@
]
],
"pinned_commit": "d5e73fc8d2c663554fb72e2380a8c2bc1a318a33",
"elapsed_seconds": 146.9,
"elapsed_seconds": 154.6,
"workers": 1
}

View File

@@ -1,7 +1,7 @@
# test262 scoreboard
Pinned commit: `d5e73fc8d2c663554fb72e2380a8c2bc1a318a33`
Wall time: 146.9s
Wall time: 154.6s
**Total:** 80/99 runnable passed (80.8%). Raw: pass=80 fail=13 skip=1 timeout=6 total=100.

View File

@@ -930,7 +930,7 @@
(fn
(params)
(cond
((empty? params) (list))
((empty? params) (list (js-sym "&rest") (js-sym "__extra_args__")))
((and (list? (first params)) (js-tag? (first params) "js-rest"))
(list (js-sym "&rest") (js-sym (nth (first params) 1))))
(else