Closed
Bug 507850
Opened 16 years ago
Closed 16 years ago
Destructing object assignment does not support var {Identifier} = ...; syntax sugar
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 454505
People
(Reporter: mozilla, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.12) Gecko/2009070811 Ubuntu/9.04 (jaunty) Firefox/3.0.12 FirePHP/0.3
Build Identifier: CVS
Rhino's JS 1.7 destructing assignment misses out on the syntax sugar:
Rhino supports the normal
var {Foo:Foo} = {Foo:true};
However it doesn't support (SpiderMonkey does):
var {Foo} = {Foo:true};
Which is sugar for the form above.
Reproducible: Always
Steps to Reproduce:
1. Open up a shell with -version 170
2. Type in `var {Foo} = {Foo:true};
Actual Results:
You get a syntax error.
Expected Results:
The variable `Foo` should be assigned the value of `true`.
Comment 1•16 years ago
|
||
This feature (dubbed object destructuring shorthand) was introduced in JavaScript 1.8. Rhino (CVS HEAD) does have partial support for JS 1.8 and in fact supports this feature, but you have to explicitly start it with -version 180.
Closing as duplicate of bug #454505.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•