WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 197603
190889
Throw early ReferenceError for invalid AssignmentTargetType
https://bugs.webkit.org/show_bug.cgi?id=190889
Summary
Throw early ReferenceError for invalid AssignmentTargetType
Leo Balter
Reported
2018-10-24 15:02:11 PDT
While I was working on new tests for import() I found that JSC is not throwing early ReferenceErrors described in updateexpressions and assignmentexpressions. This commit lists some examples:
https://github.com/tc39/test262/pull/1897/commits/04d40998568e093c87a887e68029d247e126806e
The ReferenceError happens on runtime evaluation phase, it should happen in the parse phase. Some examples using dynamic import: ``` import('')-- import('')++ ++import('') --import('') import('') = 1 import('') *= 1 ``` I also found this bug is not only for dynamic import and it's happening with other invalid AssignmentTargetTypes: ``` throw "foo"; (() => 1) = 1 ``` The code above should throw a ReferenceError and not "foo". --- This bug might be a duplicate of
Bug 177218
, but I didn't have time to fully review this other report, yet.
Attachments
Add attachment
proposed patch, testcase, etc.
Ross Kirsling
Comment 1
2018-11-28 12:46:16 PST
Yeah,
bug 177218
appears to be the general bug for "JSC lacks the notion of an early ReferenceError".
Ross Kirsling
Comment 2
2019-05-05 22:09:44 PDT
*** This bug has been marked as a duplicate of
bug 197603
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug