[Webkit-unassigned] [Bug 247426] New: Duplicated name in class static block should be normal but throws SyntaxError

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 3 08:47:29 PDT 2022


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

            Bug ID: 247426
           Summary: Duplicated name in class static block should be normal
                    but throws SyntaxError
           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
class x { static { var x ; } }
________________________________

Hello,

Executing the input.js using JSC throws SyntaxError, but it is expected to terminate normally.

Running the input.js with JSC gives

---
$ jsc input.js
Exception: SyntaxError: Cannot declare a var variable that shadows a let/const/class variable: 'x'.
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/b5c076cb/attachment-0001.htm>


More information about the webkit-unassigned mailing list