Bug 142902

Summary: Computed Property names should allow only AssignmentExpressions not any Expression
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: JavaScriptCoreAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren, joepeck, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[PATCH] Proposed Fix rniwa: review+, rniwa: commit-queue-

Description Joseph Pecoraro 2015-03-20 00:16:23 PDT
* SUMMARY
Computed Property names should allow only AssignmentExpressions not any Expression:
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object-initializer

ComputedPropertyName[Yield] :
  [ AssignmentExpression[In, ?Yield] ]

* TEST
var x = { [1,"test"]: 1 }; // should throw an exception
Comment 1 Joseph Pecoraro 2015-03-20 00:27:01 PDT
Created attachment 249092 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2015-03-21 20:21:12 PDT
<http://trac.webkit.org/changeset/181829>