| Summary: | SyntaxError is thrown when parameter in array pattern and function have same name | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kanguk Lee <p51lee> |
| Component: | JavaScriptCore | Assignee: | Yijia Huang <yijia_huang> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | mark.lam, webkit-bug-importer, ychris2010-1, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Pull request: https://github.com/WebKit/WebKit/pull/6257 Committed 256478@main (a44c26d2439a): <https://commits.webkit.org/256478@main> Reviewed commits have been landed. Closing PR #6257 and removing active labels. *** Bug 220517 has been marked as a duplicate of this bug. *** |
// input.js ( function x ( [ x ] ) { } ( [ ] ) ) ; __________________________________________ Hello, Executing the input.js using JSC throws SyntaxError, but it is expected to be terminated normally. Running the input.js with JSC results in: --- $ jsc input.js Exception: SyntaxError: Duplicate parameter 'x' not allowed in function with destructuring parameters. at input.js:1 --- while other engines behave like: --- # V8 $ node input.js // no error # GraalJS $ js input.js // no error --- WebKit version: 615.1.10