Skip to content

Add test for the length of a function with a binding pattern rest parameter - #5180

Open
taxor03 wants to merge 1 commit into
tc39:mainfrom
taxor03:rest-pattern-expected-argument-count
Open

taxor03 wants to merge 1 commit into
tc39:mainfrom
taxor03:rest-pattern-expected-argument-count

Conversation

@taxor03

@taxor03 taxor03 commented Nov 17, 2026

Copy link
Copy Markdown

ExpectedArgumentCount does not count a FunctionRestParameter, whatever its binding. The existing tests check length for a BindingIdentifier rest parameter (expected-argument-count.js), and array-pattern.js and object-pattern.js cover a BindingPattern rest parameter but not length.

Engine that got this wrong:

The test passes (sloppy and strict) on V8 15.7.108, SpiderMonkey 158.0b5, JavaScriptCore 323410, XS (Moddable SDK 9.5.0), GraalJS 25.6.0-dev and quickjs-ng with the fix, and fails on quickjs-ng 0.18.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant