diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index f3d1338d95..9ecc936e3c 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2090,15 +2090,7 @@ module ts { // Create a temporary variable with a unique unused name. The forLoopVariable parameter signals that the // name should be one that is appropriate for a for loop variable. function createTempVariable(location: Node, forLoopVariable?: boolean): Identifier { - var name = forLoopVariable ? "_i" : undefined; - while (true) { - if (name && !isExistingName(location, name)) { - break; - } - // _a .. _h, _j ... _z, _0, _1, ... - name = "_" + (tempCount < 25 ? String.fromCharCode(tempCount + (tempCount < 8 ? 0 : 1) + CharacterCodes.a) : tempCount - 25); - tempCount++; - } + var name = generateUniqueNameForLocation(location, /*baseName*/ forLoopVariable ? "_i" : "_a"); var result = createSynthesizedNode(SyntaxKind.Identifier); result.text = name; return result; diff --git a/tests/baselines/reference/callWithSpread.js b/tests/baselines/reference/callWithSpread.js index d676c0f2a3..02b6b9b8ff 100644 --- a/tests/baselines/reference/callWithSpread.js +++ b/tests/baselines/reference/callWithSpread.js @@ -81,8 +81,8 @@ obj.foo.apply(obj, [1, 2].concat(a)); obj.foo.apply(obj, [1, 2].concat(a, ["abc"])); xa[1].foo(1, 2, "abc"); (_a = xa[1]).foo.apply(_a, [1, 2].concat(a)); -(_b = xa[1]).foo.apply(_b, [1, 2].concat(a, ["abc"])); -(_c = xa[1]).foo.apply(_c, [1, 2, "abc"]); +(_a_1 = xa[1]).foo.apply(_a_1, [1, 2].concat(a, ["abc"])); +(_a_2 = xa[1]).foo.apply(_a_2, [1, 2, "abc"]); var C = (function () { function C(x, y) { var z = []; @@ -114,4 +114,4 @@ var D = (function (_super) { })(C); // Only supported in when target is ES6 var c = new C(1, 2, ...a); -var _a, _b, _c; +var _a, _a_1, _a_2; diff --git a/tests/baselines/reference/collisionRestParameterArrowFunctions.js b/tests/baselines/reference/collisionRestParameterArrowFunctions.js index 39d449555d..b70bb6c211 100644 --- a/tests/baselines/reference/collisionRestParameterArrowFunctions.js +++ b/tests/baselines/reference/collisionRestParameterArrowFunctions.js @@ -16,8 +16,8 @@ var f2NoError = () => { //// [collisionRestParameterArrowFunctions.js] var f1 = function (_i) { var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 1] = arguments[_i_1]; } var _i = 10; // no error }; @@ -26,8 +26,8 @@ var f1NoError = function (_i) { }; var f2 = function () { var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a - 0] = arguments[_a]; + for (var _i_1 = 0; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 0] = arguments[_i_1]; } var _i = 10; // No Error }; diff --git a/tests/baselines/reference/collisionRestParameterClassConstructor.js b/tests/baselines/reference/collisionRestParameterClassConstructor.js index fc6e400668..de3fd3c671 100644 --- a/tests/baselines/reference/collisionRestParameterClassConstructor.js +++ b/tests/baselines/reference/collisionRestParameterClassConstructor.js @@ -71,8 +71,8 @@ declare class c6NoError { var c1 = (function () { function c1(_i) { var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 1] = arguments[_i_1]; } var _i = 10; // no error } @@ -87,8 +87,8 @@ var c1NoError = (function () { var c2 = (function () { function c2() { var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a - 0] = arguments[_a]; + for (var _i_1 = 0; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 0] = arguments[_i_1]; } var _i = 10; // no error } @@ -103,8 +103,8 @@ var c2NoError = (function () { var c3 = (function () { function c3(_i) { var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 1] = arguments[_i_1]; } this._i = _i; var _i = 10; // no error @@ -121,8 +121,8 @@ var c3NoError = (function () { var c5 = (function () { function c5(_i) { var rest = []; - for (var _a = 1; _a < arguments.length; _a++) { - rest[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + rest[_i_1 - 1] = arguments[_i_1]; } var _i; // no error } diff --git a/tests/baselines/reference/collisionRestParameterClassMethod.js b/tests/baselines/reference/collisionRestParameterClassMethod.js index e3471c85f1..3478dda615 100644 --- a/tests/baselines/reference/collisionRestParameterClassMethod.js +++ b/tests/baselines/reference/collisionRestParameterClassMethod.js @@ -44,8 +44,8 @@ var c1 = (function () { } c1.prototype.foo = function (_i) { var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 1] = arguments[_i_1]; } var _i = 10; // no error }; @@ -54,8 +54,8 @@ var c1 = (function () { }; c1.prototype.f4 = function (_i) { var rest = []; - for (var _a = 1; _a < arguments.length; _a++) { - rest[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + rest[_i_1 - 1] = arguments[_i_1]; } var _i; // no error }; @@ -69,8 +69,8 @@ var c3 = (function () { } c3.prototype.foo = function () { var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a - 0] = arguments[_a]; + for (var _i_1 = 0; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 0] = arguments[_i_1]; } var _i = 10; // no error }; diff --git a/tests/baselines/reference/collisionRestParameterFunction.js b/tests/baselines/reference/collisionRestParameterFunction.js index 8660e8f5db..98c2b2296e 100644 --- a/tests/baselines/reference/collisionRestParameterFunction.js +++ b/tests/baselines/reference/collisionRestParameterFunction.js @@ -37,8 +37,8 @@ declare function f6(_i: string); // no codegen no error // Functions function f1(_i) { var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 1] = arguments[_i_1]; } var _i = 10; // no error } @@ -47,8 +47,8 @@ function f1NoError(_i) { } function f3() { var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a - 0] = arguments[_a]; + for (var _i_1 = 0; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 0] = arguments[_i_1]; } var _i = 10; // no error } @@ -57,8 +57,8 @@ function f3NoError() { } function f4(_i) { var rest = []; - for (var _a = 1; _a < arguments.length; _a++) { - rest[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + rest[_i_1 - 1] = arguments[_i_1]; } } function f4NoError(_i) { diff --git a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js index 22709b087e..478446bd5e 100644 --- a/tests/baselines/reference/collisionRestParameterFunctionExpressions.js +++ b/tests/baselines/reference/collisionRestParameterFunctionExpressions.js @@ -28,8 +28,8 @@ function foo() { function foo() { function f1(_i) { var restParameters = []; - for (var _a = 1; _a < arguments.length; _a++) { - restParameters[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 1] = arguments[_i_1]; } var _i = 10; // no error } @@ -38,8 +38,8 @@ function foo() { } function f3() { var restParameters = []; - for (var _a = 0; _a < arguments.length; _a++) { - restParameters[_a - 0] = arguments[_a]; + for (var _i_1 = 0; _i_1 < arguments.length; _i_1++) { + restParameters[_i_1 - 0] = arguments[_i_1]; } var _i = 10; // no error } @@ -48,8 +48,8 @@ function foo() { } function f4(_i) { var rest = []; - for (var _a = 1; _a < arguments.length; _a++) { - rest[_a - 1] = arguments[_a]; + for (var _i_1 = 1; _i_1 < arguments.length; _i_1++) { + rest[_i_1 - 1] = arguments[_i_1]; } } function f4NoError(_i) { diff --git a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js index adc9c09de2..9316dba316 100644 --- a/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js +++ b/tests/baselines/reference/collisionRestParameterUnderscoreIUsage.js @@ -13,8 +13,8 @@ var _i = "This is what I'd expect to see"; var Foo = (function () { function Foo() { var args = []; - for (var _a = 0; _a < arguments.length; _a++) { - args[_a - 0] = arguments[_a]; + for (var _i_1 = 0; _i_1 < arguments.length; _i_1++) { + args[_i_1 - 0] = arguments[_i_1]; } console.log(_i); // This should result in error } diff --git a/tests/baselines/reference/computedPropertyNames48_ES5.js b/tests/baselines/reference/computedPropertyNames48_ES5.js index c5ca0d5b24..d14faab73e 100644 --- a/tests/baselines/reference/computedPropertyNames48_ES5.js +++ b/tests/baselines/reference/computedPropertyNames48_ES5.js @@ -26,10 +26,10 @@ var a; extractIndexer((_a = {}, _a[a] = "", _a)); // Should return string -extractIndexer((_b = {}, - _b[0 /* x */] = "", - _b)); // Should return string -extractIndexer((_c = {}, - _c["" || 0] = "", - _c)); // Should return any (widened form of undefined) -var _a, _b, _c; +extractIndexer((_a_1 = {}, + _a_1[0 /* x */] = "", + _a_1)); // Should return string +extractIndexer((_a_2 = {}, + _a_2["" || 0] = "", + _a_2)); // Should return any (widened form of undefined) +var _a, _a_1, _a_2; diff --git a/tests/baselines/reference/declarationWithNoInitializer.js b/tests/baselines/reference/declarationWithNoInitializer.js index 54d89368fb..ebe8f8b3b3 100644 --- a/tests/baselines/reference/declarationWithNoInitializer.js +++ b/tests/baselines/reference/declarationWithNoInitializer.js @@ -5,4 +5,4 @@ var {c, d}; // Error, no initializer //// [declarationWithNoInitializer.js] var _a = void 0, a = _a[0], b = _a[1]; // Error, no initializer -var _b = void 0, c = _b.c, d = _b.d; // Error, no initializer +var _a_1 = void 0, c = _a_1.c, d = _a_1.d; // Error, no initializer diff --git a/tests/baselines/reference/declarationsAndAssignments.js b/tests/baselines/reference/declarationsAndAssignments.js index 032f4cb0e6..3e67309663 100644 --- a/tests/baselines/reference/declarationsAndAssignments.js +++ b/tests/baselines/reference/declarationsAndAssignments.js @@ -184,9 +184,9 @@ function f21() { function f0() { var _a = [1, "hello"]; var x = ([1, "hello"])[0]; - var _b = [1, "hello"], x = _b[0], y = _b[1]; - var _c = [1, "hello"], x = _c[0], y = _c[1], z = _c[2]; // Error - var _d = [0, 1, 2], z = _d[2]; + var _a_1 = [1, "hello"], x = _a_1[0], y = _a_1[1]; + var _a_2 = [1, "hello"], x = _a_2[0], y = _a_2[1], z = _a_2[2]; // Error + var _a_3 = [0, 1, 2], z = _a_3[2]; var x; var y; } @@ -203,60 +203,60 @@ function f2() { var _a = { x: 5, y: "hello" }; var x = ({ x: 5, y: "hello" }).x; var y = ({ x: 5, y: "hello" }).y; - var _b = { x: 5, y: "hello" }, x = _b.x, y = _b.y; + var _a_1 = { x: 5, y: "hello" }, x = _a_1.x, y = _a_1.y; var x; var y; var a = ({ x: 5, y: "hello" }).x; var b = ({ x: 5, y: "hello" }).y; - var _c = { x: 5, y: "hello" }, a = _c.x, b = _c.y; + var _a_2 = { x: 5, y: "hello" }, a = _a_2.x, b = _a_2.y; var a; var b; } function f3() { - var _a = [1, ["hello", [true]]], x = _a[0], _b = _a[1], y = _b[0], z = _b[1][0]; + var _a = [1, ["hello", [true]]], x = _a[0], _a_1 = _a[1], y = _a_1[0], z = _a_1[1][0]; var x; var y; var z; } function f4() { - var _a = { a: 1, b: { a: "hello", b: { a: true } } }, x = _a.a, _b = _a.b, y = _b.a, z = _b.b.a; + var _a = { a: 1, b: { a: "hello", b: { a: true } } }, x = _a.a, _a_1 = _a.b, y = _a_1.a, z = _a_1.b.a; var x; var y; var z; } function f6() { - var _a = [1, "hello"], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? "" : _c; + var _a = [1, "hello"], _a_1 = _a[0], x = _a_1 === void 0 ? 0 : _a_1, _a_2 = _a[1], y = _a_2 === void 0 ? "" : _a_2; var x; var y; } function f7() { - var _a = [1, "hello"], _b = _a[0], x = _b === void 0 ? 0 : _b, _c = _a[1], y = _c === void 0 ? 1 : _c; // Error, initializer for y must be string + var _a = [1, "hello"], _a_1 = _a[0], x = _a_1 === void 0 ? 0 : _a_1, _a_2 = _a[1], y = _a_2 === void 0 ? 1 : _a_2; // Error, initializer for y must be string var x; var y; } function f8() { var _a = [], a = _a[0], b = _a[1], c = _a[2]; // Ok, [] is an array - var _b = [1], d = _b[0], e = _b[1], f = _b[2]; // Error, [1] is a tuple + var _a_1 = [1], d = _a_1[0], e = _a_1[1], f = _a_1[2]; // Error, [1] is a tuple } function f9() { var _a = {}, a = _a[0], b = _a[1]; // Error, not array type - var _b = { 0: 10, 1: 20 }, c = _b[0], d = _b[1]; // Error, not array type - var _c = [10, 20], e = _c[0], f = _c[1]; + var _a_1 = { 0: 10, 1: 20 }, c = _a_1[0], d = _a_1[1]; // Error, not array type + var _a_2 = [10, 20], e = _a_2[0], f = _a_2[1]; } function f10() { var _a = {}, a = _a.a, b = _a.b; // Error - var _b = [], a = _b.a, b = _b.b; // Error + var _a_1 = [], a = _a_1.a, b = _a_1.b; // Error } function f11() { var _a = { x: 10, y: "hello" }, a = _a.x, b = _a.y; - var _b = { 0: 10, 1: "hello" }, a = _b[0], b = _b[1]; - var _c = { "<": 10, ">": "hello" }, a = _c["<"], b = _c[">"]; - var _d = [10, "hello"], a = _d[0], b = _d[1]; + var _a_1 = { 0: 10, 1: "hello" }, a = _a_1[0], b = _a_1[1]; + var _a_2 = { "<": 10, ">": "hello" }, a = _a_2["<"], b = _a_2[">"]; + var _a_3 = [10, "hello"], a = _a_3[0], b = _a_3[1]; var a; var b; } function f12() { - var _a = [1, ["hello", { x: 5, y: true }]], a = _a[0], _b = _a[1], _c = _b === void 0 ? ["abc", { x: 10, y: false }] : _b, b = _c[0], _d = _c[1], x = _d.x, c = _d.y; + var _a = [1, ["hello", { x: 5, y: true }]], a = _a[0], _a_1 = _a[1], _a_2 = _a_1 === void 0 ? ["abc", { x: 10, y: false }] : _a_1, b = _a_2[0], _a_3 = _a_2[1], x = _a_3.x, c = _a_3.y; var a; var b; var x; @@ -264,10 +264,10 @@ function f12() { } function f13() { var _a = [1, "hello"], x = _a[0], y = _a[1]; - var _b = [[x, y], { x: x, y: y }], a = _b[0], b = _b[1]; + var _a_1 = [[x, y], { x: x, y: y }], a = _a_1[0], b = _a_1[1]; } function f14(_a) { - var _b = _a[0], a = _b === void 0 ? 1 : _b, _c = _a[1], _d = _c[0], b = _d === void 0 ? "hello" : _d, _e = _c[1], x = _e.x, _f = _e.y, c = _f === void 0 ? false : _f; + var _a_1 = _a[0], a = _a_1 === void 0 ? 1 : _a_1, _a_2 = _a[1], _a_3 = _a_2[0], b = _a_3 === void 0 ? "hello" : _a_3, _a_4 = _a_2[1], x = _a_4.x, _a_5 = _a_4.y, c = _a_5 === void 0 ? false : _a_5; var a; var b; var c; @@ -290,7 +290,7 @@ function f16() { var _a = f15(), a = _a.a, b = _a.b, c = _a.c; } function f17(_a) { - var _b = _a.a, a = _b === void 0 ? "" : _b, _c = _a.b, b = _c === void 0 ? 0 : _c, _d = _a.c, c = _d === void 0 ? false : _d; + var _a_1 = _a.a, a = _a_1 === void 0 ? "" : _a_1, _a_2 = _a.b, b = _a_2 === void 0 ? 0 : _a_2, _a_3 = _a.c, c = _a_3 === void 0 ? false : _a_3; } f17({}); f17({ a: "hello" }); @@ -301,20 +301,20 @@ function f18() { var b; var aa; (_a = { a: a, b: b }, a = _a.a, b = _a.b, _a); - (_b = { b: b, a: a }, a = _b.a, b = _b.b, _b); - _c = [a, b], aa[0] = _c[0], b = _c[1]; - _d = [b, a], a = _d[0], b = _d[1]; // Error - _e = [2, "def"], _f = _e[0], a = _f === void 0 ? 1 : _f, _g = _e[1], b = _g === void 0 ? "abc" : _g; - var _a, _b, _c, _d, _e, _f, _g; + (_a_1 = { b: b, a: a }, a = _a_1.a, b = _a_1.b, _a_1); + _a_2 = [a, b], aa[0] = _a_2[0], b = _a_2[1]; + _a_3 = [b, a], a = _a_3[0], b = _a_3[1]; // Error + _a_4 = [2, "def"], _a_5 = _a_4[0], a = _a_5 === void 0 ? 1 : _a_5, _a_6 = _a_4[1], b = _a_6 === void 0 ? "abc" : _a_6; + var _a, _a_1, _a_2, _a_3, _a_4, _a_5, _a_6; } function f19() { var a, b; _a = [1, 2], a = _a[0], b = _a[1]; - _b = [b, a], a = _b[0], b = _b[1]; - (_c = { b: b, a: a }, a = _c.a, b = _c.b, _c); - _d = ([[2, 3]])[0], _e = _d === void 0 ? [1, 2] : _d, a = _e[0], b = _e[1]; - var x = (_f = [1, 2], a = _f[0], b = _f[1], _f); - var _a, _b, _c, _d, _e, _f; + _a_1 = [b, a], a = _a_1[0], b = _a_1[1]; + (_a_2 = { b: b, a: a }, a = _a_2.a, b = _a_2.b, _a_2); + _a_3 = ([[2, 3]])[0], _a_4 = _a_3 === void 0 ? [1, 2] : _a_3, a = _a_4[0], b = _a_4[1]; + var x = (_a_5 = [1, 2], a = _a_5[0], b = _a_5[1], _a_5); + var _a, _a_1, _a_2, _a_3, _a_4, _a_5; } function f20() { var a; @@ -322,14 +322,14 @@ function f20() { var y; var z; var _a = [1, 2, 3], a = _a.slice(0); - var _b = [1, 2, 3], x = _b[0], a = _b.slice(1); - var _c = [1, 2, 3], x = _c[0], y = _c[1], a = _c.slice(2); - var _d = [1, 2, 3], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); - _e = [1, 2, 3], a = _e.slice(0); - _f = [1, 2, 3], x = _f[0], a = _f.slice(1); - _g = [1, 2, 3], x = _g[0], y = _g[1], a = _g.slice(2); - _h = [1, 2, 3], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); - var _e, _f, _g, _h; + var _a_1 = [1, 2, 3], x = _a_1[0], a = _a_1.slice(1); + var _a_2 = [1, 2, 3], x = _a_2[0], y = _a_2[1], a = _a_2.slice(2); + var _a_3 = [1, 2, 3], x = _a_3[0], y = _a_3[1], z = _a_3[2], a = _a_3.slice(3); + _a_4 = [1, 2, 3], a = _a_4.slice(0); + _a_5 = [1, 2, 3], x = _a_5[0], a = _a_5.slice(1); + _a_6 = [1, 2, 3], x = _a_6[0], y = _a_6[1], a = _a_6.slice(2); + _a_7 = [1, 2, 3], x = _a_7[0], y = _a_7[1], z = _a_7[2], a = _a_7.slice(3); + var _a_4, _a_5, _a_6, _a_7; } function f21() { var a; @@ -337,12 +337,12 @@ function f21() { var y; var z; var _a = [1, "hello", true], a = _a.slice(0); - var _b = [1, "hello", true], x = _b[0], a = _b.slice(1); - var _c = [1, "hello", true], x = _c[0], y = _c[1], a = _c.slice(2); - var _d = [1, "hello", true], x = _d[0], y = _d[1], z = _d[2], a = _d.slice(3); - _e = [1, "hello", true], a = _e.slice(0); - _f = [1, "hello", true], x = _f[0], a = _f.slice(1); - _g = [1, "hello", true], x = _g[0], y = _g[1], a = _g.slice(2); - _h = [1, "hello", true], x = _h[0], y = _h[1], z = _h[2], a = _h.slice(3); - var _e, _f, _g, _h; + var _a_1 = [1, "hello", true], x = _a_1[0], a = _a_1.slice(1); + var _a_2 = [1, "hello", true], x = _a_2[0], y = _a_2[1], a = _a_2.slice(2); + var _a_3 = [1, "hello", true], x = _a_3[0], y = _a_3[1], z = _a_3[2], a = _a_3.slice(3); + _a_4 = [1, "hello", true], a = _a_4.slice(0); + _a_5 = [1, "hello", true], x = _a_5[0], a = _a_5.slice(1); + _a_6 = [1, "hello", true], x = _a_6[0], y = _a_6[1], a = _a_6.slice(2); + _a_7 = [1, "hello", true], x = _a_7[0], y = _a_7[1], z = _a_7[2], a = _a_7.slice(3); + var _a_4, _a_5, _a_6, _a_7; } diff --git a/tests/baselines/reference/destructuringParameterProperties1.js b/tests/baselines/reference/destructuringParameterProperties1.js index cc16cc78de..5842d68b60 100644 --- a/tests/baselines/reference/destructuringParameterProperties1.js +++ b/tests/baselines/reference/destructuringParameterProperties1.js @@ -58,4 +58,4 @@ var c2 = new C2(["10", 10, !!10]); var _a = [c2.x, c2.y, c2.z], c2_x = _a[0], c2_y = _a[1], c2_z = _a[2]; var c3 = new C3({ x: 0, y: "", z: false }); c3 = new C3({ x: 0, "y": "y", z: true }); -var _b = [c3.x, c3.y, c3.z], c3_x = _b[0], c3_y = _b[1], c3_z = _b[2]; +var _a_1 = [c3.x, c3.y, c3.z], c3_x = _a_1[0], c3_y = _a_1[1], c3_z = _a_1[2]; diff --git a/tests/baselines/reference/destructuringParameterProperties2.js b/tests/baselines/reference/destructuringParameterProperties2.js index 27e190af62..75b00d2ddf 100644 --- a/tests/baselines/reference/destructuringParameterProperties2.js +++ b/tests/baselines/reference/destructuringParameterProperties2.js @@ -53,6 +53,6 @@ var C1 = (function () { var x = new C1(undefined, [0, undefined, ""]); var _a = [x.getA(), x.getB(), x.getC()], x_a = _a[0], x_b = _a[1], x_c = _a[2]; var y = new C1(10, [0, "", true]); -var _b = [y.getA(), y.getB(), y.getC()], y_a = _b[0], y_b = _b[1], y_c = _b[2]; +var _a_1 = [y.getA(), y.getB(), y.getC()], y_a = _a_1[0], y_b = _a_1[1], y_c = _a_1[2]; var z = new C1(10, [undefined, "", null]); -var _c = [z.getA(), z.getB(), z.getC()], z_a = _c[0], z_b = _c[1], z_c = _c[2]; +var _a_2 = [z.getA(), z.getB(), z.getC()], z_a = _a_2[0], z_b = _a_2[1], z_c = _a_2[2]; diff --git a/tests/baselines/reference/destructuringParameterProperties3.js b/tests/baselines/reference/destructuringParameterProperties3.js index fe9e69d7e5..be835bdfe2 100644 --- a/tests/baselines/reference/destructuringParameterProperties3.js +++ b/tests/baselines/reference/destructuringParameterProperties3.js @@ -56,8 +56,8 @@ var C1 = (function () { var x = new C1(undefined, [0, true, ""]); var _a = [x.getA(), x.getB(), x.getC()], x_a = _a[0], x_b = _a[1], x_c = _a[2]; var y = new C1(10, [0, true, true]); -var _b = [y.getA(), y.getB(), y.getC()], y_a = _b[0], y_b = _b[1], y_c = _b[2]; +var _a_1 = [y.getA(), y.getB(), y.getC()], y_a = _a_1[0], y_b = _a_1[1], y_c = _a_1[2]; var z = new C1(10, [undefined, "", ""]); -var _c = [z.getA(), z.getB(), z.getC()], z_a = _c[0], z_b = _c[1], z_c = _c[2]; +var _a_2 = [z.getA(), z.getB(), z.getC()], z_a = _a_2[0], z_b = _a_2[1], z_c = _a_2[2]; var w = new C1(10, [undefined, undefined, undefined]); -var _d = [z.getA(), z.getB(), z.getC()], z_a = _d[0], z_b = _d[1], z_c = _d[2]; +var _a_3 = [z.getA(), z.getB(), z.getC()], z_a = _a_3[0], z_b = _a_3[1], z_c = _a_3[2]; diff --git a/tests/baselines/reference/destructuringParameterProperties5.js b/tests/baselines/reference/destructuringParameterProperties5.js index d9b1710ae8..5046d41472 100644 --- a/tests/baselines/reference/destructuringParameterProperties5.js +++ b/tests/baselines/reference/destructuringParameterProperties5.js @@ -15,7 +15,7 @@ var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z]; //// [destructuringParameterProperties5.js] var C1 = (function () { function C1(_a) { - var _b = _a[0], x1 = _b.x1, x2 = _b.x2, x3 = _b.x3, y = _a[1], z = _a[2]; + var _a_1 = _a[0], x1 = _a_1.x1, x2 = _a_1.x2, x3 = _a_1.x3, y = _a[1], z = _a[2]; this.[{ x1, x2, x3 }, y, z] = [{ x1, x2, x3 }, y, z]; var foo = x1 || x2 || x3 || y || z; var bar = this.x1 || this.x2 || this.x3 || this.y || this.z; diff --git a/tests/baselines/reference/restElementMustBeLast.js b/tests/baselines/reference/restElementMustBeLast.js index 337cb6de6f..9cb96b7e1e 100644 --- a/tests/baselines/reference/restElementMustBeLast.js +++ b/tests/baselines/reference/restElementMustBeLast.js @@ -5,5 +5,5 @@ var [...a, x] = [1, 2, 3]; // Error, rest must be last element //// [restElementMustBeLast.js] var _a = [1, 2, 3], x = _a[1]; // Error, rest must be last element -_b = [1, 2, 3], x = _b[1]; // Error, rest must be last element -var _b; +_a_1 = [1, 2, 3], x = _a_1[1]; // Error, rest must be last element +var _a_1; diff --git a/tests/baselines/reference/restElementWithNullInitializer.js b/tests/baselines/reference/restElementWithNullInitializer.js index 9f326602fb..9b314a5ed1 100644 --- a/tests/baselines/reference/restElementWithNullInitializer.js +++ b/tests/baselines/reference/restElementWithNullInitializer.js @@ -14,14 +14,14 @@ function foo4([...r] = []) { //// [restElementWithNullInitializer.js] function foo1(_a) { - var _b = _a === void 0 ? null : _a, r = _b.slice(0); + var _a_1 = _a === void 0 ? null : _a, r = _a_1.slice(0); } function foo2(_a) { - var _b = _a === void 0 ? undefined : _a, r = _b.slice(0); + var _a_1 = _a === void 0 ? undefined : _a, r = _a_1.slice(0); } function foo3(_a) { - var _b = _a === void 0 ? {} : _a, r = _b.slice(0); + var _a_1 = _a === void 0 ? {} : _a, r = _a_1.slice(0); } function foo4(_a) { - var _b = _a === void 0 ? [] : _a, r = _b.slice(0); + var _a_1 = _a === void 0 ? [] : _a, r = _a_1.slice(0); } diff --git a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js index 9d3531c266..fad2c81f0e 100644 --- a/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js +++ b/tests/baselines/reference/taggedTemplateStringsTypeArgumentInference.js @@ -99,62 +99,62 @@ function noParams(n) { } (_a = [""], _a.raw = [""], noParams(_a)); // Generic tag with parameter which does not use type parameter function noGenericParams(n) { } -(_b = [""], _b.raw = [""], noGenericParams(_b)); +(_a_1 = [""], _a_1.raw = [""], noGenericParams(_a_1)); // Generic tag with multiple type parameters and only one used in parameter type annotation function someGenerics1a(n, m) { } -(_c = ["", ""], _c.raw = ["", ""], someGenerics1a(_c, 3)); +(_a_2 = ["", ""], _a_2.raw = ["", ""], someGenerics1a(_a_2, 3)); function someGenerics1b(n, m) { } -(_d = ["", ""], _d.raw = ["", ""], someGenerics1b(_d, 3)); +(_a_3 = ["", ""], _a_3.raw = ["", ""], someGenerics1b(_a_3, 3)); // Generic tag with argument of function type whose parameter is of type parameter type function someGenerics2a(strs, n) { } -(_e = ["", ""], _e.raw = ["", ""], someGenerics2a(_e, function (n) { return n; })); +(_a_4 = ["", ""], _a_4.raw = ["", ""], someGenerics2a(_a_4, function (n) { return n; })); function someGenerics2b(strs, n) { } -(_f = ["", ""], _f.raw = ["", ""], someGenerics2b(_f, function (n, x) { return n; })); +(_a_5 = ["", ""], _a_5.raw = ["", ""], someGenerics2b(_a_5, function (n, x) { return n; })); // Generic tag with argument of function type whose parameter is not of type parameter type but body/return type uses type parameter function someGenerics3(strs, producer) { } -(_g = ["", ""], _g.raw = ["", ""], someGenerics3(_g, function () { return ''; })); -(_h = ["", ""], _h.raw = ["", ""], someGenerics3(_h, function () { return undefined; })); -(_j = ["", ""], _j.raw = ["", ""], someGenerics3(_j, function () { return 3; })); +(_a_6 = ["", ""], _a_6.raw = ["", ""], someGenerics3(_a_6, function () { return ''; })); +(_a_7 = ["", ""], _a_7.raw = ["", ""], someGenerics3(_a_7, function () { return undefined; })); +(_a_8 = ["", ""], _a_8.raw = ["", ""], someGenerics3(_a_8, function () { return 3; })); // 2 parameter generic tag with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type function someGenerics4(strs, n, f) { } -(_k = ["", "", ""], _k.raw = ["", "", ""], someGenerics4(_k, 4, function () { return null; })); -(_l = ["", "", ""], _l.raw = ["", "", ""], someGenerics4(_l, '', function () { return 3; })); -(_m = ["", "", ""], _m.raw = ["", "", ""], someGenerics4(_m, null, null)); +(_a_9 = ["", "", ""], _a_9.raw = ["", "", ""], someGenerics4(_a_9, 4, function () { return null; })); +(_a_10 = ["", "", ""], _a_10.raw = ["", "", ""], someGenerics4(_a_10, '', function () { return 3; })); +(_a_11 = ["", "", ""], _a_11.raw = ["", "", ""], someGenerics4(_a_11, null, null)); // 2 parameter generic tag with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type function someGenerics5(strs, n, f) { } -(_n = ["", " ", ""], _n.raw = ["", " ", ""], someGenerics5(_n, 4, function () { return null; })); -(_o = ["", "", ""], _o.raw = ["", "", ""], someGenerics5(_o, '', function () { return 3; })); -(_p = ["", "", ""], _p.raw = ["", "", ""], someGenerics5(_p, null, null)); +(_a_12 = ["", " ", ""], _a_12.raw = ["", " ", ""], someGenerics5(_a_12, 4, function () { return null; })); +(_a_13 = ["", "", ""], _a_13.raw = ["", "", ""], someGenerics5(_a_13, '', function () { return 3; })); +(_a_14 = ["", "", ""], _a_14.raw = ["", "", ""], someGenerics5(_a_14, null, null)); // Generic tag with multiple arguments of function types that each have parameters of the same generic type function someGenerics6(strs, a, b, c) { } -(_q = ["", "", "", ""], _q.raw = ["", "", "", ""], someGenerics6(_q, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_r = ["", "", "", ""], _r.raw = ["", "", "", ""], someGenerics6(_r, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_s = ["", "", "", ""], _s.raw = ["", "", "", ""], someGenerics6(_s, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +(_a_15 = ["", "", "", ""], _a_15.raw = ["", "", "", ""], someGenerics6(_a_15, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +(_a_16 = ["", "", "", ""], _a_16.raw = ["", "", "", ""], someGenerics6(_a_16, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +(_a_17 = ["", "", "", ""], _a_17.raw = ["", "", "", ""], someGenerics6(_a_17, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); // Generic tag with multiple arguments of function types that each have parameters of different generic type function someGenerics7(strs, a, b, c) { } -(_t = ["", "", "", ""], _t.raw = ["", "", "", ""], someGenerics7(_t, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_u = ["", "", "", ""], _u.raw = ["", "", "", ""], someGenerics7(_u, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); -(_v = ["", "", "", ""], _v.raw = ["", "", "", ""], someGenerics7(_v, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +(_a_18 = ["", "", "", ""], _a_18.raw = ["", "", "", ""], someGenerics7(_a_18, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +(_a_19 = ["", "", "", ""], _a_19.raw = ["", "", "", ""], someGenerics7(_a_19, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); +(_a_20 = ["", "", "", ""], _a_20.raw = ["", "", "", ""], someGenerics7(_a_20, function (n) { return n; }, function (n) { return n; }, function (n) { return n; })); // Generic tag with argument of generic function type function someGenerics8(strs, n) { return n; } -var x = (_w = ["", ""], _w.raw = ["", ""], someGenerics8(_w, someGenerics7)); -(_x = ["", "", "", ""], _x.raw = ["", "", "", ""], x(_x, null, null, null)); +var x = (_a_21 = ["", ""], _a_21.raw = ["", ""], someGenerics8(_a_21, someGenerics7)); +(_a_22 = ["", "", "", ""], _a_22.raw = ["", "", "", ""], x(_a_22, null, null, null)); // Generic tag with multiple parameters of generic type passed arguments with no best common type function someGenerics9(strs, a, b, c) { return null; } -var a9a = (_y = ["", "", "", ""], _y.raw = ["", "", "", ""], someGenerics9(_y, '', 0, [])); +var a9a = (_a_23 = ["", "", "", ""], _a_23.raw = ["", "", "", ""], someGenerics9(_a_23, '', 0, [])); var a9a; -var a9e = (_z = ["", "", "", ""], _z.raw = ["", "", "", ""], someGenerics9(_z, undefined, { x: 6, z: new Date() }, { x: 6, y: '' })); +var a9e = (_a_24 = ["", "", "", ""], _a_24.raw = ["", "", "", ""], someGenerics9(_a_24, undefined, { x: 6, z: new Date() }, { x: 6, y: '' })); var a9e; // Generic tag with multiple parameters of generic type passed arguments with a single best common type -var a9d = (_0 = ["", "", "", ""], _0.raw = ["", "", "", ""], someGenerics9(_0, { x: 3 }, { x: 6 }, { x: 6 })); +var a9d = (_a_25 = ["", "", "", ""], _a_25.raw = ["", "", "", ""], someGenerics9(_a_25, { x: 3 }, { x: 6 }, { x: 6 })); var a9d; // Generic tag with multiple parameters of generic type where one argument is of type 'any' var anyVar; -var a = (_1 = ["", "", "", ""], _1.raw = ["", "", "", ""], someGenerics9(_1, 7, anyVar, 4)); +var a = (_a_26 = ["", "", "", ""], _a_26.raw = ["", "", "", ""], someGenerics9(_a_26, 7, anyVar, 4)); var a; // Generic tag with multiple parameters of generic type where one argument is [] and the other is not 'any' -var arr = (_2 = ["", "", "", ""], _2.raw = ["", "", "", ""], someGenerics9(_2, [], null, undefined)); +var arr = (_a_27 = ["", "", "", ""], _a_27.raw = ["", "", "", ""], someGenerics9(_a_27, [], null, undefined)); var arr; -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2; +var _a, _a_1, _a_2, _a_3, _a_4, _a_5, _a_6, _a_7, _a_8, _a_9, _a_10, _a_11, _a_12, _a_13, _a_14, _a_15, _a_16, _a_17, _a_18, _a_19, _a_20, _a_21, _a_22, _a_23, _a_24, _a_25, _a_26, _a_27; diff --git a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.js b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.js index 9d11379322..972e0cfcf6 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.js +++ b/tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.js @@ -36,14 +36,14 @@ f.thisIsNotATag(`abc${1}def${2}ghi`); //// [taggedTemplateStringsWithIncompatibleTypedTags.js] var f; (_a = ["abc"], _a.raw = ["abc"], f(_a)); -(_b = ["abc", "def", "ghi"], _b.raw = ["abc", "def", "ghi"], f(_b, 1, 2)); -(_c = ["abc"], _c.raw = ["abc"], f(_c)).member; -(_d = ["abc", "def", "ghi"], _d.raw = ["abc", "def", "ghi"], f(_d, 1, 2)).member; -(_e = ["abc"], _e.raw = ["abc"], f(_e))["member"]; -(_f = ["abc", "def", "ghi"], _f.raw = ["abc", "def", "ghi"], f(_f, 1, 2))["member"]; -(_g = ["abc", "def", "ghi"], _g.raw = ["abc", "def", "ghi"], (_h = ["abc"], _h.raw = ["abc"], f(_h))[0].member(_g, 1, 2)); -(_j = ["abc", "def", "ghi"], _j.raw = ["abc", "def", "ghi"], (_k = ["abc", "def", "ghi"], _k.raw = ["abc", "def", "ghi"], f(_k, 1, 2))["member"].member(_j, 1, 2)); -(_l = ["abc", "def", "ghi"], _l.raw = ["abc", "def", "ghi"], (_m = ["abc", "def", "ghi"], _m.raw = ["abc", "def", "ghi"], f(_m, true, true))["member"].member(_l, 1, 2)); +(_a_1 = ["abc", "def", "ghi"], _a_1.raw = ["abc", "def", "ghi"], f(_a_1, 1, 2)); +(_a_2 = ["abc"], _a_2.raw = ["abc"], f(_a_2)).member; +(_a_3 = ["abc", "def", "ghi"], _a_3.raw = ["abc", "def", "ghi"], f(_a_3, 1, 2)).member; +(_a_4 = ["abc"], _a_4.raw = ["abc"], f(_a_4))["member"]; +(_a_5 = ["abc", "def", "ghi"], _a_5.raw = ["abc", "def", "ghi"], f(_a_5, 1, 2))["member"]; +(_a_6 = ["abc", "def", "ghi"], _a_6.raw = ["abc", "def", "ghi"], (_a_7 = ["abc"], _a_7.raw = ["abc"], f(_a_7))[0].member(_a_6, 1, 2)); +(_a_8 = ["abc", "def", "ghi"], _a_8.raw = ["abc", "def", "ghi"], (_a_9 = ["abc", "def", "ghi"], _a_9.raw = ["abc", "def", "ghi"], f(_a_9, 1, 2))["member"].member(_a_8, 1, 2)); +(_a_10 = ["abc", "def", "ghi"], _a_10.raw = ["abc", "def", "ghi"], (_a_11 = ["abc", "def", "ghi"], _a_11.raw = ["abc", "def", "ghi"], f(_a_11, true, true))["member"].member(_a_10, 1, 2)); f.thisIsNotATag("abc"); f.thisIsNotATag("abc" + 1 + "def" + 2 + "ghi"); -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; +var _a, _a_1, _a_2, _a_3, _a_4, _a_5, _a_6, _a_7, _a_8, _a_9, _a_10, _a_11; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js index 431447df22..cb5df24cb7 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.js @@ -37,9 +37,9 @@ var d = foo([], 1, true); // boolean (with error) var e = foo([], 1, "2"); // {} var f = foo([], 1, 2, 3); // any (with error) var u = (_a = [""], _a.raw = [""], foo(_a)); // number -var v = (_b = ["", ""], _b.raw = ["", ""], foo(_b, 1)); // string -var w = (_c = ["", "", ""], _c.raw = ["", "", ""], foo(_c, 1, 2)); // boolean -var x = (_d = ["", "", ""], _d.raw = ["", "", ""], foo(_d, 1, true)); // boolean (with error) -var y = (_e = ["", "", ""], _e.raw = ["", "", ""], foo(_e, 1, "2")); // {} -var z = (_f = ["", "", "", ""], _f.raw = ["", "", "", ""], foo(_f, 1, 2, 3)); // any (with error) -var _a, _b, _c, _d, _e, _f; +var v = (_a_1 = ["", ""], _a_1.raw = ["", ""], foo(_a_1, 1)); // string +var w = (_a_2 = ["", "", ""], _a_2.raw = ["", "", ""], foo(_a_2, 1, 2)); // boolean +var x = (_a_3 = ["", "", ""], _a_3.raw = ["", "", ""], foo(_a_3, 1, true)); // boolean (with error) +var y = (_a_4 = ["", "", ""], _a_4.raw = ["", "", ""], foo(_a_4, 1, "2")); // {} +var z = (_a_5 = ["", "", "", ""], _a_5.raw = ["", "", "", ""], foo(_a_5, 1, 2, 3)); // any (with error) +var _a, _a_1, _a_2, _a_3, _a_4, _a_5; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js index f12008f958..f17e1bbd2e 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.js @@ -35,6 +35,6 @@ function foo2() { } return undefined; } -var c = (_b = ["", ""], _b.raw = ["", ""], foo2(_b, 1)); // number +var c = (_a_1 = ["", ""], _a_1.raw = ["", ""], foo2(_a_1, 1)); // number var d = foo2([], 1); // number -var _a, _b; +var _a, _a_1; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js index 4b9df44d3f..2176c43304 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.js @@ -77,39 +77,39 @@ fn5 `${ (n) => n.substr(0) }`; function fn1() { return null; } var s = (_a = ["", ""], _a.raw = ["", ""], fn1(_a, undefined)); // No candidate overloads found -(_b = ["", ""], _b.raw = ["", ""], fn1(_b, {})); // Error +(_a_1 = ["", ""], _a_1.raw = ["", ""], fn1(_a_1, {})); // Error function fn2() { return undefined; } -var d1 = (_c = ["", "", ""], _c.raw = ["", "", ""], fn2(_c, 0, undefined)); // contextually typed -var d2 = (_d = ["", "", ""], _d.raw = ["", "", ""], fn2(_d, 0, undefined)); // any +var d1 = (_a_2 = ["", "", ""], _a_2.raw = ["", "", ""], fn2(_a_2, 0, undefined)); // contextually typed +var d2 = (_a_3 = ["", "", ""], _a_3.raw = ["", "", ""], fn2(_a_3, 0, undefined)); // any d1.foo(); // error d2(); // no error (typed as any) // Generic and non-generic overload where generic overload is the only candidate -(_e = ["", "", ""], _e.raw = ["", "", ""], fn2(_e, 0, '')); // OK +(_a_4 = ["", "", ""], _a_4.raw = ["", "", ""], fn2(_a_4, 0, '')); // OK // Generic and non-generic overload where non-generic overload is the only candidate -(_f = ["", "", ""], _f.raw = ["", "", ""], fn2(_f, '', 0)); // OK +(_a_5 = ["", "", ""], _a_5.raw = ["", "", ""], fn2(_a_5, '', 0)); // OK function fn3() { return null; } -var s = (_g = ["", ""], _g.raw = ["", ""], fn3(_g, 3)); -var s = (_h = ["", "", "", ""], _h.raw = ["", "", "", ""], fn3(_h, '', 3, '')); -var n = (_j = ["", "", "", ""], _j.raw = ["", "", "", ""], fn3(_j, 5, 5, 5)); +var s = (_a_6 = ["", ""], _a_6.raw = ["", ""], fn3(_a_6, 3)); +var s = (_a_7 = ["", "", "", ""], _a_7.raw = ["", "", "", ""], fn3(_a_7, '', 3, '')); +var n = (_a_8 = ["", "", "", ""], _a_8.raw = ["", "", "", ""], fn3(_a_8, 5, 5, 5)); var n; // Generic overloads with differing arity tagging with arguments matching each overload type parameter count -var s = (_k = ["", ""], _k.raw = ["", ""], fn3(_k, 4)); -var s = (_l = ["", "", "", ""], _l.raw = ["", "", "", ""], fn3(_l, '', '', '')); -var n = (_m = ["", "", "", ""], _m.raw = ["", "", "", ""], fn3(_m, '', '', 3)); +var s = (_a_9 = ["", ""], _a_9.raw = ["", ""], fn3(_a_9, 4)); +var s = (_a_10 = ["", "", "", ""], _a_10.raw = ["", "", "", ""], fn3(_a_10, '', '', '')); +var n = (_a_11 = ["", "", "", ""], _a_11.raw = ["", "", "", ""], fn3(_a_11, '', '', 3)); // Generic overloads with differing arity tagging with argument count that doesn't match any overload -(_n = [""], _n.raw = [""], fn3(_n)); // Error +(_a_12 = [""], _a_12.raw = [""], fn3(_a_12)); // Error function fn4() { } // Generic overloads with constraints tagged with types that satisfy the constraints -(_o = ["", "", ""], _o.raw = ["", "", ""], fn4(_o, '', 3)); -(_p = ["", "", ""], _p.raw = ["", "", ""], fn4(_p, 3, '')); -(_q = ["", "", ""], _q.raw = ["", "", ""], fn4(_q, 3, undefined)); -(_r = ["", "", ""], _r.raw = ["", "", ""], fn4(_r, '', null)); +(_a_13 = ["", "", ""], _a_13.raw = ["", "", ""], fn4(_a_13, '', 3)); +(_a_14 = ["", "", ""], _a_14.raw = ["", "", ""], fn4(_a_14, 3, '')); +(_a_15 = ["", "", ""], _a_15.raw = ["", "", ""], fn4(_a_15, 3, undefined)); +(_a_16 = ["", "", ""], _a_16.raw = ["", "", ""], fn4(_a_16, '', null)); // Generic overloads with constraints called with type arguments that do not satisfy the constraints -(_s = ["", "", ""], _s.raw = ["", "", ""], fn4(_s, null, null)); // Error +(_a_17 = ["", "", ""], _a_17.raw = ["", "", ""], fn4(_a_17, null, null)); // Error // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints -(_t = ["", "", ""], _t.raw = ["", "", ""], fn4(_t, true, null)); -(_u = ["", "", ""], _u.raw = ["", "", ""], fn4(_u, null, true)); +(_a_18 = ["", "", ""], _a_18.raw = ["", "", ""], fn4(_a_18, true, null)); +(_a_19 = ["", "", ""], _a_19.raw = ["", "", ""], fn4(_a_19, null, true)); function fn5() { return undefined; } -(_v = ["", ""], _v.raw = ["", ""], fn5(_v, function (n) { return n.toFixed(); })); // will error; 'n' should have type 'string'. -(_w = ["", ""], _w.raw = ["", ""], fn5(_w, function (n) { return n.substr(0); })); -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w; +(_a_20 = ["", ""], _a_20.raw = ["", ""], fn5(_a_20, function (n) { return n.toFixed(); })); // will error; 'n' should have type 'string'. +(_a_21 = ["", ""], _a_21.raw = ["", ""], fn5(_a_21, function (n) { return n.substr(0); })); +var _a, _a_1, _a_2, _a_3, _a_4, _a_5, _a_6, _a_7, _a_8, _a_9, _a_10, _a_11, _a_12, _a_13, _a_14, _a_15, _a_16, _a_17, _a_18, _a_19, _a_20, _a_21; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.js b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.js index fd83d9d0ba..2bcbc173ab 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTagsTypedAsAny.js @@ -28,15 +28,15 @@ f.thisIsNotATag(`abc${1}def${2}ghi`); //// [taggedTemplateStringsWithTagsTypedAsAny.js] var f; (_a = ["abc"], _a.raw = ["abc"], f(_a)); -(_b = ["abc", "def", "ghi"], _b.raw = ["abc", "def", "ghi"], f(_b, 1, 2)); -(_c = ["abc"], _c.raw = ["abc"], f.g.h(_c)); -(_d = ["abc", "def", "ghi"], _d.raw = ["abc", "def", "ghi"], f.g.h(_d, 1, 2)); -(_e = ["abc"], _e.raw = ["abc"], f(_e)).member; -(_f = ["abc", "def", "ghi"], _f.raw = ["abc", "def", "ghi"], f(_f, 1, 2)).member; -(_g = ["abc"], _g.raw = ["abc"], f(_g))["member"]; -(_h = ["abc", "def", "ghi"], _h.raw = ["abc", "def", "ghi"], f(_h, 1, 2))["member"]; -(_j = ["abc", "def", "ghi"], _j.raw = ["abc", "def", "ghi"], (_k = ["abc"], _k.raw = ["abc"], f(_k))["member"].someOtherTag(_j, 1, 2)); -(_l = ["abc", "def", "ghi"], _l.raw = ["abc", "def", "ghi"], (_m = ["abc", "def", "ghi"], _m.raw = ["abc", "def", "ghi"], f(_m, 1, 2))["member"].someOtherTag(_l, 1, 2)); +(_a_1 = ["abc", "def", "ghi"], _a_1.raw = ["abc", "def", "ghi"], f(_a_1, 1, 2)); +(_a_2 = ["abc"], _a_2.raw = ["abc"], f.g.h(_a_2)); +(_a_3 = ["abc", "def", "ghi"], _a_3.raw = ["abc", "def", "ghi"], f.g.h(_a_3, 1, 2)); +(_a_4 = ["abc"], _a_4.raw = ["abc"], f(_a_4)).member; +(_a_5 = ["abc", "def", "ghi"], _a_5.raw = ["abc", "def", "ghi"], f(_a_5, 1, 2)).member; +(_a_6 = ["abc"], _a_6.raw = ["abc"], f(_a_6))["member"]; +(_a_7 = ["abc", "def", "ghi"], _a_7.raw = ["abc", "def", "ghi"], f(_a_7, 1, 2))["member"]; +(_a_8 = ["abc", "def", "ghi"], _a_8.raw = ["abc", "def", "ghi"], (_a_9 = ["abc"], _a_9.raw = ["abc"], f(_a_9))["member"].someOtherTag(_a_8, 1, 2)); +(_a_10 = ["abc", "def", "ghi"], _a_10.raw = ["abc", "def", "ghi"], (_a_11 = ["abc", "def", "ghi"], _a_11.raw = ["abc", "def", "ghi"], f(_a_11, 1, 2))["member"].someOtherTag(_a_10, 1, 2)); f.thisIsNotATag("abc"); f.thisIsNotATag("abc" + 1 + "def" + 2 + "ghi"); -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; +var _a, _a_1, _a_2, _a_3, _a_4, _a_5, _a_6, _a_7, _a_8, _a_9, _a_10, _a_11; diff --git a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.js b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.js index fcc2cda86d..16b14d32d9 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithTypedTags.js +++ b/tests/baselines/reference/taggedTemplateStringsWithTypedTags.js @@ -34,13 +34,13 @@ f.thisIsNotATag(`abc${1}def${2}ghi`); //// [taggedTemplateStringsWithTypedTags.js] var f; (_a = ["abc"], _a.raw = ["abc"], f(_a)); -(_b = ["abc", "def", "ghi"], _b.raw = ["abc", "def", "ghi"], f(_b, 1, 2)); -(_c = ["abc"], _c.raw = ["abc"], f(_c)).member; -(_d = ["abc", "def", "ghi"], _d.raw = ["abc", "def", "ghi"], f(_d, 1, 2)).member; -(_e = ["abc"], _e.raw = ["abc"], f(_e))["member"]; -(_f = ["abc", "def", "ghi"], _f.raw = ["abc", "def", "ghi"], f(_f, 1, 2))["member"]; -(_g = ["abc", "def", "ghi"], _g.raw = ["abc", "def", "ghi"], (_h = ["abc"], _h.raw = ["abc"], f(_h))[0].member(_g, 1, 2)); -(_j = ["abc", "def", "ghi"], _j.raw = ["abc", "def", "ghi"], (_k = ["abc", "def", "ghi"], _k.raw = ["abc", "def", "ghi"], f(_k, 1, 2))["member"].member(_j, 1, 2)); +(_a_1 = ["abc", "def", "ghi"], _a_1.raw = ["abc", "def", "ghi"], f(_a_1, 1, 2)); +(_a_2 = ["abc"], _a_2.raw = ["abc"], f(_a_2)).member; +(_a_3 = ["abc", "def", "ghi"], _a_3.raw = ["abc", "def", "ghi"], f(_a_3, 1, 2)).member; +(_a_4 = ["abc"], _a_4.raw = ["abc"], f(_a_4))["member"]; +(_a_5 = ["abc", "def", "ghi"], _a_5.raw = ["abc", "def", "ghi"], f(_a_5, 1, 2))["member"]; +(_a_6 = ["abc", "def", "ghi"], _a_6.raw = ["abc", "def", "ghi"], (_a_7 = ["abc"], _a_7.raw = ["abc"], f(_a_7))[0].member(_a_6, 1, 2)); +(_a_8 = ["abc", "def", "ghi"], _a_8.raw = ["abc", "def", "ghi"], (_a_9 = ["abc", "def", "ghi"], _a_9.raw = ["abc", "def", "ghi"], f(_a_9, 1, 2))["member"].member(_a_8, 1, 2)); f.thisIsNotATag("abc"); f.thisIsNotATag("abc" + 1 + "def" + 2 + "ghi"); -var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; +var _a, _a_1, _a_2, _a_3, _a_4, _a_5, _a_6, _a_7, _a_8, _a_9; diff --git a/tests/baselines/reference/templateStringInModuleName.js b/tests/baselines/reference/templateStringInModuleName.js index 36f619176e..9ebb92a380 100644 --- a/tests/baselines/reference/templateStringInModuleName.js +++ b/tests/baselines/reference/templateStringInModuleName.js @@ -11,7 +11,7 @@ declare; { } declare; -(_b = ["M", ""], _b.raw = ["M", ""], module(_b, 2)); +(_a_1 = ["M", ""], _a_1.raw = ["M", ""], module(_a_1, 2)); { } -var _a, _b; +var _a, _a_1;