always coerce leading computed property initialisers into the init object - fixes #1820
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var _obj;
|
||||
|
||||
var obj = (_obj = {
|
||||
foo: "bar"
|
||||
}, _obj[bar] = "foo", _obj);
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"blacklist": ["es5.properties.mutators"],
|
||||
"loose": ["es6.properties.computed"]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var obj = {
|
||||
first: "first",
|
||||
["second"]: "second",
|
||||
[second]: "second",
|
||||
};
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
var _obj;
|
||||
|
||||
var obj = (_obj = {}, _obj.first = "first", _obj["second"] = "second", _obj);
|
||||
var obj = (_obj = {
|
||||
first: "first"
|
||||
}, _obj[second] = "second", _obj);
|
||||
|
||||
Reference in New Issue
Block a user