Bug 171048
Summary: | Should not be able to use a keyword in object literal shorthand syntax | ||
---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | joepeck, saam |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Joseph Pecoraro
Summary:
Should not be able to use a keyword in object literal shorthand syntax
Test:
js> var o = {class};
Expected:
SyntaxError - cannot use a reserved word here
Actual:
ReferenceError - no variable named class
Notes:
• Chrome: Uncaught SyntaxError: Unexpected token }
• Firefox: SyntaxError: keyword 'class' is a reserved identifier
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Joseph Pecoraro
I have a fix for this, but I'm going to include the fix in:
https://bugs.webkit.org/show_bug.cgi?id=170979
*** This bug has been marked as a duplicate of bug 170979 ***