RESOLVED FIXED247606
Access of template literal in LHS throws unexpected `SyntaxError`
https://bugs.webkit.org/show_bug.cgi?id=247606
Summary Access of template literal in LHS throws unexpected `SyntaxError`
Kanguk Lee
Reported 2022-11-08 03:27:05 PST
// input.js `${ + 0 }` [ 0 ] = 0 ; // Note: this is fine // `${ 0 }` [ 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 bugs I found: https://bugs.webkit.org/show_bug.cgi?id=247435 and https://bugs.webkit.org/show_bug.cgi?id=247497. However, I personally think this may not be a duplicate of Bug 247435 and Bug 247497, 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-09 10:29:00 PST
Yusuke Suzuki
Comment 2 2022-11-09 12:24:43 PST
EWS
Comment 3 2022-11-09 14:27:44 PST
Committed 256500@main (8900c3f92d08): <https://commits.webkit.org/256500@main> Reviewed commits have been landed. Closing PR #6312 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.