Bug 171048

Summary: Should not be able to use a keyword in object literal shorthand syntax
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: joepeck, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Joseph Pecoraro
Reported 2017-04-20 01:35:22 PDT
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
Joseph Pecoraro
Comment 1 2017-04-21 11:34:55 PDT
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 ***
Note You need to log in before you can comment on or make changes to this bug.