[Webkit-unassigned] [Bug 247497] New: Access of import in LHS throws unexpected `SyntaxError`

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 4 12:10:54 PDT 2022


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

            Bug ID: 247497
           Summary: Access of import in LHS throws unexpected
                    `SyntaxError`
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: p51lee at kaist.ac.kr

// input.js ( file.js exists in current directory)
import ( "file" + ".js" ) [ 0 ] = 0 ;
// Note: this is fine
// import ( "file.js" ) [ 0 ] = 0 ;
_____________________

Hello,

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

This bug looks similar to the bug I found yesterday: https://bugs.webkit.org/show_bug.cgi?id=247435.

However, I personally think this may not be a duplicate of Bug 247435, so please let me know if this bug is duplicated or not.

Running the input.js with JSC results in:

---
$ jsc input.js
Exception: SyntaxError: Left hand side of operator '=' must be a reference.
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/20221104/e6be8a8b/attachment.htm>


More information about the webkit-unassigned mailing list