Bug 142902 - Computed Property names should allow only AssignmentExpressions not any Expression
Summary: Computed Property names should allow only AssignmentExpressions not any Expre...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-20 00:16 PDT by Joseph Pecoraro
Modified: 2015-03-21 20:21 PDT (History)
3 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (8.96 KB, patch)
2015-03-20 00:27 PDT, Joseph Pecoraro
rniwa: review+
rniwa: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>