Fix tests that had syntax errors with empty object literal property accesses

This commit is contained in:
Henry Mercer
2017-08-19 01:33:28 +01:00
parent eff6a3a7b6
commit 70c4aa8fdc
7 changed files with 11 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ for (var _i = 0, _a = [{}]; _i < _a.length; _i++) {
continue;
}
// 2:
for (var _c = a, a = {}[_c]; false;)
for (var _c = a, a = ({})[_c]; false;)
continue;
// 3:
var _d = b, b = {}[_d];
var _d = b, b = ({})[_d];

View File

@@ -4,4 +4,4 @@ let {[foo2()]: bar3} = {};
//// [computedPropertiesInDestructuring2.js]
var foo2 = function () { return "bar"; };
var _a = foo2(), bar3 = {}[_a];
var _a = foo2(), bar3 = ({})[_a];

View File

@@ -98,11 +98,11 @@ function f5() {
z;
}
function f6() {
var x = {}.x;
var x = ({}).x;
x;
var y = {}.y;
var y = ({}).y;
y;
var _a = {}.z, z = _a === void 0 ? "" : _a;
var _a = ({}).z, z = _a === void 0 ? "" : _a;
z;
}
function f7() {

View File

@@ -60,7 +60,7 @@ var {"prop2": d1} = foo1();
// V is an object assignment pattern and, for each assignment property P in V,
// S is the type Any, or
var a1 = undefined.a1;
var a2 = {}.a2;
var a2 = ({}).a2;
// V is an object assignment pattern and, for each assignment property P in V,
// S has an apparent property with the property name specified in
// P of a type that is assignable to the target given in P, or

View File

@@ -194,12 +194,12 @@ function foo({a = 4, b = { x: 5 }}) {
});
(function () {
var y1;
(_a = {}.y1, y1 = _a === void 0 ? 5 : _a);
(_a = ({}).y1, y1 = _a === void 0 ? 5 : _a);
var _a;
});
(function () {
var y1;
(_a = {}.y1, y1 = _a === void 0 ? 5 : _a);
(_a = ({}).y1, y1 = _a === void 0 ? 5 : _a);
var _a;
});
(function () {

View File

@@ -4,6 +4,6 @@ var x = {
}
//// [templateStringInPropertyName1.js]
var x = (_a = ["a"], _a.raw = ["a"], {}(_a));
var x = (_a = ["a"], _a.raw = ["a"], ({})(_a));
321;
var _a;

View File

@@ -4,6 +4,6 @@ var x = {
}
//// [templateStringInPropertyName2.js]
var x = (_a = ["abc", "def", "ghi"], _a.raw = ["abc", "def", "ghi"], {}(_a, 123, 456));
var x = (_a = ["abc", "def", "ghi"], _a.raw = ["abc", "def", "ghi"], ({})(_a, 123, 456));
321;
var _a;