Bug 220517

Summary: SyntaxError Duplicate parameter in function with destructuring with assignment
Product: WebKit Reporter: Chris <ychris2010-1>
Component: New BugsAssignee: 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   

Chris
Reported 2021-01-11 11:26:25 PST
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
Attachments
Radar WebKit Bug Importer
Comment 1 2021-01-18 11:27:12 PST
Alexey Shvayka
Comment 2 2023-10-12 15:09:54 PDT
This was fixed in https://commits.webkit.org/256478@main *** This bug has been marked as a duplicate of bug 247433 ***
Note You need to log in before you can comment on or make changes to this bug.