| Summary: | SyntaxError Duplicate parameter in function with destructuring with assignment | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris <ychris2010-1> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | ashvayka, edward, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | Safari 14 | ||
| Hardware: | Mac (Intel) | ||
| OS: | macOS 10.15 | ||
This was fixed in https://commits.webkit.org/256478@main *** This bug has been marked as a duplicate of bug 247433 *** |
Webkit throws a SyntaxError with message "Duplicate parameter <name> not allowed in function with destructuring parameters." when attempting to assign a function to another variable. This does not occur if the function is declared separately from the assignment. Works: function a({ test: a }) { console.log(a); } let b = a; Throws SyntaxError: let b = function a({ test: a }) { console.log(a); }; Reproduced with Webkit build 271364