RESOLVED FIXED247497
Access of import in LHS throws unexpected `SyntaxError`
https://bugs.webkit.org/show_bug.cgi?id=247497
Summary Access of import in LHS throws unexpected `SyntaxError`
Kanguk Lee
Reported 2022-11-04 12:10:54 PDT
// 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
Attachments
Radar WebKit Bug Importer
Comment 1 2022-11-07 16:22:01 PST
Yusuke Suzuki
Comment 2 2022-11-07 22:54:47 PST
EWS
Comment 3 2022-11-08 17:46:44 PST
Committed 256470@main (90b95a3284a6): <https://commits.webkit.org/256470@main> Reviewed commits have been landed. Closing PR #6240 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.