[Webkit-unassigned] [Bug 247433] New: SyntaxError is thrown when parameter in array pattern and function have same name

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 3 09:09:46 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=247433

            Bug ID: 247433
           Summary: SyntaxError is thrown when parameter in array pattern
                    and function have same name
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: p51lee at kaist.ac.kr

// 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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221103/890fde6d/attachment.htm>


More information about the webkit-unassigned mailing list