diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 30d863ab90..eb333fc5ca 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3088,52 +3088,15 @@ module ts { write(tokenToString(node.operatorToken.kind)); - // We'd like to preserve newlines found in the original binary expression. i.e. if a user has: - // - // Foo() || - // Bar(); - // - // Then we'd like to emit it as such. It seems like we'd only need to check for a newline and - // then just indent and emit. However, that will lead to a problem with deeply nested code. - // i.e. if you have: - // - // Foo() || - // Bar() || - // Baz(); - // - // Then we don't want to emit it as: - // - // Foo() || - // Bar() || - // Baz(); - // - // So we only indent if the right side of the binary expression starts further in on the line - // versus the left. - - // Check if the right expression is on a different line versus the operator itself. If so, - // we'll emit newline. if (!nodeEndIsOnSameLineAsNodeStart(node.operatorToken, node.right)) { - var rightStart = getLineAndCharacterOfPosition(currentSourceFile, skipTrivia(currentSourceFile.text, node.right.pos)); - - // Also, if the right expression starts further in on the line than the left, then we'll indent. - var exprStart = getLineAndCharacterOfPosition(currentSourceFile, skipTrivia(currentSourceFile.text, node.pos)); - var firstCharOfExpr = getFirstNonWhitespaceCharacterIndexOnLine(exprStart.line); - var shouldIndent = rightStart.character > firstCharOfExpr; - - if (shouldIndent) { - increaseIndent(); - } - + increaseIndent(); writeLine(); + emit(node.right); + decreaseIndent(); } else { write(" "); - } - - emit(node.right); - - if (shouldIndent) { - decreaseIndent(); + emit(node.right); } } } diff --git a/tests/baselines/reference/ES5SymbolProperty1.js b/tests/baselines/reference/ES5SymbolProperty1.js index e977df7dc6..7d29658e28 100644 --- a/tests/baselines/reference/ES5SymbolProperty1.js +++ b/tests/baselines/reference/ES5SymbolProperty1.js @@ -13,7 +13,7 @@ obj[Symbol.foo]; //// [ES5SymbolProperty1.js] var Symbol; var obj = (_a = {}, _a[Symbol.foo] = -0, -_a); + 0, + _a); obj[Symbol.foo]; var _a; diff --git a/tests/baselines/reference/FunctionDeclaration8_es6.js b/tests/baselines/reference/FunctionDeclaration8_es6.js index 3f6d2499ce..acb336b641 100644 --- a/tests/baselines/reference/FunctionDeclaration8_es6.js +++ b/tests/baselines/reference/FunctionDeclaration8_es6.js @@ -3,6 +3,6 @@ var v = { [yield]: foo } //// [FunctionDeclaration8_es6.js] var v = (_a = {}, _a[yield] = -foo, -_a); + foo, + _a); var _a; diff --git a/tests/baselines/reference/FunctionDeclaration9_es6.js b/tests/baselines/reference/FunctionDeclaration9_es6.js index 04c946a96e..9ecc0eb6d6 100644 --- a/tests/baselines/reference/FunctionDeclaration9_es6.js +++ b/tests/baselines/reference/FunctionDeclaration9_es6.js @@ -6,7 +6,7 @@ function * foo() { //// [FunctionDeclaration9_es6.js] function foo() { var v = (_a = {}, _a[] = - foo, - _a); + foo, + _a); var _a; } diff --git a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js index 0b786632bd..6a20d4aff0 100644 --- a/tests/baselines/reference/FunctionPropertyAssignments5_es6.js +++ b/tests/baselines/reference/FunctionPropertyAssignments5_es6.js @@ -3,5 +3,5 @@ var v = { *[foo()]() { } } //// [FunctionPropertyAssignments5_es6.js] var v = (_a = {}, _a[foo()] = function () { }, -_a); + _a); var _a; diff --git a/tests/baselines/reference/asiArith.js b/tests/baselines/reference/asiArith.js index ac739bbd76..8e957aae33 100644 --- a/tests/baselines/reference/asiArith.js +++ b/tests/baselines/reference/asiArith.js @@ -38,8 +38,8 @@ y var x = 1; var y = 1; var z = x + -+ +y; + + +y; var a = 1; var b = 1; var c = x - -- -y; + - -y; diff --git a/tests/baselines/reference/computedPropertyNames10_ES5.js b/tests/baselines/reference/computedPropertyNames10_ES5.js index ececb28b8c..00b43fb551 100644 --- a/tests/baselines/reference/computedPropertyNames10_ES5.js +++ b/tests/baselines/reference/computedPropertyNames10_ES5.js @@ -21,5 +21,5 @@ var s; var n; var a; var v = (_a = {}, _a[s] = function () { }, _a[n] = function () { }, _a[s + s] = function () { }, _a[s + n] = function () { }, _a[+s] = function () { }, _a[""] = function () { }, _a[0] = function () { }, _a[a] = function () { }, _a[true] = function () { }, _a["hello bye"] = function () { }, _a["hello " + a + " bye"] = function () { }, -_a); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames11_ES5.js b/tests/baselines/reference/computedPropertyNames11_ES5.js index d8450deb76..db3b12cbf3 100644 --- a/tests/baselines/reference/computedPropertyNames11_ES5.js +++ b/tests/baselines/reference/computedPropertyNames11_ES5.js @@ -21,5 +21,5 @@ var s; var n; var a; var v = (_a = {}, _a[s] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), _a[n] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), _a[s + s] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), _a[s + n] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), _a[+s] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), _a[""] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), _a[0] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), _a[a] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), _a[true] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), _a["hello bye"] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), _a["hello " + a + " bye"] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), -_a); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames18_ES5.js b/tests/baselines/reference/computedPropertyNames18_ES5.js index 0ccc0fb4e0..4795047337 100644 --- a/tests/baselines/reference/computedPropertyNames18_ES5.js +++ b/tests/baselines/reference/computedPropertyNames18_ES5.js @@ -8,7 +8,7 @@ function foo() { //// [computedPropertyNames18_ES5.js] function foo() { var obj = (_a = {}, _a[this.bar] = - 0, - _a); + 0, + _a); var _a; } diff --git a/tests/baselines/reference/computedPropertyNames19_ES5.js b/tests/baselines/reference/computedPropertyNames19_ES5.js index a18cb7b95c..fcc46aeff2 100644 --- a/tests/baselines/reference/computedPropertyNames19_ES5.js +++ b/tests/baselines/reference/computedPropertyNames19_ES5.js @@ -9,7 +9,7 @@ module M { var M; (function (M) { var obj = (_a = {}, _a[this.bar] = - 0, - _a); + 0, + _a); var _a; })(M || (M = {})); diff --git a/tests/baselines/reference/computedPropertyNames1_ES5.js b/tests/baselines/reference/computedPropertyNames1_ES5.js index 36a7fd6052..115daa53ac 100644 --- a/tests/baselines/reference/computedPropertyNames1_ES5.js +++ b/tests/baselines/reference/computedPropertyNames1_ES5.js @@ -6,5 +6,5 @@ var v = { //// [computedPropertyNames1_ES5.js] var v = (_a = {}, _a[0 + 1] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), _a[0 + 1] = Object.defineProperty({ set: function (v) { }, enumerable: true, configurable: true }), -_a); + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames20_ES5.js b/tests/baselines/reference/computedPropertyNames20_ES5.js index 21af64d7e4..06a08c6b73 100644 --- a/tests/baselines/reference/computedPropertyNames20_ES5.js +++ b/tests/baselines/reference/computedPropertyNames20_ES5.js @@ -5,6 +5,6 @@ var obj = { //// [computedPropertyNames20_ES5.js] var obj = (_a = {}, _a[this.bar] = -0, -_a); + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames22_ES5.js b/tests/baselines/reference/computedPropertyNames22_ES5.js index e3e685aa54..12ec32d7e9 100644 --- a/tests/baselines/reference/computedPropertyNames22_ES5.js +++ b/tests/baselines/reference/computedPropertyNames22_ES5.js @@ -14,7 +14,7 @@ var C = (function () { } C.prototype.bar = function () { var obj = (_a = {}, _a[this.bar()] = function () { }, - _a); + _a); return 0; var _a; }; diff --git a/tests/baselines/reference/computedPropertyNames23_ES5.js b/tests/baselines/reference/computedPropertyNames23_ES5.js index 7b5a5a101a..f0eebd119e 100644 --- a/tests/baselines/reference/computedPropertyNames23_ES5.js +++ b/tests/baselines/reference/computedPropertyNames23_ES5.js @@ -16,8 +16,8 @@ var C = (function () { return 0; }; C.prototype[(_a = {}, _a[this.bar()] = - 1, - _a)[0]] = function () { }; + 1, + _a)[0]] = function () { }; return C; })(); var _a; diff --git a/tests/baselines/reference/computedPropertyNames25_ES5.js b/tests/baselines/reference/computedPropertyNames25_ES5.js index bd2212b72b..07673dded7 100644 --- a/tests/baselines/reference/computedPropertyNames25_ES5.js +++ b/tests/baselines/reference/computedPropertyNames25_ES5.js @@ -35,7 +35,7 @@ var C = (function (_super) { } C.prototype.foo = function () { var obj = (_a = {}, _a[_super.prototype.bar.call(this)] = function () { }, - _a); + _a); return 0; var _a; }; diff --git a/tests/baselines/reference/computedPropertyNames26_ES5.js b/tests/baselines/reference/computedPropertyNames26_ES5.js index 5df2f6dc1b..50a14294c5 100644 --- a/tests/baselines/reference/computedPropertyNames26_ES5.js +++ b/tests/baselines/reference/computedPropertyNames26_ES5.js @@ -35,8 +35,8 @@ var C = (function (_super) { // Gets emitted as super, not _super, which is consistent with // use of super in static properties initializers. C.prototype[(_a = {}, _a[super.bar.call(this)] = - 1, - _a)[0]] = function () { }; + 1, + _a)[0]] = function () { }; return C; })(Base); var _a; diff --git a/tests/baselines/reference/computedPropertyNames28_ES5.js b/tests/baselines/reference/computedPropertyNames28_ES5.js index 7e548d4d6d..0ee4c6fcb3 100644 --- a/tests/baselines/reference/computedPropertyNames28_ES5.js +++ b/tests/baselines/reference/computedPropertyNames28_ES5.js @@ -27,7 +27,7 @@ var C = (function (_super) { function C() { _super.call(this); var obj = (_a = {}, _a[(_super.call(this), "prop")] = function () { }, - _a); + _a); var _a; } return C; diff --git a/tests/baselines/reference/computedPropertyNames29_ES5.js b/tests/baselines/reference/computedPropertyNames29_ES5.js index 27c7cd9798..6c571ffc48 100644 --- a/tests/baselines/reference/computedPropertyNames29_ES5.js +++ b/tests/baselines/reference/computedPropertyNames29_ES5.js @@ -18,7 +18,7 @@ var C = (function () { var _this = this; (function () { var obj = (_a = {}, _a[_this.bar()] = function () { }, - _a); + _a); var _a; }); return 0; diff --git a/tests/baselines/reference/computedPropertyNames30_ES5.js b/tests/baselines/reference/computedPropertyNames30_ES5.js index 505b149f62..be54ac9f39 100644 --- a/tests/baselines/reference/computedPropertyNames30_ES5.js +++ b/tests/baselines/reference/computedPropertyNames30_ES5.js @@ -33,7 +33,7 @@ var C = (function (_super) { _super.call(this); (function () { var obj = (_a = {}, _a[(_super.call(this), "prop")] = function () { }, - _a); + _a); var _a; }); } diff --git a/tests/baselines/reference/computedPropertyNames31_ES5.js b/tests/baselines/reference/computedPropertyNames31_ES5.js index 0c8cbac455..c195af3eb5 100644 --- a/tests/baselines/reference/computedPropertyNames31_ES5.js +++ b/tests/baselines/reference/computedPropertyNames31_ES5.js @@ -39,7 +39,7 @@ var C = (function (_super) { var _this = this; (function () { var obj = (_a = {}, _a[_super.prototype.bar.call(_this)] = function () { }, - _a); + _a); var _a; }); return 0; diff --git a/tests/baselines/reference/computedPropertyNames33_ES5.js b/tests/baselines/reference/computedPropertyNames33_ES5.js index 84df68fcc1..805531eb6b 100644 --- a/tests/baselines/reference/computedPropertyNames33_ES5.js +++ b/tests/baselines/reference/computedPropertyNames33_ES5.js @@ -16,7 +16,7 @@ var C = (function () { } C.prototype.bar = function () { var obj = (_a = {}, _a[foo()] = function () { }, - _a); + _a); return 0; var _a; }; diff --git a/tests/baselines/reference/computedPropertyNames34_ES5.js b/tests/baselines/reference/computedPropertyNames34_ES5.js index 9e1de33be7..8e5fbe96f6 100644 --- a/tests/baselines/reference/computedPropertyNames34_ES5.js +++ b/tests/baselines/reference/computedPropertyNames34_ES5.js @@ -16,7 +16,7 @@ var C = (function () { } C.bar = function () { var obj = (_a = {}, _a[foo()] = function () { }, - _a); + _a); return 0; var _a; }; diff --git a/tests/baselines/reference/computedPropertyNames46_ES5.js b/tests/baselines/reference/computedPropertyNames46_ES5.js index 3e4329b8a2..0cd5bd9bea 100644 --- a/tests/baselines/reference/computedPropertyNames46_ES5.js +++ b/tests/baselines/reference/computedPropertyNames46_ES5.js @@ -5,6 +5,6 @@ var o = { //// [computedPropertyNames46_ES5.js] var o = (_a = {}, _a["" || 0] = -0, -_a); + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames47_ES5.js b/tests/baselines/reference/computedPropertyNames47_ES5.js index 7874a25976..2ec3fa5d66 100644 --- a/tests/baselines/reference/computedPropertyNames47_ES5.js +++ b/tests/baselines/reference/computedPropertyNames47_ES5.js @@ -15,6 +15,6 @@ var E2; E2[E2["x"] = 0] = "x"; })(E2 || (E2 = {})); var o = (_a = {}, _a[0 /* x */ || 0 /* x */] = -0, -_a); + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames48_ES5.js b/tests/baselines/reference/computedPropertyNames48_ES5.js index f3f9941aea..4a39750768 100644 --- a/tests/baselines/reference/computedPropertyNames48_ES5.js +++ b/tests/baselines/reference/computedPropertyNames48_ES5.js @@ -24,12 +24,12 @@ var E; })(E || (E = {})); var a; extractIndexer((_a = {}, _a[a] = -"", -_a)); // Should return string + "", + _a)); // Should return string extractIndexer((_b = {}, _b[0 /* x */] = -"", -_b)); // Should return string + "", + _b)); // Should return string extractIndexer((_c = {}, _c["" || 0] = -"", -_c)); // Should return any (widened form of undefined) + "", + _c)); // Should return any (widened form of undefined) var _a, _b, _c; diff --git a/tests/baselines/reference/computedPropertyNames49_ES5.js b/tests/baselines/reference/computedPropertyNames49_ES5.js index a64d9431a9..79c09624f4 100644 --- a/tests/baselines/reference/computedPropertyNames49_ES5.js +++ b/tests/baselines/reference/computedPropertyNames49_ES5.js @@ -29,7 +29,7 @@ var x = { var x = (_a = { p1: 10 }, _a.p1 = -10, _a[1 + 1] = Object.defineProperty({ get: function () { + 10, _a[1 + 1] = Object.defineProperty({ get: function () { throw 10; }, enumerable: true, configurable: true }), _a[1 + 1] = Object.defineProperty({ get: function () { return 10; @@ -41,6 +41,6 @@ var x = (_a = { return 10; } }, enumerable: true, configurable: true }), _a.p2 = -20, -_a); + 20, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames4_ES5.js b/tests/baselines/reference/computedPropertyNames4_ES5.js index 255b14eb97..22e23f1490 100644 --- a/tests/baselines/reference/computedPropertyNames4_ES5.js +++ b/tests/baselines/reference/computedPropertyNames4_ES5.js @@ -21,16 +21,16 @@ var s; var n; var a; var v = (_a = {}, _a[s] = -0, _a[n] = -n, _a[s + s] = -1, _a[s + n] = -2, _a[+s] = -s, _a[""] = -0, _a[0] = -0, _a[a] = -1, _a[true] = -0, _a["hello bye"] = -0, _a["hello " + a + " bye"] = -0, -_a); + 0, _a[n] = + n, _a[s + s] = + 1, _a[s + n] = + 2, _a[+s] = + s, _a[""] = + 0, _a[0] = + 0, _a[a] = + 1, _a[true] = + 0, _a["hello bye"] = + 0, _a["hello " + a + " bye"] = + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames50_ES5.js b/tests/baselines/reference/computedPropertyNames50_ES5.js index a0703eeac0..36ca71707c 100644 --- a/tests/baselines/reference/computedPropertyNames50_ES5.js +++ b/tests/baselines/reference/computedPropertyNames50_ES5.js @@ -34,7 +34,7 @@ var x = (_a = { } } }, _a.p1 = -10, _a.foo = Object.defineProperty({ get: function () { + 10, _a.foo = Object.defineProperty({ get: function () { if (1 == 1) { return 10; } @@ -46,6 +46,6 @@ var x = (_a = { }, enumerable: true, configurable: true }), _a[1 + 1] = Object.defineProperty({ get: function () { return 10; }, enumerable: true, configurable: true }), _a.p2 = -20, -_a); + 20, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames5_ES5.js b/tests/baselines/reference/computedPropertyNames5_ES5.js index 722c0f3a74..e99c4ed73b 100644 --- a/tests/baselines/reference/computedPropertyNames5_ES5.js +++ b/tests/baselines/reference/computedPropertyNames5_ES5.js @@ -12,11 +12,11 @@ var v = { //// [computedPropertyNames5_ES5.js] var b; var v = (_a = {}, _a[b] = -0, _a[true] = -1, _a[[]] = -0, _a[{}] = -0, _a[undefined] = -undefined, _a[null] = -null, -_a); + 0, _a[true] = + 1, _a[[]] = + 0, _a[{}] = + 0, _a[undefined] = + undefined, _a[null] = + null, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames6_ES5.js b/tests/baselines/reference/computedPropertyNames6_ES5.js index 4e3ed1b2e9..a4b9f2131e 100644 --- a/tests/baselines/reference/computedPropertyNames6_ES5.js +++ b/tests/baselines/reference/computedPropertyNames6_ES5.js @@ -13,8 +13,8 @@ var p1; var p2; var p3; var v = (_a = {}, _a[p1] = -0, _a[p2] = -1, _a[p3] = -2, -_a); + 0, _a[p2] = + 1, _a[p3] = + 2, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames7_ES5.js b/tests/baselines/reference/computedPropertyNames7_ES5.js index 3e1bcc1151..bd19f0cc5e 100644 --- a/tests/baselines/reference/computedPropertyNames7_ES5.js +++ b/tests/baselines/reference/computedPropertyNames7_ES5.js @@ -12,6 +12,6 @@ var E; E[E["member"] = 0] = "member"; })(E || (E = {})); var v = (_a = {}, _a[0 /* member */] = -0, -_a); + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNames8_ES5.js b/tests/baselines/reference/computedPropertyNames8_ES5.js index 4db9ed2ec1..9035777bcb 100644 --- a/tests/baselines/reference/computedPropertyNames8_ES5.js +++ b/tests/baselines/reference/computedPropertyNames8_ES5.js @@ -13,8 +13,8 @@ function f() { var t; var u; var v = (_a = {}, _a[t] = - 0, _a[u] = - 1, - _a); + 0, _a[u] = + 1, + _a); var _a; } diff --git a/tests/baselines/reference/computedPropertyNames9_ES5.js b/tests/baselines/reference/computedPropertyNames9_ES5.js index a7c4a74d5e..1c5198da76 100644 --- a/tests/baselines/reference/computedPropertyNames9_ES5.js +++ b/tests/baselines/reference/computedPropertyNames9_ES5.js @@ -13,8 +13,8 @@ var v = { //// [computedPropertyNames9_ES5.js] function f(x) { } var v = (_a = {}, _a[f("")] = -0, _a[f(0)] = -0, _a[f(true)] = -0, -_a); + 0, _a[f(0)] = + 0, _a[f(true)] = + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.js index 5ea0512467..c29260da04 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType10_ES5.js @@ -10,7 +10,7 @@ var o: I = { //// [computedPropertyNamesContextualType10_ES5.js] var o = (_a = {}, _a[+"foo"] = -"", _a[+"bar"] = -0, -_a); + "", _a[+"bar"] = + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js index a799449541..60d5706e3f 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js @@ -11,6 +11,6 @@ var o: I = { //// [computedPropertyNamesContextualType1_ES5.js] var o = (_a = {}, _a["" + 0] = function (y) { return y.length; }, _a["" + 1] = -function (y) { return y.length; }, -_a); + function (y) { return y.length; }, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js index 0c6b80bbab..aba28acdd2 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js @@ -11,6 +11,6 @@ var o: I = { //// [computedPropertyNamesContextualType2_ES5.js] var o = (_a = {}, _a[+"foo"] = function (y) { return y.length; }, _a[+"bar"] = -function (y) { return y.length; }, -_a); + function (y) { return y.length; }, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js index 4336808c55..6752bf590d 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js @@ -10,6 +10,6 @@ var o: I = { //// [computedPropertyNamesContextualType3_ES5.js] var o = (_a = {}, _a[+"foo"] = function (y) { return y.length; }, _a[+"bar"] = -function (y) { return y.length; }, -_a); + function (y) { return y.length; }, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.js index b813da3049..6e9dbab4b5 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType4_ES5.js @@ -11,7 +11,7 @@ var o: I = { //// [computedPropertyNamesContextualType4_ES5.js] var o = (_a = {}, _a["" + "foo"] = -"", _a["" + "bar"] = -0, -_a); + "", _a["" + "bar"] = + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.js index f75389de3e..1d7d456195 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.js @@ -11,7 +11,7 @@ var o: I = { //// [computedPropertyNamesContextualType5_ES5.js] var o = (_a = {}, _a[+"foo"] = -"", _a[+"bar"] = -0, -_a); + "", _a[+"bar"] = + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js index bc724320d1..82229dc92e 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js @@ -18,10 +18,10 @@ foo((_a = { p: "", 0: function () { } }, _a.p = -"", _a[0] = -function () { }, _a["hi" + "bye"] = -true, _a[0 + 1] = -0, _a[+"hi"] = -[0], -_a)); + "", _a[0] = + function () { }, _a["hi" + "bye"] = + true, _a[0 + 1] = + 0, _a[+"hi"] = + [0], + _a)); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js index 8d2386a1d1..ca335566d7 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType7_ES5.js @@ -18,10 +18,10 @@ foo((_a = { p: "", 0: function () { } }, _a.p = -"", _a[0] = -function () { }, _a["hi" + "bye"] = -true, _a[0 + 1] = -0, _a[+"hi"] = -[0], -_a)); + "", _a[0] = + function () { }, _a["hi" + "bye"] = + true, _a[0 + 1] = + 0, _a[+"hi"] = + [0], + _a)); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.js index 626f3d1a8e..89ea38eaa7 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType8_ES5.js @@ -11,7 +11,7 @@ var o: I = { //// [computedPropertyNamesContextualType8_ES5.js] var o = (_a = {}, _a["" + "foo"] = -"", _a["" + "bar"] = -0, -_a); + "", _a["" + "bar"] = + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.js b/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.js index c28db4ded9..b4f94dcadb 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesContextualType9_ES5.js @@ -11,7 +11,7 @@ var o: I = { //// [computedPropertyNamesContextualType9_ES5.js] var o = (_a = {}, _a[+"foo"] = -"", _a[+"bar"] = -0, -_a); + "", _a[+"bar"] = + 0, + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js index a0666f166d..bb495c0f53 100644 --- a/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js @@ -8,8 +8,8 @@ var v = { //// [computedPropertyNamesDeclarationEmit5_ES5.js] var v = (_a = {}, _a["" + ""] = -0, _a["" + ""] = function () { }, _a["" + ""] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), _a["" + ""] = Object.defineProperty({ set: function (x) { }, enumerable: true, configurable: true }), -_a); + 0, _a["" + ""] = function () { }, _a["" + ""] = Object.defineProperty({ get: function () { return 0; }, enumerable: true, configurable: true }), _a["" + ""] = Object.defineProperty({ set: function (x) { }, enumerable: true, configurable: true }), + _a); var _a; diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js index c5af22ef39..299c599442 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js @@ -9,6 +9,6 @@ var v = { var v = (_a = {}, _a["hello"] = function () { debugger; }, -_a); + _a); var _a; //# sourceMappingURL=computedPropertyNamesSourceMap2_ES5.js.map \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map index 82a729df95..2ea24d441e 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.js.map @@ -1,2 +1,2 @@ //// [computedPropertyNamesSourceMap2_ES5.js.map] -{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,AADA,CACA,EAAA,GADA,EAAA,EACA,EAAA,CACK,OAAO,CAFA,GAAA;IAGA,QAAQ,CAAC;AACb,CAAC,AAJA;AACA,EAAA,AADA,CAKA,CAAA;IAJD,EAAA"} \ No newline at end of file +{"version":3,"file":"computedPropertyNamesSourceMap2_ES5.js","sourceRoot":"","sources":["computedPropertyNamesSourceMap2_ES5.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,AADA,CACA,EAAA,GADA,EAAA,EACA,EAAA,CACK,OAAO,CAFA,GAAA;IAGA,QAAQ,CAAC;AACb,CAAC,AAJA;IACA,EAAA,AADA,CAKA,CAAA;IAJD,EAAA"} \ No newline at end of file diff --git a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt index 33a3a2b4c2..bc6d862eb9 100644 --- a/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt +++ b/tests/baselines/reference/computedPropertyNamesSourceMap2_ES5.sourcemap.txt @@ -99,7 +99,7 @@ sourceFile:computedPropertyNamesSourceMap2_ES5.ts 1 > 2 >^ 3 > -4 > ^^^^-> +4 > ^^^^^^^^-> 1 >!!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found 1 >!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(1, 33) Source(0, 21) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(3, 1) Source(4, 5) + SourceIndex(0) nameIndex (-1) 1 > @@ -114,45 +114,44 @@ sourceFile:computedPropertyNamesSourceMap2_ES5.ts 2 >Emitted(3, 2) Source(4, 6) + SourceIndex(0) 3 >Emitted(3, 2) Source(0, NaN) + SourceIndex(0) --- ->>>_a); -1-> -2 >^^ -3 > -4 > ^ -5 > ^ -6 > ^^^^-> -1->!!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -1->!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 13) Source(3, 29) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 1) Source(1, 1) + SourceIndex(0) nameIndex (-1) -1-> -2 >!!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -2 >!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 14) Source(3, 30) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 3) Source(1, 1) + SourceIndex(0) nameIndex (-1) -2 > -3 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 1) Source(4, 17) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 3) Source(0, NaN) + SourceIndex(0) nameIndex (-1) -3 > -4 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -4 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 2) Source(4, 18) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 4) Source(5, 2) + SourceIndex(0) nameIndex (-1) -4 > -5 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found -5 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 2) Source(0, 18) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 5) Source(5, 2) + SourceIndex(0) nameIndex (-1) -5 > -1->Emitted(4, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(4, 3) Source(1, 1) + SourceIndex(0) -3 >Emitted(4, 3) Source(0, NaN) + SourceIndex(0) -4 >Emitted(4, 4) Source(5, 2) + SourceIndex(0) -5 >Emitted(4, 5) Source(5, 2) + SourceIndex(0) ---- ->>>var _a; +>>> _a); 1->^^^^ 2 > ^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1->!!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column -1->!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 2) Source(0, 18) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 5) Source(1, 1) + SourceIndex(0) nameIndex (-1) +3 > +4 > ^ +5 > ^ +1->!!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: +1->!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 13) Source(3, 29) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 5) Source(1, 1) + SourceIndex(0) nameIndex (-1) 1-> 2 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: -2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(4, 1) Source(1, 18) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 7) Source(1, 1) + SourceIndex(0) nameIndex (-1) +2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(2, 14) Source(3, 30) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 7) Source(1, 1) + SourceIndex(0) nameIndex (-1) 2 > -1->Emitted(5, 5) Source(1, 1) + SourceIndex(0) +3 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: +3 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 1) Source(4, 17) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 7) Source(0, NaN) + SourceIndex(0) nameIndex (-1) +3 > +4 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: +4 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 2) Source(4, 18) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 8) Source(5, 2) + SourceIndex(0) nameIndex (-1) +4 > +5 > !!^^ !!^^ There was decoding error in the sourcemap at this location: Invalid sourceLine found +5 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 2) Source(0, 18) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(4, 9) Source(5, 2) + SourceIndex(0) nameIndex (-1) +5 > +1->Emitted(4, 5) Source(1, 1) + SourceIndex(0) +2 >Emitted(4, 7) Source(1, 1) + SourceIndex(0) +3 >Emitted(4, 7) Source(0, NaN) + SourceIndex(0) +4 >Emitted(4, 8) Source(5, 2) + SourceIndex(0) +5 >Emitted(4, 9) Source(5, 2) + SourceIndex(0) +--- +>>>var _a; +1 >^^^^ +2 > ^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >!!^^ !!^^ There was decoding error in the sourcemap at this location: Unsupported Error Format: No entries after emitted column +1 >!!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(3, 2) Source(0, 18) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 5) Source(1, 1) + SourceIndex(0) nameIndex (-1) +1 > +2 > !!^^ !!^^ The decoded span from sourcemap's mapping entry does not match what was encoded for this span: +2 > !!^^ !!^^ Decoded span from sourcemap's mappings entry: Emitted(4, 5) Source(1, 18) + SourceIndex(0) nameIndex (-1) Span encoded by the emitter:Emitted(5, 7) Source(1, 1) + SourceIndex(0) nameIndex (-1) +2 > +1 >Emitted(5, 5) Source(1, 1) + SourceIndex(0) 2 >Emitted(5, 7) Source(1, 1) + SourceIndex(0) --- !!!! **** There are more source map entries in the sourceMap's mapping than what was encoded diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index cd31308311..ac77cc177b 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -315,7 +315,7 @@ var TypeScriptAllInOne; if (retValue === void 0) { retValue = != 0; } return 1; ^ - retValue; + retValue; bfs.TYPES(); if (retValue != 0) { return 1 && @@ -543,7 +543,7 @@ while () rest: string[]; { & - public; + public; DefaultValue(value ? : string = "Hello"); { } } diff --git a/tests/baselines/reference/duplicateLocalVariable1.js b/tests/baselines/reference/duplicateLocalVariable1.js index e77a38c5be..62e291f28c 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.js +++ b/tests/baselines/reference/duplicateLocalVariable1.js @@ -431,7 +431,7 @@ exports.tests = (function () { })); testRunner.addTest(new TestCase("Check binary file doesn't match", function () { return (!FileManager.FileBuffer.isTextFile("C:\\somedir\\app.exe") && - !FileManager.FileBuffer.isTextFile("C:\\somedir\\my lib.dll")); + !FileManager.FileBuffer.isTextFile("C:\\somedir\\my lib.dll")); })); // Command-line parameter tests testRunner.addTest(new TestCase("Check App defaults", function () { diff --git a/tests/baselines/reference/parserES5ComputedPropertyName2.js b/tests/baselines/reference/parserES5ComputedPropertyName2.js index 2b39e305e0..cd5b088d0e 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName2.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName2.js @@ -3,6 +3,6 @@ var v = { [e]: 1 }; //// [parserES5ComputedPropertyName2.js] var v = (_a = {}, _a[e] = -1, -_a); + 1, + _a); var _a; diff --git a/tests/baselines/reference/parserES5ComputedPropertyName3.js b/tests/baselines/reference/parserES5ComputedPropertyName3.js index 3247b0251f..8bfed4e822 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName3.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName3.js @@ -3,5 +3,5 @@ var v = { [e]() { } }; //// [parserES5ComputedPropertyName3.js] var v = (_a = {}, _a[e] = function () { }, -_a); + _a); var _a; diff --git a/tests/baselines/reference/parserES5ComputedPropertyName4.js b/tests/baselines/reference/parserES5ComputedPropertyName4.js index 436f967e8d..bb0b389afd 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName4.js +++ b/tests/baselines/reference/parserES5ComputedPropertyName4.js @@ -3,5 +3,5 @@ var v = { get [e]() { } }; //// [parserES5ComputedPropertyName4.js] var v = (_a = {}, _a[e] = Object.defineProperty({ get: function () { }, enumerable: true, configurable: true }), -_a); + _a); var _a; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity10.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity10.js index 766c95632a..a558407de4 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity10.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity10.js @@ -6,4 +6,4 @@ //// [parserGreaterThanTokenAmbiguity10.js] 1 >>> -2; + 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js index 8675365d9e..83f2cda236 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity15.js @@ -6,4 +6,4 @@ //// [parserGreaterThanTokenAmbiguity15.js] 1 >>= -2; + 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js index e190e94e9f..9ac06e9644 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity20.js @@ -6,4 +6,4 @@ //// [parserGreaterThanTokenAmbiguity20.js] 1 >>>= -2; + 2; diff --git a/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js b/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js index 59d13d5c9d..cde18d5c63 100644 --- a/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js +++ b/tests/baselines/reference/parserGreaterThanTokenAmbiguity5.js @@ -6,4 +6,4 @@ //// [parserGreaterThanTokenAmbiguity5.js] 1 >> -2; + 2; diff --git a/tests/baselines/reference/parserRealSource14.js b/tests/baselines/reference/parserRealSource14.js index 540296e697..8deae79f5e 100644 --- a/tests/baselines/reference/parserRealSource14.js +++ b/tests/baselines/reference/parserRealSource14.js @@ -999,8 +999,8 @@ var TypeScript; // 0123 // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid var inclusive = hasFlag(options, 1 /* EdgeInclusive */) || - cur.nodeType === TypeScript.NodeType.Name || - pos === script.limChar; // Special "EOF" case + cur.nodeType === TypeScript.NodeType.Name || + pos === script.limChar; // Special "EOF" case var minChar = cur.minChar; var limChar = cur.limChar + (inclusive ? 1 : 0); if (pos >= minChar && pos < limChar) { diff --git a/tests/baselines/reference/privateIndexer2.js b/tests/baselines/reference/privateIndexer2.js index 5a36a9eae1..40b28ce980 100644 --- a/tests/baselines/reference/privateIndexer2.js +++ b/tests/baselines/reference/privateIndexer2.js @@ -12,8 +12,8 @@ var y: { //// [privateIndexer2.js] // private indexers not allowed var x = (_a = {}, _a[x] = -string, _a.string = + string, _a.string = , -_a); + _a); var y; var _a; diff --git a/tests/baselines/reference/templateStringInEqualityChecks.js b/tests/baselines/reference/templateStringInEqualityChecks.js index ca9fc2ed80..f7573f8efd 100644 --- a/tests/baselines/reference/templateStringInEqualityChecks.js +++ b/tests/baselines/reference/templateStringInEqualityChecks.js @@ -7,5 +7,5 @@ var x = `abc${0}abc` === `abc` || //// [templateStringInEqualityChecks.js] var x = "abc" + 0 + "abc" === "abc" || "abc" !== "abc" + 0 + "abc" && - "abc" + 0 + "abc" == "abc0abc" && - "abc0abc" !== "abc" + 0 + "abc"; + "abc" + 0 + "abc" == "abc0abc" && + "abc0abc" !== "abc" + 0 + "abc"; diff --git a/tests/baselines/reference/templateStringInEqualityChecksES6.js b/tests/baselines/reference/templateStringInEqualityChecksES6.js index db00827fac..9bb001d9dc 100644 --- a/tests/baselines/reference/templateStringInEqualityChecksES6.js +++ b/tests/baselines/reference/templateStringInEqualityChecksES6.js @@ -7,5 +7,5 @@ var x = `abc${0}abc` === `abc` || //// [templateStringInEqualityChecksES6.js] var x = `abc${0}abc` === `abc` || `abc` !== `abc${0}abc` && - `abc${0}abc` == "abc0abc" && - "abc0abc" !== `abc${0}abc`; + `abc${0}abc` == "abc0abc" && + "abc0abc" !== `abc${0}abc`; diff --git a/tests/baselines/reference/thisInPropertyBoundDeclarations.js b/tests/baselines/reference/thisInPropertyBoundDeclarations.js index 3f1bac9807..e5004eed43 100644 --- a/tests/baselines/reference/thisInPropertyBoundDeclarations.js +++ b/tests/baselines/reference/thisInPropertyBoundDeclarations.js @@ -117,10 +117,10 @@ var B = (function () { this.prop2 = function () { return _this; }; this.prop3 = function () { return function () { return function () { return function () { return _this; }; }; }; }; this.prop4 = ' ' + - function () { - } + - ' ' + - (function () { return function () { return function () { return _this; }; }; }); + function () { + } + + ' ' + + (function () { return function () { return function () { return _this; }; }; }); this.prop5 = { a: function () { return _this; } }; diff --git a/tests/baselines/reference/typeGuardsInConditionalExpression.js b/tests/baselines/reference/typeGuardsInConditionalExpression.js index e493df66ce..7c87d80d59 100644 --- a/tests/baselines/reference/typeGuardsInConditionalExpression.js +++ b/tests/baselines/reference/typeGuardsInConditionalExpression.js @@ -143,8 +143,8 @@ function foo7(x) { function foo8(x) { var b; return typeof x === "string" ? x === "hello" : ((b = x) && - (typeof x === "boolean" ? x // boolean - : x == 10)); // number + (typeof x === "boolean" ? x // boolean + : x == 10)); // number } function foo9(x) { var y = 10;