always coerce leading computed property initialisers into the init object - fixes #1820

This commit is contained in:
Sebastian McKenzie
2015-06-25 04:10:56 +01:00
parent a6f04055c0
commit 0b1ce6c9a4
6 changed files with 77 additions and 26 deletions

View File

@@ -0,0 +1,7 @@
"use strict";
var _obj;
var obj = (_obj = {
foo: "bar"
}, _obj[bar] = "foo", _obj);

View File

@@ -1,3 +1,4 @@
{
"blacklist": ["es5.properties.mutators"],
"loose": ["es6.properties.computed"]
}

View File

@@ -1,4 +1,4 @@
var obj = {
first: "first",
["second"]: "second",
[second]: "second",
};

View File

@@ -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);