Closed
Bug 1155141
Opened 10 years ago
Closed 10 years ago
Object destructuring form is no longer valid
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1146136
People
(Reporter: getify, Unassigned)
References
()
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:39.0) Gecko/20100101 Firefox/39.0
Build ID: 20150312030248
Steps to reproduce:
This form used to be valid in ES6, but it was recently clarified:
var a, b;
( {a,b} ) = {a:1,b:2};
Parenthesized left-hand expressions are not allowed with the object destructuring form. Instead, you're now required to do:
var a, b;
( {a,b} = {a:1,b:2} );
The parenthesized left-hand expression form is disallowed for destructuring, but for compat sake it's kept for normal assignments:
var a;
(a) = 2; // still valid
Reporter | ||
Updated•10 years ago
|
Component: Untriaged → JavaScript Engine
OS: Mac OS X → All
Product: Firefox → Core
Hardware: x86 → All
Version: 39 Branch → 40 Branch
Updated•10 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•