From 6a9bd1432c01352c2247fd05177625a4438f3ad0 Mon Sep 17 00:00:00 2001 From: Denis Nedelyaev Date: Thu, 10 Sep 2015 21:16:16 +0300 Subject: [PATCH 001/121] Simple fix for #4721 This makes relative outDir and other file path options not ignored when they point to the working directory. No tests are failed. Another way to fix this is to use `options.somePathOprtion !== undefined` check everywhere, but it would be a more complex change. What do you think? --- src/compiler/commandLineParser.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index d22bc986688..9a3931f2ec8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -446,6 +446,9 @@ namespace ts { } if (opt.isFilePath) { value = normalizePath(combinePaths(basePath, value)); + if (value === "") { + value = "."; + } } options[opt.name] = value; } @@ -495,4 +498,4 @@ namespace ts { return fileNames; } } -} \ No newline at end of file +} From 04ed89230ed68b59acaacc8ef7ae9b55e3d1ef90 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 18 Sep 2015 17:44:19 -0700 Subject: [PATCH 002/121] Add tests for exponentiation --- ...ponentiationAssignmentLHSCanBeAssigned1.ts | 26 ++++ ...ponentiationAssignmentLHSCanBeAssigned2.ts | 60 +++++++++ ...dExponentiationAssignmentLHSIsReference.ts | 26 ++++ ...poundExponentiationAssignmentLHSIsValue.ts | 85 +++++++++++++ .../emitCompoundExponentiationOperator1.ts | 20 +++ .../emitExponentiationOperator1.ts | 32 +++++ .../emitExponentiationOperator2.ts | 32 +++++ ...ExponentiationOperatorInTemplateString1.ts | 10 ++ .../exponentiationOperatorWithAnyAndNumber.ts | 12 ++ .../exponentiationOperatorWithEnum.ts | 24 ++++ .../exponentiationOperatorWithEnumUnion.ts | 28 ++++ ...ponentiationOperatorWithInvalidOperands.ts | 68 ++++++++++ ...OperatorWithNullValueAndInvalidOperands.ts | 23 ++++ ...onOperatorWithNullValueAndValidOperands.ts | 20 +++ ...eratorWithOnlyNullValueOrUndefinedValue.ts | 5 + ...exponentiationOperatorWithTypeParameter.ts | 20 +++ ...torWithUndefinedValueAndInvalidOperands.ts | 23 ++++ ...ratorWithUndefinedValueAndValidOperands.ts | 120 ++++++++++++++++++ 18 files changed, 634 insertions(+) create mode 100644 tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned2.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithAnyAndNumber.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnum.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnumUnion.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts diff --git a/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts new file mode 100644 index 00000000000..35b434b6bac --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts @@ -0,0 +1,26 @@ +enum E { a, b, c } + +var a: any; +var b: number; +var c: E; + +var x1: any; +x1 **= a; +x1 **= b; +x1 **= c; +x1 **= null; +x1 **= undefined; + +var x2: number; +x2 **= a; +x2 **= b; +x2 **= c; +x2 **= null; +x2 **= undefined; + +var x3: E; +x3 **= a; +x3 **= b; +x3 **= c; +x3 **= null; +x3 **= undefined; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned2.ts b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned2.ts new file mode 100644 index 00000000000..7995cc8d668 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned2.ts @@ -0,0 +1,60 @@ +enum E { a, b } + +var a: any; +var b: void; + +var x1: boolean; +x1 **= a; +x1 **= b; +x1 **= true; +x1 **= 0; +x1 **= '' +x1 **= E.a; +x1 **= {}; +x1 **= null; +x1 **= undefined; + +var x2: string; +x2 **= a; +x2 **= b; +x2 **= true; +x2 **= 0; +x2 **= '' +x2 **= E.a; +x2 **= {}; +x2 **= null; +x2 **= undefined; + +var x3: {}; +x3 **= a; +x3 **= b; +x3 **= true; +x3 **= 0; +x3 **= '' +x3 **= E.a; +x3 **= {}; +x3 **= null; +x3 **= undefined; + +var x4: void; +x4 **= a; +x4 **= b; +x4 **= true; +x4 **= 0; +x4 **= '' +x4 **= E.a; +x4 **= {}; +x4 **= null; +x4 **= undefined; + +var x5: number; +x5 **= b; +x5 **= true; +x5 **= '' +x5 **= {}; + +var x6: E; +x6 *= b; +x6 *= true; +x6 *= '' +x6 *= {}; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts new file mode 100644 index 00000000000..02e6acfa685 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts @@ -0,0 +1,26 @@ +var value; + +// identifiers: variable and parameter +var x1: number; +x1 **= value; + +function fn1(x2: number) { + x2 **= value; +} + +// property accesses +var x3: { a: number }; +x3.a **= value; + +x3['a'] **= value; + +// parentheses, the contained expression is reference +(x1) **= value; + +function fn2(x4: number) { + (x4) **= value; +} + +(x3.a) **= value; + +(x3['a']) **= value; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts new file mode 100644 index 00000000000..0eac581bfe4 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts @@ -0,0 +1,85 @@ +// expected error for all the LHS of compound assignments (arithmetic and addition) +var value; + +// this +class C { + constructor() { + this **= value; + } + foo() { + this **= value; + } + static sfoo() { + this **= value; + } +} + +function foo() { + this **= value; +} + +this **= value; + +// identifiers: module, class, enum, function +module M { export var a; } +M **= value; + +C **= value; + +enum E { } +E **= value; + +foo **= value; + +// literals +null **= value; +true **= value; +false **= value; +0 **= value; +'' **= value; +/d+/ **= value; + +// object literals +{ a: 0 } **= value; + +// array literals +['', ''] **= value; + +// super +class Derived extends C { + constructor() { + super(); + super **= value; + } + + foo() { + super **= value; + } + + static sfoo() { + super **= value; + } +} + +// function expression +function bar1() { } **= value; +() => { } **= value; + +// function calls +foo() **= value; + +// parentheses, the containted expression is value +(this) **= value; +(M) **= value; +(C) **= value; +(E) **= value; +(foo) **= value; +(null) **= value; +(true) **= value; +(0) **= value; +('') **= value; +(/d+/) **= value; +({}) **= value; +([]) **= value; +(function baz1() { }) **= value; +(foo()) **= value; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts new file mode 100644 index 00000000000..40647d37bf7 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts @@ -0,0 +1,20 @@ +var comp: number; + +comp **= 1; +comp **= comp ** comp; +comp **= comp ** comp ** 2; +comp **= comp ** comp + 2; +comp **= comp ** comp - 2; +comp **= comp ** comp * 2; +comp **= comp ** comp / 2; +comp **= comp ** comp % 2; +comp **= (comp - 2) ** 5; +comp **= (comp + 2) ** 5; +comp **= (comp * 2) ** 5; +comp **= (comp / 2) ** 5; +comp **= (comp % 2) ** 5; +comp **= comp ** (5 + 2); +comp **= comp ** (5 - 2); +comp **= comp ** (5 * 2); +comp **= comp ** (5 / 2); +comp **= comp ** (5 % 2); \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts new file mode 100644 index 00000000000..9f8fa8f4d94 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts @@ -0,0 +1,32 @@ +// @target: es5 + +1 ** 2; +1 ** 2 ** 3; +1 ** -2 ** 3; +1 ** -2 ** -3; +-1 ** -2 ** -3; +-(1 ** 2) ** 3; +1 ** -(2 ** 3); + +1 ** 2 + 3; +1 ** 2 - 3; +1 ** 2 * 3; +1 ** 2 / 3; +1 ** 2 % 3; + +1 ** -2 + 3; +1 ** -2 - 3; +1 ** -2 * 3; +1 ** -2 / 3; +1 ** -2 % 3; + +2 + 3 ** 3; +2 - 3 ** 3; +2 * 3 ** 3; +2 / 3 ** 3; +2 % 3 ** 3; + +(2 + 3) ** 4; +(2 - 3) ** 4; +(2 * 3) ** 4; +(2 / 3) ** 4; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts new file mode 100644 index 00000000000..a8d1241dc8a --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts @@ -0,0 +1,32 @@ +// @target:es5 + +var temp = 10; + +++temp ** 3; +--temp ** 3; +3 ** ++temp; +3 ** --temp; + +--temp + 2 ** 3; +--temp - 2 ** 3; +--temp * 2 ** 3; +--temp / 2 ** 3; +--temp % 2 ** 3; + +++temp + 2 ** 3; +++temp - 2 ** 3; +++temp * 2 ** 3; +++temp / 2 ** 3; +++temp % 2 ** 3; + +3 ** ++temp + 2; +3 ** ++temp - 2; +3 ** ++temp * 2; +3 ** ++temp / 2; +3 ** ++temp % 2; + +3 ** --temp + 2; +3 ** --temp - 2; +3 ** --temp * 2; +3 ** --temp / 2; +3 ** --temp % 2; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts new file mode 100644 index 00000000000..2b2f942c525 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts @@ -0,0 +1,10 @@ +var t1 = 10; +var t2 = 10; +console.log(`${t1 ** t2}`) +console.log(`${t1 ** t2 ** t1}`) +console.log(`${t1 + t2 ** t1}`) +console.log(`${t1 - t2 ** t1}`) +console.log(`${t1 ** t2 + t1}`) +console.log(`${t1 ** t2 - t1}`) +console.log(`${t1 + t2 ** t2 + t1}`) +console.log(`${t1 - t2 ** t2 - t1}`) \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithAnyAndNumber.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithAnyAndNumber.ts new file mode 100644 index 00000000000..c5652211064 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithAnyAndNumber.ts @@ -0,0 +1,12 @@ +var a: any; +var b: number; + +// operator ** +var r1 = a ** a; +var r2 = a ** b; +var r3 = a ** 0; +var r4 = 0 ** a; +var r5 = 0 ** 0; +var r6 = b ** 0; +var r7 = 0 ** b; +var r8 = b ** b; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnum.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnum.ts new file mode 100644 index 00000000000..dee953c6abb --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnum.ts @@ -0,0 +1,24 @@ +// operands of an enum type are treated as having the primitive type Number. + +enum E { + a, + b +} + +var a: any; +var b: number; +var c: E; + +// operator ** +var r1 = c ** a; +var r2 = c ** b; +var r3 = c ** c; +var r4 = a ** c; +var r5 = b ** c; +var r6 = E.a ** a; +var r7 = E.a ** b; +var r8 = E.a ** E.b; +var r9 = E.a ** 1; +var r10 = a ** E.b; +var r11 = b ** E.b; +var r12 = 1 ** E.b; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnumUnion.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnumUnion.ts new file mode 100644 index 00000000000..2528027f4cb --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnumUnion.ts @@ -0,0 +1,28 @@ +// operands of an enum type are treated as having the primitive type Number. + +enum E { + a, + b +} +enum F { + c, + d +} + +var a: any; +var b: number; +var c: E | F; + +// operator ** +var r1 = c ** a; +var r2 = c ** b; +var r3 = c ** c; +var r4 = a ** c; +var r5 = b ** c; +var r6 = E.a ** a; +var r7 = E.a ** b; +var r8 = E.a ** E.b; +var r9 = E.a ** 1; +var r10 = a ** E.b; +var r11 = b ** E.b; +var r12 = 1 ** E.b; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts new file mode 100644 index 00000000000..f16ddc61ed5 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts @@ -0,0 +1,68 @@ +// these operators require their operands to be of type Any, the Number primitive type, or +// an enum type +enum E { a, b, c } + +var a: any; +var b: boolean; +var c: number; +var d: string; +var e: { a: number }; +var f: Number; + +// All of the below should be an error unless otherwise noted +// operator ** +var r1a1 = a ** a; //ok +var r1a2 = a ** b; +var r1a3 = a ** c; //ok +var r1a4 = a ** d; +var r1a5 = a ** e; +var r1a6 = a ** f; + +var r1b1 = b ** a; +var r1b2 = b ** b; +var r1b3 = b ** c; +var r1b4 = b ** d; +var r1b5 = b ** e; +var r1b6 = b ** f; + +var r1c1 = c ** a; //ok +var r1c2 = c ** b; +var r1c3 = c ** c; //ok +var r1c4 = c ** d; +var r1c5 = c ** e; +var r1c6 = c ** f; + +var r1d1 = d ** a; +var r1d2 = d ** b; +var r1d3 = d ** c; +var r1d4 = d ** d; +var r1d5 = d ** e; +var r1d6 = d ** f; + +var r1e1 = e ** a; +var r1e2 = e ** b; +var r1e3 = e ** c; +var r1e4 = e ** d; +var r1e5 = e ** e; +var r1e6 = e ** f; + +var r1f1 = f ** a; +var r1f2 = f ** b; +var r1f3 = f ** c; +var r1f4 = f ** d; +var r1f5 = f ** e; +var r1f6 = f ** f; + +var r1g1 = E.a ** a; //ok +var r1g2 = E.a ** b; +var r1g3 = E.a ** c; //ok +var r1g4 = E.a ** d; +var r1g5 = E.a ** e; +var r1g6 = E.a ** f; + +var r1h1 = a ** E.b; //ok +var r1h2 = b ** E.b; +var r1h3 = c ** E.b; //ok +var r1h4 = d ** E.b; +var r1h5 = e ** E.b; +var r1h6 = f ** E.b \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts new file mode 100644 index 00000000000..7ecec740d41 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts @@ -0,0 +1,23 @@ +// If one operand is the null or undefined value, it is treated as having the type of the +// other operand. + +var a: boolean; +var b: string; +var c: Object; + +// operator ** +var r1a1 = null ** a; +var r1a2 = null ** b; +var r1a3 = null ** c; + +var r1b1 = a ** null; +var r1b2 = b ** null; +var r1b3 = c ** null; + +var r1c1 = null ** true; +var r1c2 = null ** ''; +var r1c3 = null ** {}; + +var r1d1 = true ** null; +var r1d2 = '' ** null; +var r1d3 = {} ** null; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts new file mode 100644 index 00000000000..acc152ea696 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts @@ -0,0 +1,20 @@ +// If one operand is the null or undefined value, it is treated as having the type of the +// other operand. + +enum E { + a, + b +} + +var a: any; +var b: number; + +// operator ** +var r1 = null ** a; +var r2 = null ** b; +var r3 = null ** 1; +var r4 = null ** E.a; +var r5 = a ** null; +var r6 = b ** null; +var r7 = 0 ** null; +var r8 = E.b ** null; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts new file mode 100644 index 00000000000..82133ed3914 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts @@ -0,0 +1,5 @@ +// operator ** +var r1 = null ** null; +var r2 = null ** undefined; +var r3 = undefined ** null; +var r4 = undefined ** undefined; diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts new file mode 100644 index 00000000000..d028b5c6575 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts @@ -0,0 +1,20 @@ +// type parameter type is not valid for arithmetic operand +function foo(t: T) { + var a: any; + var b: boolean; + var c: number; + var d: string; + var e: {}; + + var r1a1 = a ** t; + var r2a1 = t ** a; + var r1b1 = b ** t; + var r2b1 = t ** b; + var r1c1 = c ** t; + var r2c1 = t ** c; + var r1d1 = d ** t; + var r2d1 = t ** d; + var r1e1 = e ** t; + var r2e1 = t ** d; + var r1f1 = t ** t; +} \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts new file mode 100644 index 00000000000..7693e4a83f9 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts @@ -0,0 +1,23 @@ +// If one operand is the undefined or undefined value, it is treated as having the type of the +// other operand. + +var a: boolean; +var b: string; +var c: Object; + +// operator ** +var r1a1 = undefined ** a; +var r1a2 = undefined ** b; +var r1a3 = undefined ** c; + +var r1b1 = a ** undefined; +var r1b2 = b ** undefined; +var r1b3 = c ** undefined; + +var r1c1 = undefined ** true; +var r1c2 = undefined ** ''; +var r1c3 = undefined ** {}; + +var r1d1 = true ** undefined; +var r1d2 = '' ** undefined; +var r1d3 = {} ** undefined; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts new file mode 100644 index 00000000000..fd391d198b1 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts @@ -0,0 +1,120 @@ +// If one operand is the undefined or undefined value, it is treated as having the type of the +// other operand. + +enum E { + a, + b +} + +var a: any; +var b: number; + +// operator * +var ra1 = undefined * a; +var ra2 = undefined * b; +var ra3 = undefined * 1; +var ra4 = undefined * E.a; +var ra5 = a * undefined; +var ra6 = b * undefined; +var ra7 = 0 * undefined; +var ra8 = E.b * undefined; + +// operator / +var rb1 = undefined / a; +var rb2 = undefined / b; +var rb3 = undefined / 1; +var rb4 = undefined / E.a; +var rb5 = a / undefined; +var rb6 = b / undefined; +var rb7 = 0 / undefined; +var rb8 = E.b / undefined; + +// operator % +var rc1 = undefined % a; +var rc2 = undefined % b; +var rc3 = undefined % 1; +var rc4 = undefined % E.a; +var rc5 = a % undefined; +var rc6 = b % undefined; +var rc7 = 0 % undefined; +var rc8 = E.b % undefined; + +// operator - +var rd1 = undefined - a; +var rd2 = undefined - b; +var rd3 = undefined - 1; +var rd4 = undefined - E.a; +var rd5 = a - undefined; +var rd6 = b - undefined; +var rd7 = 0 - undefined; +var rd8 = E.b - undefined; + +// operator << +var re1 = undefined << a; +var re2 = undefined << b; +var re3 = undefined << 1; +var re4 = undefined << E.a; +var re5 = a << undefined; +var re6 = b << undefined; +var re7 = 0 << undefined; +var re8 = E.b << undefined; + +// operator >> +var rf1 = undefined >> a; +var rf2 = undefined >> b; +var rf3 = undefined >> 1; +var rf4 = undefined >> E.a; +var rf5 = a >> undefined; +var rf6 = b >> undefined; +var rf7 = 0 >> undefined; +var rf8 = E.b >> undefined; + +// operator >>> +var rg1 = undefined >>> a; +var rg2 = undefined >>> b; +var rg3 = undefined >>> 1; +var rg4 = undefined >>> E.a; +var rg5 = a >>> undefined; +var rg6 = b >>> undefined; +var rg7 = 0 >>> undefined; +var rg8 = E.b >>> undefined; + +// operator & +var rh1 = undefined & a; +var rh2 = undefined & b; +var rh3 = undefined & 1; +var rh4 = undefined & E.a; +var rh5 = a & undefined; +var rh6 = b & undefined; +var rh7 = 0 & undefined; +var rh8 = E.b & undefined; + +// operator ^ +var ri1 = undefined ^ a; +var ri2 = undefined ^ b; +var ri3 = undefined ^ 1; +var ri4 = undefined ^ E.a; +var ri5 = a ^ undefined; +var ri6 = b ^ undefined; +var ri7 = 0 ^ undefined; +var ri8 = E.b ^ undefined; + +// operator | +var rj1 = undefined | a; +var rj2 = undefined | b; +var rj3 = undefined | 1; +var rj4 = undefined | E.a; +var rj5 = a | undefined; +var rj6 = b | undefined; +var rj7 = 0 | undefined; +var rj8 = E.b | undefined; + +// operator * +var rk1 = undefined ** a; +var rk2 = undefined ** b; +var rk3 = undefined ** 1; +var rk4 = undefined ** E.a; +var rk5 = a ** undefined; +var rk6 = b ** undefined; +var rk7 = 0 ** undefined; +var rk8 = E.b ** undefined; \ No newline at end of file From 76ef7b40dee3e0d9897777e90f6e1e354123b51f Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 18 Sep 2015 18:31:52 -0700 Subject: [PATCH 003/121] Initial operator. Need to fix the grammar for unaryExpression --- src/compiler/checker.ts | 6 ++++-- src/compiler/emitter.ts | 23 +++++++++++++++++------ src/compiler/parser.ts | 8 +++++++- src/compiler/scanner.ts | 8 ++++++++ src/compiler/types.ts | 17 +++++++++++------ 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 80a04129eed..837113fd375 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9842,7 +9842,9 @@ namespace ts { let rightType = checkExpression(node.right, contextualMapper); switch (operator) { case SyntaxKind.AsteriskToken: + case SyntaxKind.AsteriskAsteriskToken: case SyntaxKind.AsteriskEqualsToken: + case SyntaxKind.AsteriskAsteriskEqualsToken: case SyntaxKind.SlashToken: case SyntaxKind.SlashEqualsToken: case SyntaxKind.PercentToken: @@ -9861,7 +9863,7 @@ namespace ts { case SyntaxKind.CaretEqualsToken: case SyntaxKind.AmpersandToken: case SyntaxKind.AmpersandEqualsToken: - // TypeScript 1.0 spec (April 2014): 4.15.1 + // TypeScript 1.0 spec (April 2014): 4.19.1 // These operators require their operands to be of type Any, the Number primitive type, // or an enum type. Operands of an enum type are treated // as having the primitive type Number. If one operand is the null or undefined value, @@ -9890,7 +9892,7 @@ namespace ts { return numberType; case SyntaxKind.PlusToken: case SyntaxKind.PlusEqualsToken: - // TypeScript 1.0 spec (April 2014): 4.15.2 + // TypeScript 1.0 spec (April 2014): 4.19.2 // The binary + operator requires both operands to be of the Number primitive type or an enum type, // or at least one of the operands to be of type Any or the String primitive type. diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 44e5a45b057..6ddf868efe1 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2522,12 +2522,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitNodeWithoutSourceMap(node.left); write(`", `); } - emit(node.left); - let indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== SyntaxKind.CommaToken ? " " : undefined); - write(tokenToString(node.operatorToken.kind)); - let indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); - emit(node.right); - decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); + + if (languageVersion < ScriptTarget.ES7 && node.operatorToken.kind === SyntaxKind.AsteriskAsteriskToken) { + write("Math.pow("); + emit(node.left); + write(", "); + emit(node.right); + write(")"); + } + else { + emit(node.left); + let indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== SyntaxKind.CommaToken ? " " : undefined); + write(tokenToString(node.operatorToken.kind)); + let indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); + emit(node.right); + decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); + } + if (exportChanged) { write(")"); } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 330ad05518b..7673f147e8f 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3015,7 +3015,11 @@ namespace ts { let newPrecedence = getBinaryOperatorPrecedence(); // Check the precedence to see if we should "take" this operator - if (newPrecedence <= precedence) { + if (token === SyntaxKind.AsteriskAsteriskToken && newPrecedence < precedence) { + // ** operator is right-assocative + break; + } + else if (token !== SyntaxKind.AsteriskAsteriskToken && newPrecedence <= precedence) { break; } @@ -3089,6 +3093,8 @@ namespace ts { case SyntaxKind.SlashToken: case SyntaxKind.PercentToken: return 10; + case SyntaxKind.AsteriskAsteriskToken: + return 11; } // -1 is lower than all other precedences. Returning it will cause binary expression diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 82fbc8c2a59..91a2783d5d4 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -136,6 +136,7 @@ namespace ts { "=>": SyntaxKind.EqualsGreaterThanToken, "+": SyntaxKind.PlusToken, "-": SyntaxKind.MinusToken, + "**": SyntaxKind.AsteriskAsteriskToken, "*": SyntaxKind.AsteriskToken, "/": SyntaxKind.SlashToken, "%": SyntaxKind.PercentToken, @@ -158,6 +159,7 @@ namespace ts { "+=": SyntaxKind.PlusEqualsToken, "-=": SyntaxKind.MinusEqualsToken, "*=": SyntaxKind.AsteriskEqualsToken, + "**=": SyntaxKind.AsteriskAsteriskEqualsToken, "/=": SyntaxKind.SlashEqualsToken, "%=": SyntaxKind.PercentEqualsToken, "<<=": SyntaxKind.LessThanLessThanEqualsToken, @@ -1212,6 +1214,12 @@ namespace ts { if (text.charCodeAt(pos + 1) === CharacterCodes.equals) { return pos += 2, token = SyntaxKind.AsteriskEqualsToken; } + if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) { + if (text.charCodeAt(pos + 2) === CharacterCodes.equals) { + return pos += 3, token = SyntaxKind.AsteriskAsteriskEqualsToken; + } + return pos += 2, token = SyntaxKind.AsteriskAsteriskToken; + } return pos++, token = SyntaxKind.AsteriskToken; case CharacterCodes.plus: if (text.charCodeAt(pos + 1) === CharacterCodes.plus) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index d2757bb7937..657e1f507c1 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -64,6 +64,7 @@ namespace ts { PlusToken, MinusToken, AsteriskToken, + AsteriskAsteriskToken, SlashToken, PercentToken, PlusPlusToken, @@ -86,6 +87,7 @@ namespace ts { PlusEqualsToken, MinusEqualsToken, AsteriskEqualsToken, + AsteriskAsteriskEqualsToken, SlashEqualsToken, PercentEqualsToken, LessThanLessThanEqualsToken, @@ -702,13 +704,15 @@ namespace ts { contextualType?: Type; // Used to temporarily assign a contextual type during overload resolution } + export type UnaryOrBinaryExpression = UnaryExpression | BinaryExpression; + export interface UnaryExpression extends Expression { _unaryExpressionBrand: any; } export interface PrefixUnaryExpression extends UnaryExpression { operator: SyntaxKind; - operand: UnaryExpression; + operand: UnaryOrBinaryExpression; } export interface PostfixUnaryExpression extends PostfixExpression { @@ -733,19 +737,19 @@ namespace ts { } export interface DeleteExpression extends UnaryExpression { - expression: UnaryExpression; + expression: UnaryOrBinaryExpression; } export interface TypeOfExpression extends UnaryExpression { - expression: UnaryExpression; + expression: UnaryOrBinaryExpression; } export interface VoidExpression extends UnaryExpression { - expression: UnaryExpression; + expression: UnaryOrBinaryExpression; } export interface AwaitExpression extends UnaryExpression { - expression: UnaryExpression; + expression: UnaryOrBinaryExpression; } export interface YieldExpression extends Expression { @@ -852,7 +856,7 @@ namespace ts { export interface TypeAssertion extends UnaryExpression { type: TypeNode; - expression: UnaryExpression; + expression: UnaryOrBinaryExpression; } export type AssertionExpression = TypeAssertion | AsExpression; @@ -2101,6 +2105,7 @@ namespace ts { ES3 = 0, ES5 = 1, ES6 = 2, + ES7 = 3, Latest = ES6, } From 21d03690c03ae451a585a67377b1de72a5e4d5d0 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 18 Sep 2015 18:38:59 -0700 Subject: [PATCH 004/121] Basic parsing for the UnaryExpression: IncrementExpression[?Yield]**UnaryExpression[?Yield] --- src/compiler/parser.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 7673f147e8f..f1d92de6308 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3121,7 +3121,13 @@ namespace ts { let node = createNode(SyntaxKind.PrefixUnaryExpression); node.operator = token; nextToken(); - node.operand = parseUnaryExpressionOrHigher(); + let tryParseUnaryExpression = parseUnaryExpressionOrHigher(); + if (token === SyntaxKind.AsteriskAsteriskToken) { + node.operand = parseBinaryExpressionRest(getBinaryOperatorPrecedence(), tryParseUnaryExpression); + } + else { + node.operand = tryParseUnaryExpression; + } return finishNode(node); } From 1140eb81777ee3d07a43b29a5c12aa50cd138c5a Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 21 Sep 2015 15:43:33 -0700 Subject: [PATCH 005/121] Parse ES7 UnaryExpression and IncrementExpression --- src/compiler/parser.ts | 70 ++++++++++++++++++++++++++++++------------ src/compiler/types.ts | 2 ++ 2 files changed, 53 insertions(+), 19 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index f1d92de6308..236a07d2248 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3121,13 +3121,8 @@ namespace ts { let node = createNode(SyntaxKind.PrefixUnaryExpression); node.operator = token; nextToken(); - let tryParseUnaryExpression = parseUnaryExpressionOrHigher(); - if (token === SyntaxKind.AsteriskAsteriskToken) { - node.operand = parseBinaryExpressionRest(getBinaryOperatorPrecedence(), tryParseUnaryExpression); - } - else { - node.operand = tryParseUnaryExpression; - } + node.operand = parseUnaryExpressionOrHigher(); + return finishNode(node); } @@ -3172,7 +3167,21 @@ namespace ts { return finishNode(node); } - function parseUnaryExpressionOrHigher(): UnaryExpression { + /** + * Parse UnaryExpression or higher: + * In ES7 grammar, + * UnaryExpression: + * 1) IncrementExpression[?yield] + * 2) delete UnaryExpression[?yield] + * 3) void UnaryExpression[?yield] + * 4) typeof UnaryExpression[?yield] + * 5) + UnaryExpression[?yield] + * 6) - UnaryExpression[?yield] + * 7) ~ UnaryExpression[?yield] + * 8) ! UnaryExpression[?yield] + * 9) IncrementExpression[?yield] ** UnaryExpression[?yield] + */ + function parseUnaryExpressionOrHigher(): UnaryExpression | BinaryExpression { if (isAwaitExpression()) { return parseAwaitExpression(); } @@ -3182,8 +3191,6 @@ namespace ts { case SyntaxKind.MinusToken: case SyntaxKind.TildeToken: case SyntaxKind.ExclamationToken: - case SyntaxKind.PlusPlusToken: - case SyntaxKind.MinusMinusToken: return parsePrefixUnaryExpression(); case SyntaxKind.DeleteKeyword: return parseDeleteExpression(); @@ -3193,6 +3200,9 @@ namespace ts { return parseVoidExpression(); case SyntaxKind.LessThanToken: if (sourceFile.languageVariant !== LanguageVariant.JSX) { + // This is modified UnaryExpression grammar in TypeScript + // UnaryExpression (modified): + // < type > UnaryExpression return parseTypeAssertion(); } if (lookAhead(nextTokenIsIdentifierOrKeyword)) { @@ -3200,23 +3210,45 @@ namespace ts { } // Fall through default: - return parsePostfixExpressionOrHigher(); + let tryParseUnaryExpression = parseIncrementExpression(); + return token === SyntaxKind.AsteriskAsteriskToken ? + parseBinaryExpressionRest(getBinaryOperatorPrecedence(), tryParseUnaryExpression) : + tryParseUnaryExpression; } } - function parsePostfixExpressionOrHigher(): PostfixExpression { - let expression = parseLeftHandSideExpressionOrHigher(); - - Debug.assert(isLeftHandSideExpression(expression)); - if ((token === SyntaxKind.PlusPlusToken || token === SyntaxKind.MinusMinusToken) && !scanner.hasPrecedingLineBreak()) { - let node = createNode(SyntaxKind.PostfixUnaryExpression, expression.pos); - node.operand = expression; + /** + * Parse ES7 IncrementExpression. The IncrementExpression is used instead of ES6's PostFixExpression. + * + * IncrementExpression[yield]: + * 1) LeftHandSideExpression[?yield] + * 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ + * 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- + * 4) ++LeftHandSideExpression[?yield] + * 5) --LeftHandSideExpression[?yield] + */ + function parseIncrementExpression(): IncrementExpression { + if (token === SyntaxKind.PlusPlusToken || token === SyntaxKind.MinusMinusToken) { + let node = createNode(SyntaxKind.PrefixUnaryExpression); node.operator = token; nextToken(); + node.operand = parseLeftHandSideExpressionOrHigher(); return finishNode(node); } + else { + let expression = parseLeftHandSideExpressionOrHigher(); - return expression; + Debug.assert(isLeftHandSideExpression(expression)); + if ((token === SyntaxKind.PlusPlusToken || token === SyntaxKind.MinusMinusToken) && !scanner.hasPrecedingLineBreak()) { + let node = createNode(SyntaxKind.PostfixUnaryExpression, expression.pos); + node.operand = expression; + node.operator = token; + nextToken(); + return finishNode(node); + } + + return expression; + } } function parseLeftHandSideExpressionOrHigher(): LeftHandSideExpression { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 657e1f507c1..b8002903586 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -710,6 +710,8 @@ namespace ts { _unaryExpressionBrand: any; } + export interface IncrementExpression extends UnaryExpression { } + export interface PrefixUnaryExpression extends UnaryExpression { operator: SyntaxKind; operand: UnaryOrBinaryExpression; From 072089f0ecd63836a3d66f1dd63f399f9c0da85e Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 21 Sep 2015 15:43:49 -0700 Subject: [PATCH 006/121] Downlevel emit for **= --- src/compiler/emitter.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 6ddf868efe1..541488bd82b 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2523,7 +2523,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(`", `); } - if (languageVersion < ScriptTarget.ES7 && node.operatorToken.kind === SyntaxKind.AsteriskAsteriskToken) { + if (languageVersion < ScriptTarget.ES7 && + (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskToken || node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken)) { + if (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) { + emit(node.left); + write(" = "); + } write("Math.pow("); emit(node.left); write(", "); From 31b873640873e438178101c3c5a55166c84bf872 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 21 Sep 2015 15:44:59 -0700 Subject: [PATCH 007/121] Update existed baselines that are affected by ES7 UnaryExpression --- tests/baselines/reference/APISample_linter.js | 20 +-- ...thAnyOtherTypeInvalidOperations.errors.txt | 56 ++++--- ...eratorWithAnyOtherTypeInvalidOperations.js | 18 ++- .../incrementAndDecrement.errors.txt | 146 ++++++++++++------ .../reference/incrementAndDecrement.js | 48 ++++-- ...thAnyOtherTypeInvalidOperations.errors.txt | 29 ++-- ...eratorWithAnyOtherTypeInvalidOperations.js | 9 +- ...ularExpressionMixedWithComments.errors.txt | 8 +- ...parseRegularExpressionMixedWithComments.js | 4 +- .../reference/parserS7.9_A5.7_T1.errors.txt | 5 +- .../baselines/reference/parserS7.9_A5.7_T1.js | 3 +- .../parserUnaryExpression5.errors.txt | 6 +- .../reference/parserUnaryExpression5.js | 3 +- .../emitCompoundExponentiationOperator1.ts | 4 +- .../emitExponentiationOperator2.ts | 49 +++++- ...ratorWithUndefinedValueAndValidOperands.ts | 100 ------------ 16 files changed, 274 insertions(+), 234 deletions(-) diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 4a467a60a84..aeff3a327f5 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -75,26 +75,26 @@ function delint(sourceFile) { delintNode(sourceFile); function delintNode(node) { switch (node.kind) { - case 197 /* ForStatement */: - case 198 /* ForInStatement */: - case 196 /* WhileStatement */: - case 195 /* DoStatement */: - if (node.statement.kind !== 190 /* Block */) { + case 199 /* ForStatement */: + case 200 /* ForInStatement */: + case 198 /* WhileStatement */: + case 197 /* DoStatement */: + if (node.statement.kind !== 192 /* Block */) { report(node, "A looping statement's contents should be wrapped in a block body."); } break; - case 194 /* IfStatement */: + case 196 /* IfStatement */: var ifStatement = node; - if (ifStatement.thenStatement.kind !== 190 /* Block */) { + if (ifStatement.thenStatement.kind !== 192 /* Block */) { report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body."); } if (ifStatement.elseStatement && - ifStatement.elseStatement.kind !== 190 /* Block */ && - ifStatement.elseStatement.kind !== 194 /* IfStatement */) { + ifStatement.elseStatement.kind !== 192 /* Block */ && + ifStatement.elseStatement.kind !== 196 /* IfStatement */) { report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body."); } break; - case 179 /* BinaryExpression */: + case 181 /* BinaryExpression */: var op = node.operatorToken.kind; if (op === 30 /* EqualsEqualsToken */ || op == 31 /* ExclamationEqualsToken */) { report(node, "Use '===' and '!=='."); diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt index 31213ce2fd4..46e5515633a 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt @@ -36,15 +36,21 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(60,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(63,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(65,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(70,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(71,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(72,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,7): error TS1005: ';' expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,9): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,7): error TS1005: ';' expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,9): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,7): error TS1005: ';' expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,9): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(70,10): error TS1005: ';' expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(70,12): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(71,10): error TS1005: ';' expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(71,12): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(72,10): error TS1005: ';' expected. +tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(72,12): error TS1109: Expression expected. -==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts (44 errors) ==== +==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts (50 errors) ==== // -- operator on any type var ANY1; var ANY2: any[] = ["", ""]; @@ -188,20 +194,32 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp !!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. --ANY1--; - ~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --ANY1++; - ~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. ++ANY1--; - ~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --ANY2[0]--; - ~~~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --ANY2[0]++; - ~~~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. ++ANY2[0]--; - ~~~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js index 5b717d0669c..f8021a713c4 100644 --- a/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/decrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -131,9 +131,15 @@ var ResultIsNumber30 = obj1.y--; // miss assignment operators --ANY2; ANY2--; ---ANY1--; ---ANY1++; -++ANY1--; ---ANY2[0]--; ---ANY2[0]++; -++ANY2[0]--; +--ANY1; +--; +--ANY1; +++; +++ANY1; +--; +--ANY2[0]; +--; +--ANY2[0]; +++; +++ANY2[0]; +--; diff --git a/tests/baselines/reference/incrementAndDecrement.errors.txt b/tests/baselines/reference/incrementAndDecrement.errors.txt index 7cbf8cbc0fe..d41764176a4 100644 --- a/tests/baselines/reference/incrementAndDecrement.errors.txt +++ b/tests/baselines/reference/incrementAndDecrement.errors.txt @@ -3,25 +3,41 @@ tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(8,5): err tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(11,5): error TS1005: ';' expected. tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(14,5): error TS1005: ';' expected. tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(17,5): error TS1005: ';' expected. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(24,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(25,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(26,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(27,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(34,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(35,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(36,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(37,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(44,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(45,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(46,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(47,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(55,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(56,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(57,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(58,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(24,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(24,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(25,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(25,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(26,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(26,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(27,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(27,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(34,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(34,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(35,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(35,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(36,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(36,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(37,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(37,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(44,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(44,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(45,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(45,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(46,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(46,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(47,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(47,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(55,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(55,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(56,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(56,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(57,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(57,6): error TS1109: Expression expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(58,4): error TS1005: ';' expected. +tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(58,6): error TS1109: Expression expected. -==== tests/cases/conformance/expressions/operators/incrementAndDecrement.ts (21 errors) ==== +==== tests/cases/conformance/expressions/operators/incrementAndDecrement.ts (37 errors) ==== enum E { A, B, C }; var x = 4; var e = E.B; @@ -56,17 +72,25 @@ tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(58,3): er ++x; --x; ++x++; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --x--; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. ++x--; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --x++; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. // Pre and postfix++ on enum e++; @@ -74,17 +98,25 @@ tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(58,3): er ++e; --e; ++e++; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --e--; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. ++e--; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --e++; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. // Pre and postfix++ on value of type 'any' a++; @@ -92,17 +124,25 @@ tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(58,3): er ++a; --a; ++a++; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --a--; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. ++a--; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --a++; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. // Pre and postfix++ on other types @@ -111,17 +151,25 @@ tests/cases/conformance/expressions/operators/incrementAndDecrement.ts(58,3): er ++w; // Error --w; // Error ++w++; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --w--; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. ++w--; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. --w++; // Error - ~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/incrementAndDecrement.js b/tests/baselines/reference/incrementAndDecrement.js index 09c0b3ae490..49324498c9a 100644 --- a/tests/baselines/reference/incrementAndDecrement.js +++ b/tests/baselines/reference/incrementAndDecrement.js @@ -90,34 +90,50 @@ x++; x--; ++x; --x; -++x++; // Error ---x--; // Error -++x--; // Error ---x++; // Error +++x; +++; // Error +--x; +--; // Error +++x; +--; // Error +--x; +++; // Error // Pre and postfix++ on enum e++; e--; ++e; --e; -++e++; // Error ---e--; // Error -++e--; // Error ---e++; // Error +++e; +++; // Error +--e; +--; // Error +++e; +--; // Error +--e; +++; // Error // Pre and postfix++ on value of type 'any' a++; a--; ++a; --a; -++a++; // Error ---a--; // Error -++a--; // Error ---a++; // Error +++a; +++; // Error +--a; +--; // Error +++a; +--; // Error +--a; +++; // Error // Pre and postfix++ on other types w++; // Error w--; // Error ++w; // Error --w; // Error -++w++; // Error ---w--; // Error -++w--; // Error ---w++; // Error +++w; +++; // Error +--w; +--; // Error +++w; +--; // Error +--w; +++; // Error diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt index ab301964026..92e639df21e 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.errors.txt @@ -36,13 +36,16 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(60,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(63,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(65,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. -tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,7): error TS1005: ';' expected. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,9): error TS1109: Expression expected. tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. -tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. -tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,7): error TS1005: ';' expected. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,9): error TS1109: Expression expected. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,10): error TS1005: ';' expected. +tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,12): error TS1109: Expression expected. -==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts (42 errors) ==== +==== tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts (45 errors) ==== // ++ operator on any type var ANY1; var ANY2: any[] = [1, 2]; @@ -186,13 +189,19 @@ tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOp !!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. ++ANY1++; - ~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. ++ANY2++; ~~~~ !!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. - ~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. ++ANY2[0]++; - ~~~~~~~~~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file + ~~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js index 259dcac404e..73ec64dfc55 100644 --- a/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js +++ b/tests/baselines/reference/incrementOperatorWithAnyOtherTypeInvalidOperations.js @@ -128,6 +128,9 @@ var ResultIsNumber30 = obj1.y++; // miss assignment operators ++ANY2; ANY2++; -++ANY1++; -++ANY2++; -++ANY2[0]++; +++ANY1; +++; +++ANY2; +++; +++ANY2[0]; +++; diff --git a/tests/baselines/reference/parseRegularExpressionMixedWithComments.errors.txt b/tests/baselines/reference/parseRegularExpressionMixedWithComments.errors.txt index a6d63ce1754..b4e08a6af46 100644 --- a/tests/baselines/reference/parseRegularExpressionMixedWithComments.errors.txt +++ b/tests/baselines/reference/parseRegularExpressionMixedWithComments.errors.txt @@ -1,12 +1,10 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(5,18): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(5,22): error TS1109: Expression expected. tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(5,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(6,18): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(6,26): error TS1109: Expression expected. tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(6,27): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -==== tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts (6 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts (4 errors) ==== var regex1 = / asdf /; var regex2 = /**// asdf /; var regex3 = /**///**/ asdf / // should be a comment line @@ -14,14 +12,10 @@ tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpres var regex4 = /**// /**/asdf /; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~ -!!! error TS1109: Expression expected. ~~~~~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. var regex5 = /**// asdf/**/ /; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~ -!!! error TS1109: Expression expected. ~~~ !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/parseRegularExpressionMixedWithComments.js b/tests/baselines/reference/parseRegularExpressionMixedWithComments.js index c7aded33697..78752a77f75 100644 --- a/tests/baselines/reference/parseRegularExpressionMixedWithComments.js +++ b/tests/baselines/reference/parseRegularExpressionMixedWithComments.js @@ -10,5 +10,5 @@ var regex5 = /**// asdf/**/ /; var regex1 = / asdf /; var regex2 = / asdf /; var regex3 = 1; -var regex4 = / / * * /asdf /; -var regex5 = / asdf/ * * / /; +var regex4 = Math.pow(/ /, /asdf /); +var regex5 = Math.pow(/ asdf/, / /); diff --git a/tests/baselines/reference/parserS7.9_A5.7_T1.errors.txt b/tests/baselines/reference/parserS7.9_A5.7_T1.errors.txt index ed5f1738c50..63bb9f06ecd 100644 --- a/tests/baselines/reference/parserS7.9_A5.7_T1.errors.txt +++ b/tests/baselines/reference/parserS7.9_A5.7_T1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/parserS7.9_A5.7_T1.ts(17,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. +tests/cases/conformance/parser/ecmascript5/parserS7.9_A5.7_T1.ts(17,1): error TS1109: Expression expected. ==== tests/cases/conformance/parser/ecmascript5/parserS7.9_A5.7_T1.ts (1 errors) ==== @@ -20,8 +20,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.9_A5.7_T1.ts(17,1): error TS ++ ++ ~~ +!!! error TS1109: Expression expected. y - ~ -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.9_A5.7_T1.js b/tests/baselines/reference/parserS7.9_A5.7_T1.js index ae5896c28e5..575d62caf19 100644 --- a/tests/baselines/reference/parserS7.9_A5.7_T1.js +++ b/tests/baselines/reference/parserS7.9_A5.7_T1.js @@ -33,4 +33,5 @@ y */ var x = 0, y = 0; var z = x; -++++y; +++; +++y; diff --git a/tests/baselines/reference/parserUnaryExpression5.errors.txt b/tests/baselines/reference/parserUnaryExpression5.errors.txt index b5d98b8cef4..0daa8d154c3 100644 --- a/tests/baselines/reference/parserUnaryExpression5.errors.txt +++ b/tests/baselines/reference/parserUnaryExpression5.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression5.ts(1,4): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression5.ts(1,4): error TS1109: Expression expected. tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression5.ts(1,11): error TS2304: Cannot find name 'foo'. ==== tests/cases/conformance/parser/ecmascript5/Expressions/parserUnaryExpression5.ts (2 errors) ==== ++ delete foo.bar - ~~~~~~~~~~~~~~ -!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + ~~~~~~ +!!! error TS1109: Expression expected. ~~~ !!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/parserUnaryExpression5.js b/tests/baselines/reference/parserUnaryExpression5.js index 9495ee15b88..c1bbbd00818 100644 --- a/tests/baselines/reference/parserUnaryExpression5.js +++ b/tests/baselines/reference/parserUnaryExpression5.js @@ -2,4 +2,5 @@ ++ delete foo.bar //// [parserUnaryExpression5.js] -++delete foo.bar; +++; +delete foo.bar; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts index 40647d37bf7..53bbd8e10a7 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts @@ -1,4 +1,6 @@ -var comp: number; +// @target:es5 + +var comp: number; comp **= 1; comp **= comp ** comp; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts index a8d1241dc8a..317688bf913 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts @@ -4,8 +4,26 @@ var temp = 10; ++temp ** 3; --temp ** 3; -3 ** ++temp; -3 ** --temp; +temp++ ** 3; +temp-- ** 3; +--temp + temp ** 3; +--temp - temp ** 3; +--temp * temp ** 3; +--temp / temp ** 3; +--temp % temp ** 3; +-++temp ** 3; ++--temp ** 3; + +temp-- ** 3; +temp++ ** 3; +-temp++ ** 3; ++temp-- ** 3; + +temp-- + temp ** 3; +temp-- - temp ** 3; +temp-- * temp ** 3; +temp-- / temp ** 3; +temp-- % temp ** 3; --temp + 2 ** 3; --temp - 2 ** 3; @@ -17,7 +35,32 @@ var temp = 10; ++temp - 2 ** 3; ++temp * 2 ** 3; ++temp / 2 ** 3; -++temp % 2 ** 3; + +3 ** ++temp; +3 ** --temp; +3 ** temp++; +3 ** temp--; +-3 ** temp++; +-3 ** temp--; +-3 ** ++temp; +-3 ** --temp; ++3 ** temp++; ++3 ** temp--; ++3 ** ++temp; ++3 ** --temp + +3 ** ++temp ** 2; +3 ** --temp ** 2; +3 ** temp++ ** 2; +3 ** temp-- ** 2; +-3 ** temp++ ** 2; +-3 ** temp-- ** 2; +-3 ** ++temp ** 2; +-3 ** --temp ** 2; ++3 ** temp++ ** 2; ++3 ** temp-- ** 2; ++3 ** ++temp ** 2; ++3 ** --temp ** 2; 3 ** ++temp + 2; 3 ** ++temp - 2; diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts index fd391d198b1..c1862f1bbe9 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts @@ -9,106 +9,6 @@ enum E { var a: any; var b: number; -// operator * -var ra1 = undefined * a; -var ra2 = undefined * b; -var ra3 = undefined * 1; -var ra4 = undefined * E.a; -var ra5 = a * undefined; -var ra6 = b * undefined; -var ra7 = 0 * undefined; -var ra8 = E.b * undefined; - -// operator / -var rb1 = undefined / a; -var rb2 = undefined / b; -var rb3 = undefined / 1; -var rb4 = undefined / E.a; -var rb5 = a / undefined; -var rb6 = b / undefined; -var rb7 = 0 / undefined; -var rb8 = E.b / undefined; - -// operator % -var rc1 = undefined % a; -var rc2 = undefined % b; -var rc3 = undefined % 1; -var rc4 = undefined % E.a; -var rc5 = a % undefined; -var rc6 = b % undefined; -var rc7 = 0 % undefined; -var rc8 = E.b % undefined; - -// operator - -var rd1 = undefined - a; -var rd2 = undefined - b; -var rd3 = undefined - 1; -var rd4 = undefined - E.a; -var rd5 = a - undefined; -var rd6 = b - undefined; -var rd7 = 0 - undefined; -var rd8 = E.b - undefined; - -// operator << -var re1 = undefined << a; -var re2 = undefined << b; -var re3 = undefined << 1; -var re4 = undefined << E.a; -var re5 = a << undefined; -var re6 = b << undefined; -var re7 = 0 << undefined; -var re8 = E.b << undefined; - -// operator >> -var rf1 = undefined >> a; -var rf2 = undefined >> b; -var rf3 = undefined >> 1; -var rf4 = undefined >> E.a; -var rf5 = a >> undefined; -var rf6 = b >> undefined; -var rf7 = 0 >> undefined; -var rf8 = E.b >> undefined; - -// operator >>> -var rg1 = undefined >>> a; -var rg2 = undefined >>> b; -var rg3 = undefined >>> 1; -var rg4 = undefined >>> E.a; -var rg5 = a >>> undefined; -var rg6 = b >>> undefined; -var rg7 = 0 >>> undefined; -var rg8 = E.b >>> undefined; - -// operator & -var rh1 = undefined & a; -var rh2 = undefined & b; -var rh3 = undefined & 1; -var rh4 = undefined & E.a; -var rh5 = a & undefined; -var rh6 = b & undefined; -var rh7 = 0 & undefined; -var rh8 = E.b & undefined; - -// operator ^ -var ri1 = undefined ^ a; -var ri2 = undefined ^ b; -var ri3 = undefined ^ 1; -var ri4 = undefined ^ E.a; -var ri5 = a ^ undefined; -var ri6 = b ^ undefined; -var ri7 = 0 ^ undefined; -var ri8 = E.b ^ undefined; - -// operator | -var rj1 = undefined | a; -var rj2 = undefined | b; -var rj3 = undefined | 1; -var rj4 = undefined | E.a; -var rj5 = a | undefined; -var rj6 = b | undefined; -var rj7 = 0 | undefined; -var rj8 = E.b | undefined; - // operator * var rk1 = undefined ** a; var rk2 = undefined ** b; From d57ceb1d32380de7dba6a54350e7a6a750ebf675 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 21 Sep 2015 16:10:03 -0700 Subject: [PATCH 008/121] extend the list of extensions for module file names in node_modules folder --- src/compiler/core.ts | 8 ++++- src/compiler/program.ts | 27 +++++++--------- tests/cases/unittests/moduleResolution.ts | 39 ++++++++++++++++------- 3 files changed, 45 insertions(+), 29 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index a1f6565ed1f..cdec2a4fa34 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -722,7 +722,13 @@ namespace ts { * List of supported extensions in order of file resolution precedence. */ export const supportedExtensions = [".ts", ".tsx", ".d.ts"]; - + /** + * List of extensions that will be used to look for external modules. + * This list is kept separate from supportedExtensions to for cases when we'll allow to include .js files in compilation, + * but still would like to load only TypeScript files as modules + */ + export const moduleFileExtensions = supportedExtensions; + const extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"]; export function removeFileExtension(path: string): string { for (let ext of extensionsToRemove) { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 3da3c354fb2..946bf9e75bb 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -53,13 +53,13 @@ namespace ts { if (getRootLength(moduleName) !== 0 || nameStartsWithDotSlashOrDotDotSlash(moduleName)) { let failedLookupLocations: string[] = []; let candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - let resolvedFileName = loadNodeModuleFromFile(candidate, /* loadOnlyDts */ false, failedLookupLocations, host); + let resolvedFileName = loadNodeModuleFromFile(candidate, failedLookupLocations, host); if (resolvedFileName) { return { resolvedModule: { resolvedFileName }, failedLookupLocations }; } - resolvedFileName = loadNodeModuleFromDirectory(candidate, /* loadOnlyDts */ false, failedLookupLocations, host); + resolvedFileName = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); return resolvedFileName ? { resolvedModule: { resolvedFileName }, failedLookupLocations } : { resolvedModule: undefined, failedLookupLocations }; @@ -69,13 +69,8 @@ namespace ts { } } - function loadNodeModuleFromFile(candidate: string, loadOnlyDts: boolean, failedLookupLocation: string[], host: ModuleResolutionHost): string { - if (loadOnlyDts) { - return tryLoad(".d.ts"); - } - else { - return forEach(supportedExtensions, tryLoad); - } + function loadNodeModuleFromFile(candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost): string { + return forEach(moduleFileExtensions, tryLoad); function tryLoad(ext: string): string { let fileName = fileExtensionIs(candidate, ext) ? candidate : candidate + ext; @@ -89,7 +84,7 @@ namespace ts { } } - function loadNodeModuleFromDirectory(candidate: string, loadOnlyDts: boolean, failedLookupLocation: string[], host: ModuleResolutionHost): string { + function loadNodeModuleFromDirectory(candidate: string, failedLookupLocation: string[], host: ModuleResolutionHost): string { let packageJsonPath = combinePaths(candidate, "package.json"); if (host.fileExists(packageJsonPath)) { @@ -105,7 +100,7 @@ namespace ts { } if (jsonContent.typings) { - let result = loadNodeModuleFromFile(normalizePath(combinePaths(candidate, jsonContent.typings)), loadOnlyDts, failedLookupLocation, host); + let result = loadNodeModuleFromFile(normalizePath(combinePaths(candidate, jsonContent.typings)), failedLookupLocation, host); if (result) { return result; } @@ -116,7 +111,7 @@ namespace ts { failedLookupLocation.push(packageJsonPath); } - return loadNodeModuleFromFile(combinePaths(candidate, "index"), loadOnlyDts, failedLookupLocation, host); + return loadNodeModuleFromFile(combinePaths(candidate, "index"), failedLookupLocation, host); } function loadModuleFromNodeModules(moduleName: string, directory: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { @@ -127,12 +122,12 @@ namespace ts { if (baseName !== "node_modules") { let nodeModulesFolder = combinePaths(directory, "node_modules"); let candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); - let result = loadNodeModuleFromFile(candidate, /* loadOnlyDts */ true, failedLookupLocations, host); + let result = loadNodeModuleFromFile(candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } - result = loadNodeModuleFromDirectory(candidate, /* loadOnlyDts */ true, failedLookupLocations, host); + result = loadNodeModuleFromDirectory(candidate, failedLookupLocations, host); if (result) { return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations }; } @@ -862,8 +857,8 @@ namespace ts { const importedFile = findModuleSourceFile(resolution.resolvedFileName, file.imports[i]); if (importedFile && resolution.isExternalLibraryImport) { if (!isExternalModule(importedFile)) { - let start = getTokenPosOfNode(file.imports[i], file) - fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName)); + let start = getTokenPosOfNode(file.imports[i], file) + fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName)); } else if (!fileExtensionIs(importedFile.fileName, ".d.ts")) { let start = getTokenPosOfNode(file.imports[i], file) diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts index ed9f0b0a986..3055754de58 100644 --- a/tests/cases/unittests/moduleResolution.ts +++ b/tests/cases/unittests/moduleResolution.ts @@ -114,23 +114,22 @@ module ts { let containingFile = { name: "/a/b/c/d/e.ts" }; let moduleFile = { name: "/a/b/node_modules/foo.ts" }; let resolution = nodeModuleNameResolver("foo", containingFile.name, createModuleResolutionHost(containingFile, moduleFile)); - assert.equal(resolution.resolvedModule, undefined); + assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.deepEqual(resolution.failedLookupLocations, [ + "/a/b/c/d/node_modules/foo.ts", + "/a/b/c/d/node_modules/foo.tsx", "/a/b/c/d/node_modules/foo.d.ts", "/a/b/c/d/node_modules/foo/package.json", + "/a/b/c/d/node_modules/foo/index.ts", + "/a/b/c/d/node_modules/foo/index.tsx", "/a/b/c/d/node_modules/foo/index.d.ts", + "/a/b/c/node_modules/foo.ts", + "/a/b/c/node_modules/foo.tsx", "/a/b/c/node_modules/foo.d.ts", "/a/b/c/node_modules/foo/package.json", - "/a/b/c/node_modules/foo/index.d.ts", - "/a/b/node_modules/foo.d.ts", - "/a/b/node_modules/foo/package.json", - "/a/b/node_modules/foo/index.d.ts", - "/a/node_modules/foo.d.ts", - "/a/node_modules/foo/package.json", - "/a/node_modules/foo/index.d.ts", - "/node_modules/foo.d.ts", - "/node_modules/foo/package.json", - "/node_modules/foo/index.d.ts" + "/a/b/c/node_modules/foo/index.ts", + "/a/b/c/node_modules/foo/index.tsx", + "/a/b/c/node_modules/foo/index.d.ts" ]) }); @@ -149,17 +148,33 @@ module ts { assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); assert.deepEqual(resolution.failedLookupLocations, [ + "/a/node_modules/b/c/node_modules/d/node_modules/foo.ts", + "/a/node_modules/b/c/node_modules/d/node_modules/foo.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo.d.ts", "/a/node_modules/b/c/node_modules/d/node_modules/foo/package.json", + "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.ts", + "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.d.ts", + "/a/node_modules/b/c/node_modules/foo.ts", + "/a/node_modules/b/c/node_modules/foo.tsx", "/a/node_modules/b/c/node_modules/foo.d.ts", "/a/node_modules/b/c/node_modules/foo/package.json", + "/a/node_modules/b/c/node_modules/foo/index.ts", + "/a/node_modules/b/c/node_modules/foo/index.tsx", "/a/node_modules/b/c/node_modules/foo/index.d.ts", + "/a/node_modules/b/node_modules/foo.ts", + "/a/node_modules/b/node_modules/foo.tsx", "/a/node_modules/b/node_modules/foo.d.ts", "/a/node_modules/b/node_modules/foo/package.json", + "/a/node_modules/b/node_modules/foo/index.ts", + "/a/node_modules/b/node_modules/foo/index.tsx", "/a/node_modules/b/node_modules/foo/index.d.ts", + "/a/node_modules/foo.ts", + "/a/node_modules/foo.tsx", "/a/node_modules/foo.d.ts", - "/a/node_modules/foo/package.json" + "/a/node_modules/foo/package.json", + "/a/node_modules/foo/index.ts", + "/a/node_modules/foo/index.tsx" ]); }); }); From 4fc74b2d8af9945f0cd058798c0b8e9888c54c75 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 21 Sep 2015 16:16:28 -0700 Subject: [PATCH 009/121] Add and update tests for exponentiation --- ...entiationAssignmentLHSCannotBeAssigned.ts} | 8 +- .../emitCompoundExponentiationOperator2.ts | 25 ++++ .../emitExponentiationOperator3.ts | 113 ++++++++++++++++++ ...ExponentiationOperatorInTemplateString1.ts | 34 ++++-- 4 files changed, 168 insertions(+), 12 deletions(-) rename tests/cases/conformance/es7/exponentiationOperator/{compoundExponentiationAssignmentLHSCanBeAssigned2.ts => compoundExponentiationAssignmentLHSCannotBeAssigned.ts} (93%) create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts diff --git a/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned2.ts b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts similarity index 93% rename from tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned2.ts rename to tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts index 7995cc8d668..93623f667b8 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned2.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts @@ -54,7 +54,7 @@ x5 **= '' x5 **= {}; var x6: E; -x6 *= b; -x6 *= true; -x6 *= '' -x6 *= {}; \ No newline at end of file +x6 **= b; +x6 **= true; +x6 **= '' +x6 **= {}; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2.ts new file mode 100644 index 00000000000..216997be8cc --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2.ts @@ -0,0 +1,25 @@ +// @target:es5 + +var comp: number; + +comp **= 1; +comp **= comp **= 1; +comp **= comp **= 1 + 2; +comp **= comp **= 1 - 2; +comp **= comp **= 1 * 2; +comp **= comp **= 1 / 2; + +comp **= comp **= (1 + 2); +comp **= comp **= (1 - 2); +comp **= comp **= (1 * 2); +comp **= comp **= (1 / 2); + +comp **= comp **= 1 + 2 ** 3; +comp **= comp **= 1 - 2 ** 4; +comp **= comp **= 1 * 2 ** 5; +comp **= comp **= 1 / 2 ** 6; + +comp **= comp **= (1 + 2) ** 3; +comp **= comp **= (1 - 2) ** 4; +comp **= comp **= (1 * 2) ** 5; +comp **= comp **= (1 / 2) ** 6; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts new file mode 100644 index 00000000000..b3b5deaf83d --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts @@ -0,0 +1,113 @@ +var temp: any; + +delete --temp ** 3; +delete ++temp ** 3; +delete temp-- ** 3; +delete temp++ ** 3; +delete -++temp ** 3; +delete -temp++ ** 3; +delete -temp-- ** 3; + +delete --temp ** 3 ** 1; +delete ++temp ** 3 ** 1; +delete temp-- ** 3 ** 1; +delete temp++ ** 3 ** 1; +delete -++temp ** 3 ** 1; +delete -temp++ ** 3 ** 1; +delete -temp-- ** 3 ** 1;; + +--temp ** 3; +++temp ** 3; +temp-- ** 3; +temp++ ** 3; +-++temp ** 3; +-temp++ ** 3; +-temp-- ** 3; + +--temp ** 3 ** 1; +++temp ** 3 ** 1; +temp-- ** 3 ** 1; +temp++ ** 3 ** 1; +-++temp ** 3 ** 1; +-temp++ ** 3 ** 1; +-temp-- ** 3 ** 1; + +typeof --temp ** 3; +typeof temp-- ** 3; +typeof 3 ** 4; +typeof temp++ ** 4; +typeof temp-- ** 4; +typeof -3 ** 4; +typeof -++temp ** 4; +typeof -temp++ ** 4; +typeof -temp-- ** 4; + +typeof --temp ** 3 ** 1; +typeof temp-- ** 3 ** 1; +typeof 3 ** 4 ** 1; +typeof temp++ ** 4 ** 1; +typeof temp-- ** 4 ** 1; +typeof -3 ** 4 ** 1; +typeof -++temp ** 4 ** 1; +typeof -temp++ ** 4 ** 1; +typeof -temp-- ** 4 ** 1; + +void --temp ** 3; +void temp-- ** 3; +void 3 ** 4; +void temp++ ** 4; +void temp-- ** 4; +void -3 ** 4; +void -++temp ** 4; +void -temp++ ** 4; +void -temp-- ** 4; + +void --temp ** 3 ** 1; +void temp-- ** 3 ** 1; +void 3 ** 4 ** 1; +void temp++ ** 4 ** 1; +void temp-- ** 4 ** 1; +void -3 ** 4 ** 1; +void -++temp ** 4 ** 1; +void -temp++ ** 4 ** 1; +void -temp-- ** 4 ** 1; + +~ --temp ** 3; +~ temp-- ** 3; +~ 3 ** 4; +~ temp++ ** 4; +~ temp-- ** 4; +~ -3 ** 4; +~ -++temp ** 4; +~ -temp++ ** 4; +~ -temp-- ** 4; + +~ --temp ** 3 ** 1; +~ temp-- ** 3 ** 1; +~ 3 ** 4 ** 1; +~ temp++ ** 4 ** 1; +~ temp-- ** 4 ** 1; +~ -3 ** 4 ** 1; +~ -++temp ** 4 ** 1; +~ -temp++ ** 4 ** 1; +~ -temp-- ** 4 ** 1; + +! --temp ** 3; +! temp-- ** 3; +! 3 ** 4; +! temp++ ** 4; +! temp-- ** 4; +! -3 ** 4; +! -++temp ** 4; +! -temp++ ** 4; +! -temp-- ** 4; + +! --temp ** 3 ** 1; +! temp-- ** 3 ** 1; +! 3 ** 4 ** 1; +! temp++ ** 4 ** 1; +! temp-- ** 4 ** 1; +! -3 ** 4 ** 1; +! -++temp ** 4 ** 1; +! -temp++ ** 4 ** 1; +! -temp-- ** 4 ** 1; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts index 2b2f942c525..f79b22fedd7 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts @@ -1,10 +1,28 @@ var t1 = 10; var t2 = 10; -console.log(`${t1 ** t2}`) -console.log(`${t1 ** t2 ** t1}`) -console.log(`${t1 + t2 ** t1}`) -console.log(`${t1 - t2 ** t1}`) -console.log(`${t1 ** t2 + t1}`) -console.log(`${t1 ** t2 - t1}`) -console.log(`${t1 + t2 ** t2 + t1}`) -console.log(`${t1 - t2 ** t2 - t1}`) \ No newline at end of file +var s; +`Exp: ${t1 ** t2} abc`; +`Exp: ${t1 ** t2 ** t1} abc`; +`Exp: ${t1 + t2 ** t1} abc`; +`Exp: ${t1 - t2 ** t1} abc`; +`Exp: ${t1 ** t2 + t1} abc`; +`Exp: ${t1 ** t2 - t1} abc`; +`Exp: ${t1 + t2 ** t2 + t1} abc`; +`Exp: ${t1 - t2 ** t2 - t1} abc`; +`Exp: ${-t1 ** t2 - t1} abc`; +`Exp: ${+t1 ** t2 - t1} abc`; +`Exp: ${-++t1 ** t2 - t1} abc`; +`Exp: ${+--t1 ** t2 - t1} abc`; +`Exp: ${-t1++ ** t2 - t1} abc`; +`Exp: ${-t1-- ** t2 - t1} abc`; +`Exp: ${+t1++ ** t2 - t1} abc`; +`Exp: ${+t1-- ** t2 - t1} abc`; +`Exp: ${typeof t1 ** t2 ** t1} abc`; +`Exp: ${typeof t1 ** t2 + t1} abc`; +`Exp: ${typeof t1 ** (t2 - t1)} abc`; +`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; +`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; +`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; +`Exp: ${!t1 ** t2 ** t1} abc`; +`Exp: ${!t1 ** t2 ** ++t1} abc`; +`Exp: ${!t1 ** t2 ** --t1} abc`; From 4037255c27204273719e7e68641b2978f561368a Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 21 Sep 2015 16:16:47 -0700 Subject: [PATCH 010/121] Update baselines to include new tests --- ...ponentiationAssignmentLHSCanBeAssigned1.js | 56 ++ ...tiationAssignmentLHSCanBeAssigned1.symbols | 84 ++ ...entiationAssignmentLHSCanBeAssigned1.types | 102 +++ ...onAssignmentLHSCannotBeAssigned.errors.txt | 267 ++++++ ...nentiationAssignmentLHSCannotBeAssigned.js | 120 +++ ...dExponentiationAssignmentLHSIsReference.js | 47 + ...nentiationAssignmentLHSIsReference.symbols | 62 ++ ...ponentiationAssignmentLHSIsReference.types | 76 ++ ...onentiationAssignmentLHSIsValue.errors.txt | 199 +++++ ...poundExponentiationAssignmentLHSIsValue.js | 174 ++++ .../emitCompoundExponentiationOperator1.js | 43 + ...mitCompoundExponentiationOperator1.symbols | 83 ++ .../emitCompoundExponentiationOperator1.types | 171 ++++ .../emitCompoundExponentiationOperator2.js | 47 + ...mitCompoundExponentiationOperator2.symbols | 76 ++ .../emitCompoundExponentiationOperator2.types | 185 ++++ .../reference/emitExponentiationOperator1.js | 60 ++ .../emitExponentiationOperator1.symbols | 33 + .../emitExponentiationOperator1.types | 201 +++++ .../reference/emitExponentiationOperator2.js | 141 +++ .../emitExponentiationOperator2.symbols | 204 +++++ .../emitExponentiationOperator2.types | 486 ++++++++++ .../reference/emitExponentiationOperator3.js | 218 +++++ .../emitExponentiationOperator3.symbols | 272 ++++++ .../emitExponentiationOperator3.types | 832 ++++++++++++++++++ ...ExponentiationOperatorInTemplateString1.js | 60 ++ ...entiationOperatorInTemplateString1.symbols | 136 +++ ...onentiationOperatorInTemplateString1.types | 248 ++++++ .../exponentiationOperatorWithAnyAndNumber.js | 26 + ...nentiationOperatorWithAnyAndNumber.symbols | 42 + ...ponentiationOperatorWithAnyAndNumber.types | 56 ++ .../exponentiationOperatorWithEnum.js | 49 ++ .../exponentiationOperatorWithEnum.symbols | 98 +++ .../exponentiationOperatorWithEnum.types | 112 +++ .../exponentiationOperatorWithEnumUnion.js | 58 ++ ...xponentiationOperatorWithEnumUnion.symbols | 108 +++ .../exponentiationOperatorWithEnumUnion.types | 122 +++ ...tionOperatorWithInvalidOperands.errors.txt | 239 +++++ ...ponentiationOperatorWithInvalidOperands.js | 135 +++ ...WithNullValueAndInvalidOperands.errors.txt | 98 +++ ...OperatorWithNullValueAndInvalidOperands.js | 44 + ...onOperatorWithNullValueAndValidOperands.js | 41 + ...ratorWithNullValueAndValidOperands.symbols | 55 ++ ...peratorWithNullValueAndValidOperands.types | 73 ++ ...thOnlyNullValueOrUndefinedValue.errors.txt | 33 + ...eratorWithOnlyNullValueOrUndefinedValue.js | 14 + ...iationOperatorWithTypeParameter.errors.txt | 77 ++ ...exponentiationOperatorWithTypeParameter.js | 42 + ...ndefinedValueAndInvalidOperands.errors.txt | 98 +++ ...torWithUndefinedValueAndInvalidOperands.js | 44 + ...ratorWithUndefinedValueAndValidOperands.js | 41 + ...WithUndefinedValueAndValidOperands.symbols | 63 ++ ...orWithUndefinedValueAndValidOperands.types | 73 ++ 53 files changed, 6524 insertions(+) create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.js create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.symbols create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.types create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.errors.txt create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.js create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.symbols create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.types create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt create mode 100644 tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator1.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator1.symbols create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator1.types create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator2.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator2.symbols create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator2.types create mode 100644 tests/baselines/reference/emitExponentiationOperator1.js create mode 100644 tests/baselines/reference/emitExponentiationOperator1.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperator1.types create mode 100644 tests/baselines/reference/emitExponentiationOperator2.js create mode 100644 tests/baselines/reference/emitExponentiationOperator2.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperator2.types create mode 100644 tests/baselines/reference/emitExponentiationOperator3.js create mode 100644 tests/baselines/reference/emitExponentiationOperator3.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperator3.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types create mode 100644 tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.symbols create mode 100644 tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.types create mode 100644 tests/baselines/reference/exponentiationOperatorWithEnum.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithEnum.symbols create mode 100644 tests/baselines/reference/exponentiationOperatorWithEnum.types create mode 100644 tests/baselines/reference/exponentiationOperatorWithEnumUnion.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithEnumUnion.symbols create mode 100644 tests/baselines/reference/exponentiationOperatorWithEnumUnion.types create mode 100644 tests/baselines/reference/exponentiationOperatorWithInvalidOperands.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorWithInvalidOperands.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.symbols create mode 100644 tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.types create mode 100644 tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithTypeParameter.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorWithTypeParameter.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.symbols create mode 100644 tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.types diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.js new file mode 100644 index 00000000000..4f02150cbe6 --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.js @@ -0,0 +1,56 @@ +//// [compoundExponentiationAssignmentLHSCanBeAssigned1.ts] +enum E { a, b, c } + +var a: any; +var b: number; +var c: E; + +var x1: any; +x1 **= a; +x1 **= b; +x1 **= c; +x1 **= null; +x1 **= undefined; + +var x2: number; +x2 **= a; +x2 **= b; +x2 **= c; +x2 **= null; +x2 **= undefined; + +var x3: E; +x3 **= a; +x3 **= b; +x3 **= c; +x3 **= null; +x3 **= undefined; + +//// [compoundExponentiationAssignmentLHSCanBeAssigned1.js] +var E; +(function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; + E[E["c"] = 2] = "c"; +})(E || (E = {})); +var a; +var b; +var c; +var x1; +x1 = Math.pow(x1, a); +x1 = Math.pow(x1, b); +x1 = Math.pow(x1, c); +x1 = Math.pow(x1, null); +x1 = Math.pow(x1, undefined); +var x2; +x2 = Math.pow(x2, a); +x2 = Math.pow(x2, b); +x2 = Math.pow(x2, c); +x2 = Math.pow(x2, null); +x2 = Math.pow(x2, undefined); +var x3; +x3 = Math.pow(x3, a); +x3 = Math.pow(x3, b); +x3 = Math.pow(x3, c); +x3 = Math.pow(x3, null); +x3 = Math.pow(x3, undefined); diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.symbols b/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.symbols new file mode 100644 index 00000000000..982c658bc03 --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.symbols @@ -0,0 +1,84 @@ +=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts === +enum E { a, b, c } +>E : Symbol(E, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 0)) +>a : Symbol(E.a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 8)) +>b : Symbol(E.b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 11)) +>c : Symbol(E.c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 14)) + +var a: any; +>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 2, 3)) + +var b: number; +>b : Symbol(b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 3, 3)) + +var c: E; +>c : Symbol(c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 4, 3)) +>E : Symbol(E, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 0)) + +var x1: any; +>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3)) + +x1 **= a; +>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3)) +>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 2, 3)) + +x1 **= b; +>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3)) +>b : Symbol(b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 3, 3)) + +x1 **= c; +>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3)) +>c : Symbol(c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 4, 3)) + +x1 **= null; +>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3)) + +x1 **= undefined; +>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3)) +>undefined : Symbol(undefined) + +var x2: number; +>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3)) + +x2 **= a; +>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3)) +>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 2, 3)) + +x2 **= b; +>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3)) +>b : Symbol(b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 3, 3)) + +x2 **= c; +>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3)) +>c : Symbol(c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 4, 3)) + +x2 **= null; +>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3)) + +x2 **= undefined; +>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3)) +>undefined : Symbol(undefined) + +var x3: E; +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3)) +>E : Symbol(E, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 0)) + +x3 **= a; +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3)) +>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 2, 3)) + +x3 **= b; +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3)) +>b : Symbol(b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 3, 3)) + +x3 **= c; +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3)) +>c : Symbol(c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 4, 3)) + +x3 **= null; +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3)) + +x3 **= undefined; +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3)) +>undefined : Symbol(undefined) + diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.types b/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.types new file mode 100644 index 00000000000..060a231da1b --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSCanBeAssigned1.types @@ -0,0 +1,102 @@ +=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts === +enum E { a, b, c } +>E : E +>a : E +>b : E +>c : E + +var a: any; +>a : any + +var b: number; +>b : number + +var c: E; +>c : E +>E : E + +var x1: any; +>x1 : any + +x1 **= a; +>x1 **= a : number +>x1 : any +>a : any + +x1 **= b; +>x1 **= b : number +>x1 : any +>b : number + +x1 **= c; +>x1 **= c : number +>x1 : any +>c : E + +x1 **= null; +>x1 **= null : number +>x1 : any +>null : null + +x1 **= undefined; +>x1 **= undefined : number +>x1 : any +>undefined : undefined + +var x2: number; +>x2 : number + +x2 **= a; +>x2 **= a : number +>x2 : number +>a : any + +x2 **= b; +>x2 **= b : number +>x2 : number +>b : number + +x2 **= c; +>x2 **= c : number +>x2 : number +>c : E + +x2 **= null; +>x2 **= null : number +>x2 : number +>null : null + +x2 **= undefined; +>x2 **= undefined : number +>x2 : number +>undefined : undefined + +var x3: E; +>x3 : E +>E : E + +x3 **= a; +>x3 **= a : number +>x3 : E +>a : any + +x3 **= b; +>x3 **= b : number +>x3 : E +>b : number + +x3 **= c; +>x3 **= c : number +>x3 : E +>c : E + +x3 **= null; +>x3 **= null : number +>x3 : E +>null : null + +x3 **= undefined; +>x3 **= undefined : number +>x3 : E +>undefined : undefined + diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.errors.txt b/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.errors.txt new file mode 100644 index 00000000000..8d152712808 --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.errors.txt @@ -0,0 +1,267 @@ +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(8,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(9,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(9,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(10,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(11,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(12,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(13,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(13,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(14,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(14,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(15,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(15,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(19,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(19,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(20,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(20,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(21,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(22,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(22,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(23,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(24,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(24,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(25,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(25,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(26,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(26,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(29,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(30,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(30,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(31,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(31,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(32,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(33,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(33,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(34,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(35,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(35,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(36,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(36,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(37,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(37,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(40,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(41,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(41,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(42,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(42,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(43,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(44,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(44,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(45,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(46,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(46,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(47,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(47,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(48,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(48,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(51,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(52,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(53,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(54,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(57,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(58,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(59,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(60,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts (68 errors) ==== + enum E { a, b } + + var a: any; + var b: void; + + var x1: boolean; + x1 **= a; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x1 **= b; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x1 **= true; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x1 **= 0; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x1 **= '' + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x1 **= E.a; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x1 **= {}; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x1 **= null; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x1 **= undefined; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var x2: string; + x2 **= a; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x2 **= b; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x2 **= true; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x2 **= 0; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x2 **= '' + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x2 **= E.a; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x2 **= {}; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x2 **= null; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x2 **= undefined; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var x3: {}; + x3 **= a; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x3 **= b; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x3 **= true; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x3 **= 0; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x3 **= '' + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x3 **= E.a; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x3 **= {}; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x3 **= null; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x3 **= undefined; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var x4: void; + x4 **= a; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x4 **= b; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x4 **= true; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x4 **= 0; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x4 **= '' + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x4 **= E.a; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x4 **= {}; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x4 **= null; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x4 **= undefined; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var x5: number; + x5 **= b; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x5 **= true; + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x5 **= '' + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x5 **= {}; + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var x6: E; + x6 **= b; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x6 **= true; + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x6 **= '' + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + x6 **= {}; + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.js new file mode 100644 index 00000000000..b04e60d373b --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSCannotBeAssigned.js @@ -0,0 +1,120 @@ +//// [compoundExponentiationAssignmentLHSCannotBeAssigned.ts] +enum E { a, b } + +var a: any; +var b: void; + +var x1: boolean; +x1 **= a; +x1 **= b; +x1 **= true; +x1 **= 0; +x1 **= '' +x1 **= E.a; +x1 **= {}; +x1 **= null; +x1 **= undefined; + +var x2: string; +x2 **= a; +x2 **= b; +x2 **= true; +x2 **= 0; +x2 **= '' +x2 **= E.a; +x2 **= {}; +x2 **= null; +x2 **= undefined; + +var x3: {}; +x3 **= a; +x3 **= b; +x3 **= true; +x3 **= 0; +x3 **= '' +x3 **= E.a; +x3 **= {}; +x3 **= null; +x3 **= undefined; + +var x4: void; +x4 **= a; +x4 **= b; +x4 **= true; +x4 **= 0; +x4 **= '' +x4 **= E.a; +x4 **= {}; +x4 **= null; +x4 **= undefined; + +var x5: number; +x5 **= b; +x5 **= true; +x5 **= '' +x5 **= {}; + +var x6: E; +x6 **= b; +x6 **= true; +x6 **= '' +x6 **= {}; + +//// [compoundExponentiationAssignmentLHSCannotBeAssigned.js] +var E; +(function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; +})(E || (E = {})); +var a; +var b; +var x1; +x1 = Math.pow(x1, a); +x1 = Math.pow(x1, b); +x1 = Math.pow(x1, true); +x1 = Math.pow(x1, 0); +x1 = Math.pow(x1, ''); +x1 = Math.pow(x1, E.a); +x1 = Math.pow(x1, {}); +x1 = Math.pow(x1, null); +x1 = Math.pow(x1, undefined); +var x2; +x2 = Math.pow(x2, a); +x2 = Math.pow(x2, b); +x2 = Math.pow(x2, true); +x2 = Math.pow(x2, 0); +x2 = Math.pow(x2, ''); +x2 = Math.pow(x2, E.a); +x2 = Math.pow(x2, {}); +x2 = Math.pow(x2, null); +x2 = Math.pow(x2, undefined); +var x3; +x3 = Math.pow(x3, a); +x3 = Math.pow(x3, b); +x3 = Math.pow(x3, true); +x3 = Math.pow(x3, 0); +x3 = Math.pow(x3, ''); +x3 = Math.pow(x3, E.a); +x3 = Math.pow(x3, {}); +x3 = Math.pow(x3, null); +x3 = Math.pow(x3, undefined); +var x4; +x4 = Math.pow(x4, a); +x4 = Math.pow(x4, b); +x4 = Math.pow(x4, true); +x4 = Math.pow(x4, 0); +x4 = Math.pow(x4, ''); +x4 = Math.pow(x4, E.a); +x4 = Math.pow(x4, {}); +x4 = Math.pow(x4, null); +x4 = Math.pow(x4, undefined); +var x5; +x5 = Math.pow(x5, b); +x5 = Math.pow(x5, true); +x5 = Math.pow(x5, ''); +x5 = Math.pow(x5, {}); +var x6; +x6 = Math.pow(x6, b); +x6 = Math.pow(x6, true); +x6 = Math.pow(x6, ''); +x6 = Math.pow(x6, {}); diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js new file mode 100644 index 00000000000..1d43494f367 --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js @@ -0,0 +1,47 @@ +//// [compoundExponentiationAssignmentLHSIsReference.ts] +var value; + +// identifiers: variable and parameter +var x1: number; +x1 **= value; + +function fn1(x2: number) { + x2 **= value; +} + +// property accesses +var x3: { a: number }; +x3.a **= value; + +x3['a'] **= value; + +// parentheses, the contained expression is reference +(x1) **= value; + +function fn2(x4: number) { + (x4) **= value; +} + +(x3.a) **= value; + +(x3['a']) **= value; + +//// [compoundExponentiationAssignmentLHSIsReference.js] +var value; +// identifiers: variable and parameter +var x1; +x1 = Math.pow(x1, value); +function fn1(x2) { + x2 = Math.pow(x2, value); +} +// property accesses +var x3; +x3.a = Math.pow(x3.a, value); +x3['a'] = Math.pow(x3['a'], value); +// parentheses, the contained expression is reference +(x1) = Math.pow((x1), value); +function fn2(x4) { + (x4) = Math.pow((x4), value); +} +(x3.a) = Math.pow((x3.a), value); +(x3['a']) = Math.pow((x3['a']), value); diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.symbols b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.symbols new file mode 100644 index 00000000000..775d43b0c58 --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.symbols @@ -0,0 +1,62 @@ +=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts === +var value; +>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3)) + +// identifiers: variable and parameter +var x1: number; +>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 3, 3)) + +x1 **= value; +>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 3, 3)) +>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3)) + +function fn1(x2: number) { +>fn1 : Symbol(fn1, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 4, 13)) +>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 6, 13)) + + x2 **= value; +>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 6, 13)) +>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3)) +} + +// property accesses +var x3: { a: number }; +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3)) +>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9)) + +x3.a **= value; +>x3.a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9)) +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3)) +>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9)) +>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3)) + +x3['a'] **= value; +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3)) +>'a' : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9)) +>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3)) + +// parentheses, the contained expression is reference +(x1) **= value; +>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 3, 3)) +>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3)) + +function fn2(x4: number) { +>fn2 : Symbol(fn2, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 17, 15)) +>x4 : Symbol(x4, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 19, 13)) + + (x4) **= value; +>x4 : Symbol(x4, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 19, 13)) +>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3)) +} + +(x3.a) **= value; +>x3.a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9)) +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3)) +>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9)) +>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3)) + +(x3['a']) **= value; +>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3)) +>'a' : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9)) +>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3)) + diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.types b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.types new file mode 100644 index 00000000000..35f42f4fa77 --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.types @@ -0,0 +1,76 @@ +=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts === +var value; +>value : any + +// identifiers: variable and parameter +var x1: number; +>x1 : number + +x1 **= value; +>x1 **= value : number +>x1 : number +>value : any + +function fn1(x2: number) { +>fn1 : (x2: number) => void +>x2 : number + + x2 **= value; +>x2 **= value : number +>x2 : number +>value : any +} + +// property accesses +var x3: { a: number }; +>x3 : { a: number; } +>a : number + +x3.a **= value; +>x3.a **= value : number +>x3.a : number +>x3 : { a: number; } +>a : number +>value : any + +x3['a'] **= value; +>x3['a'] **= value : number +>x3['a'] : number +>x3 : { a: number; } +>'a' : string +>value : any + +// parentheses, the contained expression is reference +(x1) **= value; +>(x1) **= value : number +>(x1) : number +>x1 : number +>value : any + +function fn2(x4: number) { +>fn2 : (x4: number) => void +>x4 : number + + (x4) **= value; +>(x4) **= value : number +>(x4) : number +>x4 : number +>value : any +} + +(x3.a) **= value; +>(x3.a) **= value : number +>(x3.a) : number +>x3.a : number +>x3 : { a: number; } +>a : number +>value : any + +(x3['a']) **= value; +>(x3['a']) **= value : number +>(x3['a']) : number +>x3['a'] : number +>x3 : { a: number; } +>'a' : string +>value : any + diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt new file mode 100644 index 00000000000..bee6f75ff5c --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.errors.txt @@ -0,0 +1,199 @@ +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(7,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(10,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(13,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(18,5): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(21,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(25,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(27,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(30,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(32,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(35,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(36,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(37,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(38,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(39,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(40,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(43,10): error TS1128: Declaration or statement expected. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(46,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(52,15): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(56,15): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(60,15): error TS1034: 'super' must be followed by an argument list or member access. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(65,21): error TS1128: Declaration or statement expected. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(66,11): error TS1005: ';' expected. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(69,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(72,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(73,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(74,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(75,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(76,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(77,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(78,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(79,1): error TS2364: Invalid left-hand side of assignment expression. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(80,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(81,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(82,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(83,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(84,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(85,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts (37 errors) ==== + // expected error for all the LHS of compound assignments (arithmetic and addition) + var value; + + // this + class C { + constructor() { + this **= value; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + } + foo() { + this **= value; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + } + static sfoo() { + this **= value; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + } + } + + function foo() { + this **= value; + ~~~~ +!!! error TS2364: Invalid left-hand side of assignment expression. + } + + this **= value; + ~~~~ +!!! error TS2364: Invalid left-hand side of assignment expression. + + // identifiers: module, class, enum, function + module M { export var a; } + M **= value; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + C **= value; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + enum E { } + E **= value; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + foo **= value; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + // literals + null **= value; + ~~~~ +!!! error TS2364: Invalid left-hand side of assignment expression. + true **= value; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + false **= value; + ~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 0 **= value; + ~ +!!! error TS2364: Invalid left-hand side of assignment expression. + '' **= value; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + /d+/ **= value; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + // object literals + { a: 0 } **= value; + ~~~ +!!! error TS1128: Declaration or statement expected. + + // array literals + ['', ''] **= value; + ~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + // super + class Derived extends C { + constructor() { + super(); + super **= value; + ~~~ +!!! error TS1034: 'super' must be followed by an argument list or member access. + } + + foo() { + super **= value; + ~~~ +!!! error TS1034: 'super' must be followed by an argument list or member access. + } + + static sfoo() { + super **= value; + ~~~ +!!! error TS1034: 'super' must be followed by an argument list or member access. + } + } + + // function expression + function bar1() { } **= value; + ~~~ +!!! error TS1128: Declaration or statement expected. + () => { } **= value; + ~~~ +!!! error TS1005: ';' expected. + + // function calls + foo() **= value; + ~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + // parentheses, the containted expression is value + (this) **= value; + ~~~~~~ +!!! error TS2364: Invalid left-hand side of assignment expression. + (M) **= value; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (C) **= value; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (E) **= value; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (foo) **= value; + ~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (null) **= value; + ~~~~~~ +!!! error TS2364: Invalid left-hand side of assignment expression. + (true) **= value; + ~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (0) **= value; + ~~~ +!!! error TS2364: Invalid left-hand side of assignment expression. + ('') **= value; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (/d+/) **= value; + ~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ({}) **= value; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ([]) **= value; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (function baz1() { }) **= value; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (foo()) **= value; + ~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js new file mode 100644 index 00000000000..d638984ec37 --- /dev/null +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -0,0 +1,174 @@ +//// [compoundExponentiationAssignmentLHSIsValue.ts] +// expected error for all the LHS of compound assignments (arithmetic and addition) +var value; + +// this +class C { + constructor() { + this **= value; + } + foo() { + this **= value; + } + static sfoo() { + this **= value; + } +} + +function foo() { + this **= value; +} + +this **= value; + +// identifiers: module, class, enum, function +module M { export var a; } +M **= value; + +C **= value; + +enum E { } +E **= value; + +foo **= value; + +// literals +null **= value; +true **= value; +false **= value; +0 **= value; +'' **= value; +/d+/ **= value; + +// object literals +{ a: 0 } **= value; + +// array literals +['', ''] **= value; + +// super +class Derived extends C { + constructor() { + super(); + super **= value; + } + + foo() { + super **= value; + } + + static sfoo() { + super **= value; + } +} + +// function expression +function bar1() { } **= value; +() => { } **= value; + +// function calls +foo() **= value; + +// parentheses, the containted expression is value +(this) **= value; +(M) **= value; +(C) **= value; +(E) **= value; +(foo) **= value; +(null) **= value; +(true) **= value; +(0) **= value; +('') **= value; +(/d+/) **= value; +({}) **= value; +([]) **= value; +(function baz1() { }) **= value; +(foo()) **= value; + +//// [compoundExponentiationAssignmentLHSIsValue.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +// expected error for all the LHS of compound assignments (arithmetic and addition) +var value; +// this +var C = (function () { + function C() { + this = Math.pow(this, value); + } + C.prototype.foo = function () { + this = Math.pow(this, value); + }; + C.sfoo = function () { + this = Math.pow(this, value); + }; + return C; +})(); +function foo() { + this = Math.pow(this, value); +} +this = Math.pow(this, value); +// identifiers: module, class, enum, function +var M; +(function (M) { +})(M || (M = {})); +M = Math.pow(M, value); +C = Math.pow(C, value); +var E; +(function (E) { +})(E || (E = {})); +E = Math.pow(E, value); +foo = Math.pow(foo, value); +// literals +null = Math.pow(null, value); +true = Math.pow(true, value); +false = Math.pow(false, value); +0 = Math.pow(0, value); +'' = Math.pow('', value); +/d+/ = Math.pow(/d+/, value); +// object literals +{ + a: 0; +} +value; +// array literals +['', ''] = Math.pow(['', ''], value); +// super +var Derived = (function (_super) { + __extends(Derived, _super); + function Derived() { + _super.call(this); + _super.prototype. = Math.pow(_super.prototype., value); + } + Derived.prototype.foo = function () { + _super.prototype. = Math.pow(_super.prototype., value); + }; + Derived.sfoo = function () { + _super. = Math.pow(_super., value); + }; + return Derived; +})(C); +// function expression +function bar1() { } +value; +(function () { }); +value; +// function calls +foo() = Math.pow(foo(), value); +// parentheses, the containted expression is value +(this) = Math.pow((this), value); +(M) = Math.pow((M), value); +(C) = Math.pow((C), value); +(E) = Math.pow((E), value); +(foo) = Math.pow((foo), value); +(null) = Math.pow((null), value); +(true) = Math.pow((true), value); +(0) = Math.pow((0), value); +('') = Math.pow((''), value); +(/d+/) = Math.pow((/d+/), value); +({}) = Math.pow(({}), value); +([]) = Math.pow(([]), value); +(function baz1() { }) = Math.pow((function baz1() { }), value); +(foo()) = Math.pow((foo()), value); diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator1.js b/tests/baselines/reference/emitCompoundExponentiationOperator1.js new file mode 100644 index 00000000000..cf72ce1d39f --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator1.js @@ -0,0 +1,43 @@ +//// [emitCompoundExponentiationOperator1.ts] + +var comp: number; + +comp **= 1; +comp **= comp ** comp; +comp **= comp ** comp ** 2; +comp **= comp ** comp + 2; +comp **= comp ** comp - 2; +comp **= comp ** comp * 2; +comp **= comp ** comp / 2; +comp **= comp ** comp % 2; +comp **= (comp - 2) ** 5; +comp **= (comp + 2) ** 5; +comp **= (comp * 2) ** 5; +comp **= (comp / 2) ** 5; +comp **= (comp % 2) ** 5; +comp **= comp ** (5 + 2); +comp **= comp ** (5 - 2); +comp **= comp ** (5 * 2); +comp **= comp ** (5 / 2); +comp **= comp ** (5 % 2); + +//// [emitCompoundExponentiationOperator1.js] +var comp; +comp = Math.pow(comp, 1); +comp = Math.pow(comp, Math.pow(comp, comp)); +comp = Math.pow(comp, Math.pow(comp, Math.pow(comp, 2))); +comp = Math.pow(comp, Math.pow(comp, comp) + 2); +comp = Math.pow(comp, Math.pow(comp, comp) - 2); +comp = Math.pow(comp, Math.pow(comp, comp) * 2); +comp = Math.pow(comp, Math.pow(comp, comp) / 2); +comp = Math.pow(comp, Math.pow(comp, comp) % 2); +comp = Math.pow(comp, Math.pow((comp - 2), 5)); +comp = Math.pow(comp, Math.pow((comp + 2), 5)); +comp = Math.pow(comp, Math.pow((comp * 2), 5)); +comp = Math.pow(comp, Math.pow((comp / 2), 5)); +comp = Math.pow(comp, Math.pow((comp % 2), 5)); +comp = Math.pow(comp, Math.pow(comp, (5 + 2))); +comp = Math.pow(comp, Math.pow(comp, (5 - 2))); +comp = Math.pow(comp, Math.pow(comp, (5 * 2))); +comp = Math.pow(comp, Math.pow(comp, (5 / 2))); +comp = Math.pow(comp, Math.pow(comp, (5 % 2))); diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator1.symbols b/tests/baselines/reference/emitCompoundExponentiationOperator1.symbols new file mode 100644 index 00000000000..a6a57c6fb88 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator1.symbols @@ -0,0 +1,83 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts === + +var comp: number; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= 1; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** comp; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** comp ** 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** comp + 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** comp - 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** comp * 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** comp / 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** comp % 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= (comp - 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= (comp + 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= (comp * 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= (comp / 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= (comp % 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** (5 + 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** (5 - 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** (5 * 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** (5 / 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + +comp **= comp ** (5 % 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator1.types b/tests/baselines/reference/emitCompoundExponentiationOperator1.types new file mode 100644 index 00000000000..a1c986dbb78 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator1.types @@ -0,0 +1,171 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts === + +var comp: number; +>comp : number + +comp **= 1; +>comp **= 1 : number +>comp : number +>1 : number + +comp **= comp ** comp; +>comp **= comp ** comp : number +>comp : number +>comp ** comp : number +>comp : number +>comp : number + +comp **= comp ** comp ** 2; +>comp **= comp ** comp ** 2 : number +>comp : number +>comp ** comp ** 2 : number +>comp : number +>comp ** 2 : number +>comp : number +>2 : number + +comp **= comp ** comp + 2; +>comp **= comp ** comp + 2 : number +>comp : number +>comp ** comp + 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= comp ** comp - 2; +>comp **= comp ** comp - 2 : number +>comp : number +>comp ** comp - 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= comp ** comp * 2; +>comp **= comp ** comp * 2 : number +>comp : number +>comp ** comp * 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= comp ** comp / 2; +>comp **= comp ** comp / 2 : number +>comp : number +>comp ** comp / 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= comp ** comp % 2; +>comp **= comp ** comp % 2 : number +>comp : number +>comp ** comp % 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= (comp - 2) ** 5; +>comp **= (comp - 2) ** 5 : number +>comp : number +>(comp - 2) ** 5 : number +>(comp - 2) : number +>comp - 2 : number +>comp : number +>2 : number +>5 : number + +comp **= (comp + 2) ** 5; +>comp **= (comp + 2) ** 5 : number +>comp : number +>(comp + 2) ** 5 : number +>(comp + 2) : number +>comp + 2 : number +>comp : number +>2 : number +>5 : number + +comp **= (comp * 2) ** 5; +>comp **= (comp * 2) ** 5 : number +>comp : number +>(comp * 2) ** 5 : number +>(comp * 2) : number +>comp * 2 : number +>comp : number +>2 : number +>5 : number + +comp **= (comp / 2) ** 5; +>comp **= (comp / 2) ** 5 : number +>comp : number +>(comp / 2) ** 5 : number +>(comp / 2) : number +>comp / 2 : number +>comp : number +>2 : number +>5 : number + +comp **= (comp % 2) ** 5; +>comp **= (comp % 2) ** 5 : number +>comp : number +>(comp % 2) ** 5 : number +>(comp % 2) : number +>comp % 2 : number +>comp : number +>2 : number +>5 : number + +comp **= comp ** (5 + 2); +>comp **= comp ** (5 + 2) : number +>comp : number +>comp ** (5 + 2) : number +>comp : number +>(5 + 2) : number +>5 + 2 : number +>5 : number +>2 : number + +comp **= comp ** (5 - 2); +>comp **= comp ** (5 - 2) : number +>comp : number +>comp ** (5 - 2) : number +>comp : number +>(5 - 2) : number +>5 - 2 : number +>5 : number +>2 : number + +comp **= comp ** (5 * 2); +>comp **= comp ** (5 * 2) : number +>comp : number +>comp ** (5 * 2) : number +>comp : number +>(5 * 2) : number +>5 * 2 : number +>5 : number +>2 : number + +comp **= comp ** (5 / 2); +>comp **= comp ** (5 / 2) : number +>comp : number +>comp ** (5 / 2) : number +>comp : number +>(5 / 2) : number +>5 / 2 : number +>5 : number +>2 : number + +comp **= comp ** (5 % 2); +>comp **= comp ** (5 % 2) : number +>comp : number +>comp ** (5 % 2) : number +>comp : number +>(5 % 2) : number +>5 % 2 : number +>5 : number +>2 : number + diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator2.js b/tests/baselines/reference/emitCompoundExponentiationOperator2.js new file mode 100644 index 00000000000..91b988423ac --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator2.js @@ -0,0 +1,47 @@ +//// [emitCompoundExponentiationOperator2.ts] + +var comp: number; + +comp **= 1; +comp **= comp **= 1; +comp **= comp **= 1 + 2; +comp **= comp **= 1 - 2; +comp **= comp **= 1 * 2; +comp **= comp **= 1 / 2; + +comp **= comp **= (1 + 2); +comp **= comp **= (1 - 2); +comp **= comp **= (1 * 2); +comp **= comp **= (1 / 2); + +comp **= comp **= 1 + 2 ** 3; +comp **= comp **= 1 - 2 ** 4; +comp **= comp **= 1 * 2 ** 5; +comp **= comp **= 1 / 2 ** 6; + +comp **= comp **= (1 + 2) ** 3; +comp **= comp **= (1 - 2) ** 4; +comp **= comp **= (1 * 2) ** 5; +comp **= comp **= (1 / 2) ** 6; + + +//// [emitCompoundExponentiationOperator2.js] +var comp; +comp = Math.pow(comp, 1); +comp = Math.pow(comp, comp = Math.pow(comp, 1)); +comp = Math.pow(comp, comp = Math.pow(comp, 1 + 2)); +comp = Math.pow(comp, comp = Math.pow(comp, 1 - 2)); +comp = Math.pow(comp, comp = Math.pow(comp, 1 * 2)); +comp = Math.pow(comp, comp = Math.pow(comp, 1 / 2)); +comp = Math.pow(comp, comp = Math.pow(comp, (1 + 2))); +comp = Math.pow(comp, comp = Math.pow(comp, (1 - 2))); +comp = Math.pow(comp, comp = Math.pow(comp, (1 * 2))); +comp = Math.pow(comp, comp = Math.pow(comp, (1 / 2))); +comp = Math.pow(comp, comp = Math.pow(comp, 1 + Math.pow(2, 3))); +comp = Math.pow(comp, comp = Math.pow(comp, 1 - Math.pow(2, 4))); +comp = Math.pow(comp, comp = Math.pow(comp, 1 * Math.pow(2, 5))); +comp = Math.pow(comp, comp = Math.pow(comp, 1 / Math.pow(2, 6))); +comp = Math.pow(comp, comp = Math.pow(comp, Math.pow((1 + 2), 3))); +comp = Math.pow(comp, comp = Math.pow(comp, Math.pow((1 - 2), 4))); +comp = Math.pow(comp, comp = Math.pow(comp, Math.pow((1 * 2), 5))); +comp = Math.pow(comp, comp = Math.pow(comp, Math.pow((1 / 2), 6))); diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator2.symbols b/tests/baselines/reference/emitCompoundExponentiationOperator2.symbols new file mode 100644 index 00000000000..04a22b2782c --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator2.symbols @@ -0,0 +1,76 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2.ts === + +var comp: number; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= 1; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= 1; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= 1 + 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= 1 - 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= 1 * 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= 1 / 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= (1 + 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= (1 - 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= (1 * 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= (1 / 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= 1 + 2 ** 3; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= 1 - 2 ** 4; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= 1 * 2 ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= 1 / 2 ** 6; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= (1 + 2) ** 3; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= (1 - 2) ** 4; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= (1 * 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + +comp **= comp **= (1 / 2) ** 6; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator2.types b/tests/baselines/reference/emitCompoundExponentiationOperator2.types new file mode 100644 index 00000000000..03ca9b06626 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator2.types @@ -0,0 +1,185 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2.ts === + +var comp: number; +>comp : number + +comp **= 1; +>comp **= 1 : number +>comp : number +>1 : number + +comp **= comp **= 1; +>comp **= comp **= 1 : number +>comp : number +>comp **= 1 : number +>comp : number +>1 : number + +comp **= comp **= 1 + 2; +>comp **= comp **= 1 + 2 : number +>comp : number +>comp **= 1 + 2 : number +>comp : number +>1 + 2 : number +>1 : number +>2 : number + +comp **= comp **= 1 - 2; +>comp **= comp **= 1 - 2 : number +>comp : number +>comp **= 1 - 2 : number +>comp : number +>1 - 2 : number +>1 : number +>2 : number + +comp **= comp **= 1 * 2; +>comp **= comp **= 1 * 2 : number +>comp : number +>comp **= 1 * 2 : number +>comp : number +>1 * 2 : number +>1 : number +>2 : number + +comp **= comp **= 1 / 2; +>comp **= comp **= 1 / 2 : number +>comp : number +>comp **= 1 / 2 : number +>comp : number +>1 / 2 : number +>1 : number +>2 : number + +comp **= comp **= (1 + 2); +>comp **= comp **= (1 + 2) : number +>comp : number +>comp **= (1 + 2) : number +>comp : number +>(1 + 2) : number +>1 + 2 : number +>1 : number +>2 : number + +comp **= comp **= (1 - 2); +>comp **= comp **= (1 - 2) : number +>comp : number +>comp **= (1 - 2) : number +>comp : number +>(1 - 2) : number +>1 - 2 : number +>1 : number +>2 : number + +comp **= comp **= (1 * 2); +>comp **= comp **= (1 * 2) : number +>comp : number +>comp **= (1 * 2) : number +>comp : number +>(1 * 2) : number +>1 * 2 : number +>1 : number +>2 : number + +comp **= comp **= (1 / 2); +>comp **= comp **= (1 / 2) : number +>comp : number +>comp **= (1 / 2) : number +>comp : number +>(1 / 2) : number +>1 / 2 : number +>1 : number +>2 : number + +comp **= comp **= 1 + 2 ** 3; +>comp **= comp **= 1 + 2 ** 3 : number +>comp : number +>comp **= 1 + 2 ** 3 : number +>comp : number +>1 + 2 ** 3 : number +>1 : number +>2 ** 3 : number +>2 : number +>3 : number + +comp **= comp **= 1 - 2 ** 4; +>comp **= comp **= 1 - 2 ** 4 : number +>comp : number +>comp **= 1 - 2 ** 4 : number +>comp : number +>1 - 2 ** 4 : number +>1 : number +>2 ** 4 : number +>2 : number +>4 : number + +comp **= comp **= 1 * 2 ** 5; +>comp **= comp **= 1 * 2 ** 5 : number +>comp : number +>comp **= 1 * 2 ** 5 : number +>comp : number +>1 * 2 ** 5 : number +>1 : number +>2 ** 5 : number +>2 : number +>5 : number + +comp **= comp **= 1 / 2 ** 6; +>comp **= comp **= 1 / 2 ** 6 : number +>comp : number +>comp **= 1 / 2 ** 6 : number +>comp : number +>1 / 2 ** 6 : number +>1 : number +>2 ** 6 : number +>2 : number +>6 : number + +comp **= comp **= (1 + 2) ** 3; +>comp **= comp **= (1 + 2) ** 3 : number +>comp : number +>comp **= (1 + 2) ** 3 : number +>comp : number +>(1 + 2) ** 3 : number +>(1 + 2) : number +>1 + 2 : number +>1 : number +>2 : number +>3 : number + +comp **= comp **= (1 - 2) ** 4; +>comp **= comp **= (1 - 2) ** 4 : number +>comp : number +>comp **= (1 - 2) ** 4 : number +>comp : number +>(1 - 2) ** 4 : number +>(1 - 2) : number +>1 - 2 : number +>1 : number +>2 : number +>4 : number + +comp **= comp **= (1 * 2) ** 5; +>comp **= comp **= (1 * 2) ** 5 : number +>comp : number +>comp **= (1 * 2) ** 5 : number +>comp : number +>(1 * 2) ** 5 : number +>(1 * 2) : number +>1 * 2 : number +>1 : number +>2 : number +>5 : number + +comp **= comp **= (1 / 2) ** 6; +>comp **= comp **= (1 / 2) ** 6 : number +>comp : number +>comp **= (1 / 2) ** 6 : number +>comp : number +>(1 / 2) ** 6 : number +>(1 / 2) : number +>1 / 2 : number +>1 : number +>2 : number +>6 : number + diff --git a/tests/baselines/reference/emitExponentiationOperator1.js b/tests/baselines/reference/emitExponentiationOperator1.js new file mode 100644 index 00000000000..7c37137b83f --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator1.js @@ -0,0 +1,60 @@ +//// [emitExponentiationOperator1.ts] + +1 ** 2; +1 ** 2 ** 3; +1 ** -2 ** 3; +1 ** -2 ** -3; +-1 ** -2 ** -3; +-(1 ** 2) ** 3; +1 ** -(2 ** 3); + +1 ** 2 + 3; +1 ** 2 - 3; +1 ** 2 * 3; +1 ** 2 / 3; +1 ** 2 % 3; + +1 ** -2 + 3; +1 ** -2 - 3; +1 ** -2 * 3; +1 ** -2 / 3; +1 ** -2 % 3; + +2 + 3 ** 3; +2 - 3 ** 3; +2 * 3 ** 3; +2 / 3 ** 3; +2 % 3 ** 3; + +(2 + 3) ** 4; +(2 - 3) ** 4; +(2 * 3) ** 4; +(2 / 3) ** 4; + +//// [emitExponentiationOperator1.js] +Math.pow(1, 2); +Math.pow(1, Math.pow(2, 3)); +Math.pow(1, -Math.pow(2, 3)); +Math.pow(1, -Math.pow(2, -3)); +-Math.pow(1, -Math.pow(2, -3)); +-Math.pow((Math.pow(1, 2)), 3); +Math.pow(1, -(Math.pow(2, 3))); +Math.pow(1, 2) + 3; +Math.pow(1, 2) - 3; +Math.pow(1, 2) * 3; +Math.pow(1, 2) / 3; +Math.pow(1, 2) % 3; +Math.pow(1, -2) + 3; +Math.pow(1, -2) - 3; +Math.pow(1, -2) * 3; +Math.pow(1, -2) / 3; +Math.pow(1, -2) % 3; +2 + Math.pow(3, 3); +2 - Math.pow(3, 3); +2 * Math.pow(3, 3); +2 / Math.pow(3, 3); +2 % Math.pow(3, 3); +Math.pow((2 + 3), 4); +Math.pow((2 - 3), 4); +Math.pow((2 * 3), 4); +Math.pow((2 / 3), 4); diff --git a/tests/baselines/reference/emitExponentiationOperator1.symbols b/tests/baselines/reference/emitExponentiationOperator1.symbols new file mode 100644 index 00000000000..5e2bd27b02c --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator1.symbols @@ -0,0 +1,33 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts === + +No type information for this code.1 ** 2; +No type information for this code.1 ** 2 ** 3; +No type information for this code.1 ** -2 ** 3; +No type information for this code.1 ** -2 ** -3; +No type information for this code.-1 ** -2 ** -3; +No type information for this code.-(1 ** 2) ** 3; +No type information for this code.1 ** -(2 ** 3); +No type information for this code. +No type information for this code.1 ** 2 + 3; +No type information for this code.1 ** 2 - 3; +No type information for this code.1 ** 2 * 3; +No type information for this code.1 ** 2 / 3; +No type information for this code.1 ** 2 % 3; +No type information for this code. +No type information for this code.1 ** -2 + 3; +No type information for this code.1 ** -2 - 3; +No type information for this code.1 ** -2 * 3; +No type information for this code.1 ** -2 / 3; +No type information for this code.1 ** -2 % 3; +No type information for this code. +No type information for this code.2 + 3 ** 3; +No type information for this code.2 - 3 ** 3; +No type information for this code.2 * 3 ** 3; +No type information for this code.2 / 3 ** 3; +No type information for this code.2 % 3 ** 3; +No type information for this code. +No type information for this code.(2 + 3) ** 4; +No type information for this code.(2 - 3) ** 4; +No type information for this code.(2 * 3) ** 4; +No type information for this code.(2 / 3) ** 4; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/emitExponentiationOperator1.types b/tests/baselines/reference/emitExponentiationOperator1.types new file mode 100644 index 00000000000..de81d0b2e8f --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator1.types @@ -0,0 +1,201 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts === + +1 ** 2; +>1 ** 2 : number +>1 : number +>2 : number + +1 ** 2 ** 3; +>1 ** 2 ** 3 : number +>1 : number +>2 ** 3 : number +>2 : number +>3 : number + +1 ** -2 ** 3; +>1 ** -2 ** 3 : number +>1 : number +>-2 ** 3 : number +>2 ** 3 : number +>2 : number +>3 : number + +1 ** -2 ** -3; +>1 ** -2 ** -3 : number +>1 : number +>-2 ** -3 : number +>2 ** -3 : number +>2 : number +>-3 : number +>3 : number + +-1 ** -2 ** -3; +>-1 ** -2 ** -3 : number +>1 ** -2 ** -3 : number +>1 : number +>-2 ** -3 : number +>2 ** -3 : number +>2 : number +>-3 : number +>3 : number + +-(1 ** 2) ** 3; +>-(1 ** 2) ** 3 : number +>(1 ** 2) ** 3 : number +>(1 ** 2) : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** -(2 ** 3); +>1 ** -(2 ** 3) : number +>1 : number +>-(2 ** 3) : number +>(2 ** 3) : number +>2 ** 3 : number +>2 : number +>3 : number + +1 ** 2 + 3; +>1 ** 2 + 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** 2 - 3; +>1 ** 2 - 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** 2 * 3; +>1 ** 2 * 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** 2 / 3; +>1 ** 2 / 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** 2 % 3; +>1 ** 2 % 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** -2 + 3; +>1 ** -2 + 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +1 ** -2 - 3; +>1 ** -2 - 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +1 ** -2 * 3; +>1 ** -2 * 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +1 ** -2 / 3; +>1 ** -2 / 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +1 ** -2 % 3; +>1 ** -2 % 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +2 + 3 ** 3; +>2 + 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +2 - 3 ** 3; +>2 - 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +2 * 3 ** 3; +>2 * 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +2 / 3 ** 3; +>2 / 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +2 % 3 ** 3; +>2 % 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +(2 + 3) ** 4; +>(2 + 3) ** 4 : number +>(2 + 3) : number +>2 + 3 : number +>2 : number +>3 : number +>4 : number + +(2 - 3) ** 4; +>(2 - 3) ** 4 : number +>(2 - 3) : number +>2 - 3 : number +>2 : number +>3 : number +>4 : number + +(2 * 3) ** 4; +>(2 * 3) ** 4 : number +>(2 * 3) : number +>2 * 3 : number +>2 : number +>3 : number +>4 : number + +(2 / 3) ** 4; +>(2 / 3) ** 4 : number +>(2 / 3) : number +>2 / 3 : number +>2 : number +>3 : number +>4 : number + diff --git a/tests/baselines/reference/emitExponentiationOperator2.js b/tests/baselines/reference/emitExponentiationOperator2.js new file mode 100644 index 00000000000..3a93ee9ec9c --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator2.js @@ -0,0 +1,141 @@ +//// [emitExponentiationOperator2.ts] + +var temp = 10; + +++temp ** 3; +--temp ** 3; +temp++ ** 3; +temp-- ** 3; +--temp + temp ** 3; +--temp - temp ** 3; +--temp * temp ** 3; +--temp / temp ** 3; +--temp % temp ** 3; +-++temp ** 3; ++--temp ** 3; + +temp-- ** 3; +temp++ ** 3; +-temp++ ** 3; ++temp-- ** 3; + +temp-- + temp ** 3; +temp-- - temp ** 3; +temp-- * temp ** 3; +temp-- / temp ** 3; +temp-- % temp ** 3; + +--temp + 2 ** 3; +--temp - 2 ** 3; +--temp * 2 ** 3; +--temp / 2 ** 3; +--temp % 2 ** 3; + +++temp + 2 ** 3; +++temp - 2 ** 3; +++temp * 2 ** 3; +++temp / 2 ** 3; + +3 ** ++temp; +3 ** --temp; +3 ** temp++; +3 ** temp--; +-3 ** temp++; +-3 ** temp--; +-3 ** ++temp; +-3 ** --temp; ++3 ** temp++; ++3 ** temp--; ++3 ** ++temp; ++3 ** --temp + +3 ** ++temp ** 2; +3 ** --temp ** 2; +3 ** temp++ ** 2; +3 ** temp-- ** 2; +-3 ** temp++ ** 2; +-3 ** temp-- ** 2; +-3 ** ++temp ** 2; +-3 ** --temp ** 2; ++3 ** temp++ ** 2; ++3 ** temp-- ** 2; ++3 ** ++temp ** 2; ++3 ** --temp ** 2; + +3 ** ++temp + 2; +3 ** ++temp - 2; +3 ** ++temp * 2; +3 ** ++temp / 2; +3 ** ++temp % 2; + +3 ** --temp + 2; +3 ** --temp - 2; +3 ** --temp * 2; +3 ** --temp / 2; +3 ** --temp % 2; + +//// [emitExponentiationOperator2.js] +var temp = 10; +Math.pow(++temp, 3); +Math.pow(--temp, 3); +Math.pow(temp++, 3); +Math.pow(temp--, 3); +--temp + Math.pow(temp, 3); +--temp - Math.pow(temp, 3); +--temp * Math.pow(temp, 3); +--temp / Math.pow(temp, 3); +--temp % Math.pow(temp, 3); +-Math.pow(++temp, 3); ++Math.pow(--temp, 3); +Math.pow(temp--, 3); +Math.pow(temp++, 3); +-Math.pow(temp++, 3); ++Math.pow(temp--, 3); +temp-- + Math.pow(temp, 3); +temp-- - Math.pow(temp, 3); +temp-- * Math.pow(temp, 3); +temp-- / Math.pow(temp, 3); +temp-- % Math.pow(temp, 3); +--temp + Math.pow(2, 3); +--temp - Math.pow(2, 3); +--temp * Math.pow(2, 3); +--temp / Math.pow(2, 3); +--temp % Math.pow(2, 3); +++temp + Math.pow(2, 3); +++temp - Math.pow(2, 3); +++temp * Math.pow(2, 3); +++temp / Math.pow(2, 3); +Math.pow(3, ++temp); +Math.pow(3, --temp); +Math.pow(3, temp++); +Math.pow(3, temp--); +-Math.pow(3, temp++); +-Math.pow(3, temp--); +-Math.pow(3, ++temp); +-Math.pow(3, --temp); ++Math.pow(3, temp++); ++Math.pow(3, temp--); ++Math.pow(3, ++temp); ++Math.pow(3, --temp); +Math.pow(3, Math.pow(++temp, 2)); +Math.pow(3, Math.pow(--temp, 2)); +Math.pow(3, Math.pow(temp++, 2)); +Math.pow(3, Math.pow(temp--, 2)); +-Math.pow(3, Math.pow(temp++, 2)); +-Math.pow(3, Math.pow(temp--, 2)); +-Math.pow(3, Math.pow(++temp, 2)); +-Math.pow(3, Math.pow(--temp, 2)); ++Math.pow(3, Math.pow(temp++, 2)); ++Math.pow(3, Math.pow(temp--, 2)); ++Math.pow(3, Math.pow(++temp, 2)); ++Math.pow(3, Math.pow(--temp, 2)); +Math.pow(3, ++temp) + 2; +Math.pow(3, ++temp) - 2; +Math.pow(3, ++temp) * 2; +Math.pow(3, ++temp) / 2; +Math.pow(3, ++temp) % 2; +Math.pow(3, --temp) + 2; +Math.pow(3, --temp) - 2; +Math.pow(3, --temp) * 2; +Math.pow(3, --temp) / 2; +Math.pow(3, --temp) % 2; diff --git a/tests/baselines/reference/emitExponentiationOperator2.symbols b/tests/baselines/reference/emitExponentiationOperator2.symbols new file mode 100644 index 00000000000..58aa20a1d5f --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator2.symbols @@ -0,0 +1,204 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts === + +var temp = 10; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp + temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp - temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp * temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp / temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp % temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++--temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +temp-- + temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +temp-- - temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +temp-- * temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +temp-- / temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +temp-- % temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp + 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp - 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp * 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp / 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +--temp % 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +++temp + 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +++temp - 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +++temp * 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +++temp / 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** ++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** --temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-3 ** temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-3 ** temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-3 ** ++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-3 ** --temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++3 ** temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++3 ** temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++3 ** ++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++3 ** --temp +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** ++temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** --temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** temp++ ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** temp-- ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-3 ** temp++ ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-3 ** temp-- ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-3 ** ++temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +-3 ** --temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++3 ** temp++ ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++3 ** temp-- ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++3 ** ++temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + ++3 ** --temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** ++temp + 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** ++temp - 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** ++temp * 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** ++temp / 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** ++temp % 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** --temp + 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** --temp - 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** --temp * 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** --temp / 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + +3 ** --temp % 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperator2.types b/tests/baselines/reference/emitExponentiationOperator2.types new file mode 100644 index 00000000000..edd40614a36 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator2.types @@ -0,0 +1,486 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts === + +var temp = 10; +>temp : number +>10 : number + +++temp ** 3; +>++temp ** 3 : number +>++temp : number +>temp : number +>3 : number + +--temp ** 3; +>--temp ** 3 : number +>--temp : number +>temp : number +>3 : number + +temp++ ** 3; +>temp++ ** 3 : number +>temp++ : number +>temp : number +>3 : number + +temp-- ** 3; +>temp-- ** 3 : number +>temp-- : number +>temp : number +>3 : number + +--temp + temp ** 3; +>--temp + temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp - temp ** 3; +>--temp - temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp * temp ** 3; +>--temp * temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp / temp ** 3; +>--temp / temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp % temp ** 3; +>--temp % temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +-++temp ** 3; +>-++temp ** 3 : number +>++temp ** 3 : number +>++temp : number +>temp : number +>3 : number + ++--temp ** 3; +>+--temp ** 3 : number +>--temp ** 3 : number +>--temp : number +>temp : number +>3 : number + +temp-- ** 3; +>temp-- ** 3 : number +>temp-- : number +>temp : number +>3 : number + +temp++ ** 3; +>temp++ ** 3 : number +>temp++ : number +>temp : number +>3 : number + +-temp++ ** 3; +>-temp++ ** 3 : number +>temp++ ** 3 : number +>temp++ : number +>temp : number +>3 : number + ++temp-- ** 3; +>+temp-- ** 3 : number +>temp-- ** 3 : number +>temp-- : number +>temp : number +>3 : number + +temp-- + temp ** 3; +>temp-- + temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +temp-- - temp ** 3; +>temp-- - temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +temp-- * temp ** 3; +>temp-- * temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +temp-- / temp ** 3; +>temp-- / temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +temp-- % temp ** 3; +>temp-- % temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp + 2 ** 3; +>--temp + 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +--temp - 2 ** 3; +>--temp - 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +--temp * 2 ** 3; +>--temp * 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +--temp / 2 ** 3; +>--temp / 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +--temp % 2 ** 3; +>--temp % 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +++temp + 2 ** 3; +>++temp + 2 ** 3 : number +>++temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +++temp - 2 ** 3; +>++temp - 2 ** 3 : number +>++temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +++temp * 2 ** 3; +>++temp * 2 ** 3 : number +>++temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +++temp / 2 ** 3; +>++temp / 2 ** 3 : number +>++temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +3 ** ++temp; +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number + +3 ** --temp; +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number + +3 ** temp++; +>3 ** temp++ : number +>3 : number +>temp++ : number +>temp : number + +3 ** temp--; +>3 ** temp-- : number +>3 : number +>temp-- : number +>temp : number + +-3 ** temp++; +>-3 ** temp++ : number +>3 ** temp++ : number +>3 : number +>temp++ : number +>temp : number + +-3 ** temp--; +>-3 ** temp-- : number +>3 ** temp-- : number +>3 : number +>temp-- : number +>temp : number + +-3 ** ++temp; +>-3 ** ++temp : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number + +-3 ** --temp; +>-3 ** --temp : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number + ++3 ** temp++; +>+3 ** temp++ : number +>3 ** temp++ : number +>3 : number +>temp++ : number +>temp : number + ++3 ** temp--; +>+3 ** temp-- : number +>3 ** temp-- : number +>3 : number +>temp-- : number +>temp : number + ++3 ** ++temp; +>+3 ** ++temp : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number + ++3 ** --temp +>+3 ** --temp : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number + +3 ** ++temp ** 2; +>3 ** ++temp ** 2 : number +>3 : number +>++temp ** 2 : number +>++temp : number +>temp : number +>2 : number + +3 ** --temp ** 2; +>3 ** --temp ** 2 : number +>3 : number +>--temp ** 2 : number +>--temp : number +>temp : number +>2 : number + +3 ** temp++ ** 2; +>3 ** temp++ ** 2 : number +>3 : number +>temp++ ** 2 : number +>temp++ : number +>temp : number +>2 : number + +3 ** temp-- ** 2; +>3 ** temp-- ** 2 : number +>3 : number +>temp-- ** 2 : number +>temp-- : number +>temp : number +>2 : number + +-3 ** temp++ ** 2; +>-3 ** temp++ ** 2 : number +>3 ** temp++ ** 2 : number +>3 : number +>temp++ ** 2 : number +>temp++ : number +>temp : number +>2 : number + +-3 ** temp-- ** 2; +>-3 ** temp-- ** 2 : number +>3 ** temp-- ** 2 : number +>3 : number +>temp-- ** 2 : number +>temp-- : number +>temp : number +>2 : number + +-3 ** ++temp ** 2; +>-3 ** ++temp ** 2 : number +>3 ** ++temp ** 2 : number +>3 : number +>++temp ** 2 : number +>++temp : number +>temp : number +>2 : number + +-3 ** --temp ** 2; +>-3 ** --temp ** 2 : number +>3 ** --temp ** 2 : number +>3 : number +>--temp ** 2 : number +>--temp : number +>temp : number +>2 : number + ++3 ** temp++ ** 2; +>+3 ** temp++ ** 2 : number +>3 ** temp++ ** 2 : number +>3 : number +>temp++ ** 2 : number +>temp++ : number +>temp : number +>2 : number + ++3 ** temp-- ** 2; +>+3 ** temp-- ** 2 : number +>3 ** temp-- ** 2 : number +>3 : number +>temp-- ** 2 : number +>temp-- : number +>temp : number +>2 : number + ++3 ** ++temp ** 2; +>+3 ** ++temp ** 2 : number +>3 ** ++temp ** 2 : number +>3 : number +>++temp ** 2 : number +>++temp : number +>temp : number +>2 : number + ++3 ** --temp ** 2; +>+3 ** --temp ** 2 : number +>3 ** --temp ** 2 : number +>3 : number +>--temp ** 2 : number +>--temp : number +>temp : number +>2 : number + +3 ** ++temp + 2; +>3 ** ++temp + 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** ++temp - 2; +>3 ** ++temp - 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** ++temp * 2; +>3 ** ++temp * 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** ++temp / 2; +>3 ** ++temp / 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** ++temp % 2; +>3 ** ++temp % 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** --temp + 2; +>3 ** --temp + 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + +3 ** --temp - 2; +>3 ** --temp - 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + +3 ** --temp * 2; +>3 ** --temp * 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + +3 ** --temp / 2; +>3 ** --temp / 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + +3 ** --temp % 2; +>3 ** --temp % 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + diff --git a/tests/baselines/reference/emitExponentiationOperator3.js b/tests/baselines/reference/emitExponentiationOperator3.js new file mode 100644 index 00000000000..7cb92dfae63 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator3.js @@ -0,0 +1,218 @@ +//// [emitExponentiationOperator3.ts] +var temp: any; + +delete --temp ** 3; +delete ++temp ** 3; +delete temp-- ** 3; +delete temp++ ** 3; +delete -++temp ** 3; +delete -temp++ ** 3; +delete -temp-- ** 3; + +delete --temp ** 3 ** 1; +delete ++temp ** 3 ** 1; +delete temp-- ** 3 ** 1; +delete temp++ ** 3 ** 1; +delete -++temp ** 3 ** 1; +delete -temp++ ** 3 ** 1; +delete -temp-- ** 3 ** 1;; + +--temp ** 3; +++temp ** 3; +temp-- ** 3; +temp++ ** 3; +-++temp ** 3; +-temp++ ** 3; +-temp-- ** 3; + +--temp ** 3 ** 1; +++temp ** 3 ** 1; +temp-- ** 3 ** 1; +temp++ ** 3 ** 1; +-++temp ** 3 ** 1; +-temp++ ** 3 ** 1; +-temp-- ** 3 ** 1; + +typeof --temp ** 3; +typeof temp-- ** 3; +typeof 3 ** 4; +typeof temp++ ** 4; +typeof temp-- ** 4; +typeof -3 ** 4; +typeof -++temp ** 4; +typeof -temp++ ** 4; +typeof -temp-- ** 4; + +typeof --temp ** 3 ** 1; +typeof temp-- ** 3 ** 1; +typeof 3 ** 4 ** 1; +typeof temp++ ** 4 ** 1; +typeof temp-- ** 4 ** 1; +typeof -3 ** 4 ** 1; +typeof -++temp ** 4 ** 1; +typeof -temp++ ** 4 ** 1; +typeof -temp-- ** 4 ** 1; + +void --temp ** 3; +void temp-- ** 3; +void 3 ** 4; +void temp++ ** 4; +void temp-- ** 4; +void -3 ** 4; +void -++temp ** 4; +void -temp++ ** 4; +void -temp-- ** 4; + +void --temp ** 3 ** 1; +void temp-- ** 3 ** 1; +void 3 ** 4 ** 1; +void temp++ ** 4 ** 1; +void temp-- ** 4 ** 1; +void -3 ** 4 ** 1; +void -++temp ** 4 ** 1; +void -temp++ ** 4 ** 1; +void -temp-- ** 4 ** 1; + +~ --temp ** 3; +~ temp-- ** 3; +~ 3 ** 4; +~ temp++ ** 4; +~ temp-- ** 4; +~ -3 ** 4; +~ -++temp ** 4; +~ -temp++ ** 4; +~ -temp-- ** 4; + +~ --temp ** 3 ** 1; +~ temp-- ** 3 ** 1; +~ 3 ** 4 ** 1; +~ temp++ ** 4 ** 1; +~ temp-- ** 4 ** 1; +~ -3 ** 4 ** 1; +~ -++temp ** 4 ** 1; +~ -temp++ ** 4 ** 1; +~ -temp-- ** 4 ** 1; + +! --temp ** 3; +! temp-- ** 3; +! 3 ** 4; +! temp++ ** 4; +! temp-- ** 4; +! -3 ** 4; +! -++temp ** 4; +! -temp++ ** 4; +! -temp-- ** 4; + +! --temp ** 3 ** 1; +! temp-- ** 3 ** 1; +! 3 ** 4 ** 1; +! temp++ ** 4 ** 1; +! temp-- ** 4 ** 1; +! -3 ** 4 ** 1; +! -++temp ** 4 ** 1; +! -temp++ ** 4 ** 1; +! -temp-- ** 4 ** 1; + +//// [emitExponentiationOperator3.js] +var temp; +delete Math.pow(--temp, 3); +delete Math.pow(++temp, 3); +delete Math.pow(temp--, 3); +delete Math.pow(temp++, 3); +delete -Math.pow(++temp, 3); +delete -Math.pow(temp++, 3); +delete -Math.pow(temp--, 3); +delete Math.pow(--temp, Math.pow(3, 1)); +delete Math.pow(++temp, Math.pow(3, 1)); +delete Math.pow(temp--, Math.pow(3, 1)); +delete Math.pow(temp++, Math.pow(3, 1)); +delete -Math.pow(++temp, Math.pow(3, 1)); +delete -Math.pow(temp++, Math.pow(3, 1)); +delete -Math.pow(temp--, Math.pow(3, 1)); +; +Math.pow(--temp, 3); +Math.pow(++temp, 3); +Math.pow(temp--, 3); +Math.pow(temp++, 3); +-Math.pow(++temp, 3); +-Math.pow(temp++, 3); +-Math.pow(temp--, 3); +Math.pow(--temp, Math.pow(3, 1)); +Math.pow(++temp, Math.pow(3, 1)); +Math.pow(temp--, Math.pow(3, 1)); +Math.pow(temp++, Math.pow(3, 1)); +-Math.pow(++temp, Math.pow(3, 1)); +-Math.pow(temp++, Math.pow(3, 1)); +-Math.pow(temp--, Math.pow(3, 1)); +typeof Math.pow(--temp, 3); +typeof Math.pow(temp--, 3); +typeof Math.pow(3, 4); +typeof Math.pow(temp++, 4); +typeof Math.pow(temp--, 4); +typeof -Math.pow(3, 4); +typeof -Math.pow(++temp, 4); +typeof -Math.pow(temp++, 4); +typeof -Math.pow(temp--, 4); +typeof Math.pow(--temp, Math.pow(3, 1)); +typeof Math.pow(temp--, Math.pow(3, 1)); +typeof Math.pow(3, Math.pow(4, 1)); +typeof Math.pow(temp++, Math.pow(4, 1)); +typeof Math.pow(temp--, Math.pow(4, 1)); +typeof -Math.pow(3, Math.pow(4, 1)); +typeof -Math.pow(++temp, Math.pow(4, 1)); +typeof -Math.pow(temp++, Math.pow(4, 1)); +typeof -Math.pow(temp--, Math.pow(4, 1)); +void Math.pow(--temp, 3); +void Math.pow(temp--, 3); +void Math.pow(3, 4); +void Math.pow(temp++, 4); +void Math.pow(temp--, 4); +void -Math.pow(3, 4); +void -Math.pow(++temp, 4); +void -Math.pow(temp++, 4); +void -Math.pow(temp--, 4); +void Math.pow(--temp, Math.pow(3, 1)); +void Math.pow(temp--, Math.pow(3, 1)); +void Math.pow(3, Math.pow(4, 1)); +void Math.pow(temp++, Math.pow(4, 1)); +void Math.pow(temp--, Math.pow(4, 1)); +void -Math.pow(3, Math.pow(4, 1)); +void -Math.pow(++temp, Math.pow(4, 1)); +void -Math.pow(temp++, Math.pow(4, 1)); +void -Math.pow(temp--, Math.pow(4, 1)); +~Math.pow(--temp, 3); +~Math.pow(temp--, 3); +~Math.pow(3, 4); +~Math.pow(temp++, 4); +~Math.pow(temp--, 4); +~-Math.pow(3, 4); +~-Math.pow(++temp, 4); +~-Math.pow(temp++, 4); +~-Math.pow(temp--, 4); +~Math.pow(--temp, Math.pow(3, 1)); +~Math.pow(temp--, Math.pow(3, 1)); +~Math.pow(3, Math.pow(4, 1)); +~Math.pow(temp++, Math.pow(4, 1)); +~Math.pow(temp--, Math.pow(4, 1)); +~-Math.pow(3, Math.pow(4, 1)); +~-Math.pow(++temp, Math.pow(4, 1)); +~-Math.pow(temp++, Math.pow(4, 1)); +~-Math.pow(temp--, Math.pow(4, 1)); +!Math.pow(--temp, 3); +!Math.pow(temp--, 3); +!Math.pow(3, 4); +!Math.pow(temp++, 4); +!Math.pow(temp--, 4); +!-Math.pow(3, 4); +!-Math.pow(++temp, 4); +!-Math.pow(temp++, 4); +!-Math.pow(temp--, 4); +!Math.pow(--temp, Math.pow(3, 1)); +!Math.pow(temp--, Math.pow(3, 1)); +!Math.pow(3, Math.pow(4, 1)); +!Math.pow(temp++, Math.pow(4, 1)); +!Math.pow(temp--, Math.pow(4, 1)); +!-Math.pow(3, Math.pow(4, 1)); +!-Math.pow(++temp, Math.pow(4, 1)); +!-Math.pow(temp++, Math.pow(4, 1)); +!-Math.pow(temp--, Math.pow(4, 1)); diff --git a/tests/baselines/reference/emitExponentiationOperator3.symbols b/tests/baselines/reference/emitExponentiationOperator3.symbols new file mode 100644 index 00000000000..68b70711695 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator3.symbols @@ -0,0 +1,272 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts === +var temp: any; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete --temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete ++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete -++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete -temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete -temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete --temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete ++temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete temp-- ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete temp++ ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete -++temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete -temp++ ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +delete -temp-- ** 3 ** 1;; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +--temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +-++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +-temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +-temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +--temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +++temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +temp-- ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +temp++ ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +-++temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +-temp++ ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +-temp-- ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof --temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof 3 ** 4; +typeof temp++ ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof temp-- ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof -3 ** 4; +typeof -++temp ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof -temp++ ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof -temp-- ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof --temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof temp-- ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof 3 ** 4 ** 1; +typeof temp++ ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof temp-- ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof -3 ** 4 ** 1; +typeof -++temp ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof -temp++ ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +typeof -temp-- ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void --temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void 3 ** 4; +void temp++ ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void temp-- ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void -3 ** 4; +void -++temp ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void -temp++ ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void -temp-- ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void --temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void temp-- ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void 3 ** 4 ** 1; +void temp++ ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void temp-- ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void -3 ** 4 ** 1; +void -++temp ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void -temp++ ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +void -temp-- ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ --temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ 3 ** 4; +~ temp++ ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ temp-- ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ -3 ** 4; +~ -++temp ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ -temp++ ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ -temp-- ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ --temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ temp-- ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ 3 ** 4 ** 1; +~ temp++ ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ temp-- ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ -3 ** 4 ** 1; +~ -++temp ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ -temp++ ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +~ -temp-- ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! --temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! 3 ** 4; +! temp++ ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! temp-- ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! -3 ** 4; +! -++temp ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! -temp++ ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! -temp-- ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! --temp ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! temp-- ** 3 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! 3 ** 4 ** 1; +! temp++ ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! temp-- ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! -3 ** 4 ** 1; +! -++temp ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! -temp++ ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + +! -temp-- ** 4 ** 1; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperator3.types b/tests/baselines/reference/emitExponentiationOperator3.types new file mode 100644 index 00000000000..8e455b7cd68 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator3.types @@ -0,0 +1,832 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts === +var temp: any; +>temp : any + +delete --temp ** 3; +>delete --temp ** 3 : boolean +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +delete ++temp ** 3; +>delete ++temp ** 3 : boolean +>++temp ** 3 : number +>++temp : number +>temp : any +>3 : number + +delete temp-- ** 3; +>delete temp-- ** 3 : boolean +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +delete temp++ ** 3; +>delete temp++ ** 3 : boolean +>temp++ ** 3 : number +>temp++ : number +>temp : any +>3 : number + +delete -++temp ** 3; +>delete -++temp ** 3 : boolean +>-++temp ** 3 : number +>++temp ** 3 : number +>++temp : number +>temp : any +>3 : number + +delete -temp++ ** 3; +>delete -temp++ ** 3 : boolean +>-temp++ ** 3 : number +>temp++ ** 3 : number +>temp++ : number +>temp : any +>3 : number + +delete -temp-- ** 3; +>delete -temp-- ** 3 : boolean +>-temp-- ** 3 : number +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +delete --temp ** 3 ** 1; +>delete --temp ** 3 ** 1 : boolean +>--temp ** 3 ** 1 : number +>--temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +delete ++temp ** 3 ** 1; +>delete ++temp ** 3 ** 1 : boolean +>++temp ** 3 ** 1 : number +>++temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +delete temp-- ** 3 ** 1; +>delete temp-- ** 3 ** 1 : boolean +>temp-- ** 3 ** 1 : number +>temp-- : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +delete temp++ ** 3 ** 1; +>delete temp++ ** 3 ** 1 : boolean +>temp++ ** 3 ** 1 : number +>temp++ : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +delete -++temp ** 3 ** 1; +>delete -++temp ** 3 ** 1 : boolean +>-++temp ** 3 ** 1 : number +>++temp ** 3 ** 1 : number +>++temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +delete -temp++ ** 3 ** 1; +>delete -temp++ ** 3 ** 1 : boolean +>-temp++ ** 3 ** 1 : number +>temp++ ** 3 ** 1 : number +>temp++ : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +delete -temp-- ** 3 ** 1;; +>delete -temp-- ** 3 ** 1 : boolean +>-temp-- ** 3 ** 1 : number +>temp-- ** 3 ** 1 : number +>temp-- : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +--temp ** 3; +>--temp ** 3 : number +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +++temp ** 3; +>++temp ** 3 : number +>++temp ** 3 : number +>++temp : number +>temp : any +>3 : number + +temp-- ** 3; +>temp-- ** 3 : number +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +temp++ ** 3; +>temp++ ** 3 : number +>temp++ ** 3 : number +>temp++ : number +>temp : any +>3 : number + +-++temp ** 3; +>-++temp ** 3 : number +>-++temp ** 3 : number +>++temp ** 3 : number +>++temp : number +>temp : any +>3 : number + +-temp++ ** 3; +>-temp++ ** 3 : number +>-temp++ ** 3 : number +>temp++ ** 3 : number +>temp++ : number +>temp : any +>3 : number + +-temp-- ** 3; +>-temp-- ** 3 : number +>-temp-- ** 3 : number +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +--temp ** 3 ** 1; +>--temp ** 3 ** 1 : number +>--temp ** 3 ** 1 : number +>--temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +++temp ** 3 ** 1; +>++temp ** 3 ** 1 : number +>++temp ** 3 ** 1 : number +>++temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +temp-- ** 3 ** 1; +>temp-- ** 3 ** 1 : number +>temp-- ** 3 ** 1 : number +>temp-- : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +temp++ ** 3 ** 1; +>temp++ ** 3 ** 1 : number +>temp++ ** 3 ** 1 : number +>temp++ : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +-++temp ** 3 ** 1; +>-++temp ** 3 ** 1 : number +>-++temp ** 3 ** 1 : number +>++temp ** 3 ** 1 : number +>++temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +-temp++ ** 3 ** 1; +>-temp++ ** 3 ** 1 : number +>-temp++ ** 3 ** 1 : number +>temp++ ** 3 ** 1 : number +>temp++ : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +-temp-- ** 3 ** 1; +>-temp-- ** 3 ** 1 : number +>-temp-- ** 3 ** 1 : number +>temp-- ** 3 ** 1 : number +>temp-- : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +typeof --temp ** 3; +>typeof --temp ** 3 : string +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +typeof temp-- ** 3; +>typeof temp-- ** 3 : string +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +typeof 3 ** 4; +>typeof 3 ** 4 : string +>3 ** 4 : number +>3 : number +>4 : number + +typeof temp++ ** 4; +>typeof temp++ ** 4 : string +>temp++ ** 4 : number +>temp++ : number +>temp : any +>4 : number + +typeof temp-- ** 4; +>typeof temp-- ** 4 : string +>temp-- ** 4 : number +>temp-- : number +>temp : any +>4 : number + +typeof -3 ** 4; +>typeof -3 ** 4 : string +>-3 ** 4 : number +>3 ** 4 : number +>3 : number +>4 : number + +typeof -++temp ** 4; +>typeof -++temp ** 4 : string +>-++temp ** 4 : number +>++temp ** 4 : number +>++temp : number +>temp : any +>4 : number + +typeof -temp++ ** 4; +>typeof -temp++ ** 4 : string +>-temp++ ** 4 : number +>temp++ ** 4 : number +>temp++ : number +>temp : any +>4 : number + +typeof -temp-- ** 4; +>typeof -temp-- ** 4 : string +>-temp-- ** 4 : number +>temp-- ** 4 : number +>temp-- : number +>temp : any +>4 : number + +typeof --temp ** 3 ** 1; +>typeof --temp ** 3 ** 1 : string +>--temp ** 3 ** 1 : number +>--temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +typeof temp-- ** 3 ** 1; +>typeof temp-- ** 3 ** 1 : string +>temp-- ** 3 ** 1 : number +>temp-- : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +typeof 3 ** 4 ** 1; +>typeof 3 ** 4 ** 1 : string +>3 ** 4 ** 1 : number +>3 : number +>4 ** 1 : number +>4 : number +>1 : number + +typeof temp++ ** 4 ** 1; +>typeof temp++ ** 4 ** 1 : string +>temp++ ** 4 ** 1 : number +>temp++ : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +typeof temp-- ** 4 ** 1; +>typeof temp-- ** 4 ** 1 : string +>temp-- ** 4 ** 1 : number +>temp-- : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +typeof -3 ** 4 ** 1; +>typeof -3 ** 4 ** 1 : string +>-3 ** 4 ** 1 : number +>3 ** 4 ** 1 : number +>3 : number +>4 ** 1 : number +>4 : number +>1 : number + +typeof -++temp ** 4 ** 1; +>typeof -++temp ** 4 ** 1 : string +>-++temp ** 4 ** 1 : number +>++temp ** 4 ** 1 : number +>++temp : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +typeof -temp++ ** 4 ** 1; +>typeof -temp++ ** 4 ** 1 : string +>-temp++ ** 4 ** 1 : number +>temp++ ** 4 ** 1 : number +>temp++ : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +typeof -temp-- ** 4 ** 1; +>typeof -temp-- ** 4 ** 1 : string +>-temp-- ** 4 ** 1 : number +>temp-- ** 4 ** 1 : number +>temp-- : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +void --temp ** 3; +>void --temp ** 3 : undefined +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +void temp-- ** 3; +>void temp-- ** 3 : undefined +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +void 3 ** 4; +>void 3 ** 4 : undefined +>3 ** 4 : number +>3 : number +>4 : number + +void temp++ ** 4; +>void temp++ ** 4 : undefined +>temp++ ** 4 : number +>temp++ : number +>temp : any +>4 : number + +void temp-- ** 4; +>void temp-- ** 4 : undefined +>temp-- ** 4 : number +>temp-- : number +>temp : any +>4 : number + +void -3 ** 4; +>void -3 ** 4 : undefined +>-3 ** 4 : number +>3 ** 4 : number +>3 : number +>4 : number + +void -++temp ** 4; +>void -++temp ** 4 : undefined +>-++temp ** 4 : number +>++temp ** 4 : number +>++temp : number +>temp : any +>4 : number + +void -temp++ ** 4; +>void -temp++ ** 4 : undefined +>-temp++ ** 4 : number +>temp++ ** 4 : number +>temp++ : number +>temp : any +>4 : number + +void -temp-- ** 4; +>void -temp-- ** 4 : undefined +>-temp-- ** 4 : number +>temp-- ** 4 : number +>temp-- : number +>temp : any +>4 : number + +void --temp ** 3 ** 1; +>void --temp ** 3 ** 1 : undefined +>--temp ** 3 ** 1 : number +>--temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +void temp-- ** 3 ** 1; +>void temp-- ** 3 ** 1 : undefined +>temp-- ** 3 ** 1 : number +>temp-- : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +void 3 ** 4 ** 1; +>void 3 ** 4 ** 1 : undefined +>3 ** 4 ** 1 : number +>3 : number +>4 ** 1 : number +>4 : number +>1 : number + +void temp++ ** 4 ** 1; +>void temp++ ** 4 ** 1 : undefined +>temp++ ** 4 ** 1 : number +>temp++ : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +void temp-- ** 4 ** 1; +>void temp-- ** 4 ** 1 : undefined +>temp-- ** 4 ** 1 : number +>temp-- : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +void -3 ** 4 ** 1; +>void -3 ** 4 ** 1 : undefined +>-3 ** 4 ** 1 : number +>3 ** 4 ** 1 : number +>3 : number +>4 ** 1 : number +>4 : number +>1 : number + +void -++temp ** 4 ** 1; +>void -++temp ** 4 ** 1 : undefined +>-++temp ** 4 ** 1 : number +>++temp ** 4 ** 1 : number +>++temp : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +void -temp++ ** 4 ** 1; +>void -temp++ ** 4 ** 1 : undefined +>-temp++ ** 4 ** 1 : number +>temp++ ** 4 ** 1 : number +>temp++ : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +void -temp-- ** 4 ** 1; +>void -temp-- ** 4 ** 1 : undefined +>-temp-- ** 4 ** 1 : number +>temp-- ** 4 ** 1 : number +>temp-- : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +~ --temp ** 3; +>~ --temp ** 3 : number +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +~ temp-- ** 3; +>~ temp-- ** 3 : number +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +~ 3 ** 4; +>~ 3 ** 4 : number +>3 ** 4 : number +>3 : number +>4 : number + +~ temp++ ** 4; +>~ temp++ ** 4 : number +>temp++ ** 4 : number +>temp++ : number +>temp : any +>4 : number + +~ temp-- ** 4; +>~ temp-- ** 4 : number +>temp-- ** 4 : number +>temp-- : number +>temp : any +>4 : number + +~ -3 ** 4; +>~ -3 ** 4 : number +>-3 ** 4 : number +>3 ** 4 : number +>3 : number +>4 : number + +~ -++temp ** 4; +>~ -++temp ** 4 : number +>-++temp ** 4 : number +>++temp ** 4 : number +>++temp : number +>temp : any +>4 : number + +~ -temp++ ** 4; +>~ -temp++ ** 4 : number +>-temp++ ** 4 : number +>temp++ ** 4 : number +>temp++ : number +>temp : any +>4 : number + +~ -temp-- ** 4; +>~ -temp-- ** 4 : number +>-temp-- ** 4 : number +>temp-- ** 4 : number +>temp-- : number +>temp : any +>4 : number + +~ --temp ** 3 ** 1; +>~ --temp ** 3 ** 1 : number +>--temp ** 3 ** 1 : number +>--temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +~ temp-- ** 3 ** 1; +>~ temp-- ** 3 ** 1 : number +>temp-- ** 3 ** 1 : number +>temp-- : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +~ 3 ** 4 ** 1; +>~ 3 ** 4 ** 1 : number +>3 ** 4 ** 1 : number +>3 : number +>4 ** 1 : number +>4 : number +>1 : number + +~ temp++ ** 4 ** 1; +>~ temp++ ** 4 ** 1 : number +>temp++ ** 4 ** 1 : number +>temp++ : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +~ temp-- ** 4 ** 1; +>~ temp-- ** 4 ** 1 : number +>temp-- ** 4 ** 1 : number +>temp-- : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +~ -3 ** 4 ** 1; +>~ -3 ** 4 ** 1 : number +>-3 ** 4 ** 1 : number +>3 ** 4 ** 1 : number +>3 : number +>4 ** 1 : number +>4 : number +>1 : number + +~ -++temp ** 4 ** 1; +>~ -++temp ** 4 ** 1 : number +>-++temp ** 4 ** 1 : number +>++temp ** 4 ** 1 : number +>++temp : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +~ -temp++ ** 4 ** 1; +>~ -temp++ ** 4 ** 1 : number +>-temp++ ** 4 ** 1 : number +>temp++ ** 4 ** 1 : number +>temp++ : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +~ -temp-- ** 4 ** 1; +>~ -temp-- ** 4 ** 1 : number +>-temp-- ** 4 ** 1 : number +>temp-- ** 4 ** 1 : number +>temp-- : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +! --temp ** 3; +>! --temp ** 3 : boolean +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +! temp-- ** 3; +>! temp-- ** 3 : boolean +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +! 3 ** 4; +>! 3 ** 4 : boolean +>3 ** 4 : number +>3 : number +>4 : number + +! temp++ ** 4; +>! temp++ ** 4 : boolean +>temp++ ** 4 : number +>temp++ : number +>temp : any +>4 : number + +! temp-- ** 4; +>! temp-- ** 4 : boolean +>temp-- ** 4 : number +>temp-- : number +>temp : any +>4 : number + +! -3 ** 4; +>! -3 ** 4 : boolean +>-3 ** 4 : number +>3 ** 4 : number +>3 : number +>4 : number + +! -++temp ** 4; +>! -++temp ** 4 : boolean +>-++temp ** 4 : number +>++temp ** 4 : number +>++temp : number +>temp : any +>4 : number + +! -temp++ ** 4; +>! -temp++ ** 4 : boolean +>-temp++ ** 4 : number +>temp++ ** 4 : number +>temp++ : number +>temp : any +>4 : number + +! -temp-- ** 4; +>! -temp-- ** 4 : boolean +>-temp-- ** 4 : number +>temp-- ** 4 : number +>temp-- : number +>temp : any +>4 : number + +! --temp ** 3 ** 1; +>! --temp ** 3 ** 1 : boolean +>--temp ** 3 ** 1 : number +>--temp : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +! temp-- ** 3 ** 1; +>! temp-- ** 3 ** 1 : boolean +>temp-- ** 3 ** 1 : number +>temp-- : number +>temp : any +>3 ** 1 : number +>3 : number +>1 : number + +! 3 ** 4 ** 1; +>! 3 ** 4 ** 1 : boolean +>3 ** 4 ** 1 : number +>3 : number +>4 ** 1 : number +>4 : number +>1 : number + +! temp++ ** 4 ** 1; +>! temp++ ** 4 ** 1 : boolean +>temp++ ** 4 ** 1 : number +>temp++ : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +! temp-- ** 4 ** 1; +>! temp-- ** 4 ** 1 : boolean +>temp-- ** 4 ** 1 : number +>temp-- : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +! -3 ** 4 ** 1; +>! -3 ** 4 ** 1 : boolean +>-3 ** 4 ** 1 : number +>3 ** 4 ** 1 : number +>3 : number +>4 ** 1 : number +>4 : number +>1 : number + +! -++temp ** 4 ** 1; +>! -++temp ** 4 ** 1 : boolean +>-++temp ** 4 ** 1 : number +>++temp ** 4 ** 1 : number +>++temp : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +! -temp++ ** 4 ** 1; +>! -temp++ ** 4 ** 1 : boolean +>-temp++ ** 4 ** 1 : number +>temp++ ** 4 ** 1 : number +>temp++ : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + +! -temp-- ** 4 ** 1; +>! -temp-- ** 4 ** 1 : boolean +>-temp-- ** 4 ** 1 : number +>temp-- ** 4 ** 1 : number +>temp-- : number +>temp : any +>4 ** 1 : number +>4 : number +>1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js new file mode 100644 index 00000000000..cea4b78963b --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js @@ -0,0 +1,60 @@ +//// [emitExponentiationOperatorInTemplateString1.ts] +var t1 = 10; +var t2 = 10; +var s; +`Exp: ${t1 ** t2} abc`; +`Exp: ${t1 ** t2 ** t1} abc`; +`Exp: ${t1 + t2 ** t1} abc`; +`Exp: ${t1 - t2 ** t1} abc`; +`Exp: ${t1 ** t2 + t1} abc`; +`Exp: ${t1 ** t2 - t1} abc`; +`Exp: ${t1 + t2 ** t2 + t1} abc`; +`Exp: ${t1 - t2 ** t2 - t1} abc`; +`Exp: ${-t1 ** t2 - t1} abc`; +`Exp: ${+t1 ** t2 - t1} abc`; +`Exp: ${-++t1 ** t2 - t1} abc`; +`Exp: ${+--t1 ** t2 - t1} abc`; +`Exp: ${-t1++ ** t2 - t1} abc`; +`Exp: ${-t1-- ** t2 - t1} abc`; +`Exp: ${+t1++ ** t2 - t1} abc`; +`Exp: ${+t1-- ** t2 - t1} abc`; +`Exp: ${typeof t1 ** t2 ** t1} abc`; +`Exp: ${typeof t1 ** t2 + t1} abc`; +`Exp: ${typeof t1 ** (t2 - t1)} abc`; +`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; +`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; +`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; +`Exp: ${!t1 ** t2 ** t1} abc`; +`Exp: ${!t1 ** t2 ** ++t1} abc`; +`Exp: ${!t1 ** t2 ** --t1} abc`; + + +//// [emitExponentiationOperatorInTemplateString1.js] +var t1 = 10; +var t2 = 10; +var s; +"Exp: " + (Math.pow(t1, t2)) + " abc"; +"Exp: " + (Math.pow(t1, Math.pow(t2, t1))) + " abc"; +"Exp: " + (t1 + Math.pow(t2, t1)) + " abc"; +"Exp: " + (t1 - Math.pow(t2, t1)) + " abc"; +"Exp: " + (Math.pow(t1, t2) + t1) + " abc"; +"Exp: " + (Math.pow(t1, t2) - t1) + " abc"; +"Exp: " + (t1 + Math.pow(t2, t2) + t1) + " abc"; +"Exp: " + (t1 - Math.pow(t2, t2) - t1) + " abc"; +"Exp: " + (-Math.pow(t1, t2) - t1) + " abc"; +"Exp: " + (+Math.pow(t1, t2) - t1) + " abc"; +"Exp: " + (-Math.pow(++t1, t2) - t1) + " abc"; +"Exp: " + (+Math.pow(--t1, t2) - t1) + " abc"; +"Exp: " + (-Math.pow(t1++, t2) - t1) + " abc"; +"Exp: " + (-Math.pow(t1--, t2) - t1) + " abc"; +"Exp: " + (+Math.pow(t1++, t2) - t1) + " abc"; +"Exp: " + (+Math.pow(t1--, t2) - t1) + " abc"; +"Exp: " + typeof Math.pow(t1, Math.pow(t2, t1)) + " abc"; +"Exp: " + (typeof Math.pow(t1, t2) + t1) + " abc"; +"Exp: " + typeof Math.pow(t1, (t2 - t1)) + " abc"; +"Exp: " + (1 + typeof Math.pow(t1, Math.pow(t2, t1))) + " abc"; +"Exp: " + (2 + typeof Math.pow(t1, Math.pow(t2, ++t1))) + " abc"; +"Exp: " + (3 + typeof Math.pow(t1, Math.pow(t2, --t1))) + " abc"; +"Exp: " + !Math.pow(t1, Math.pow(t2, t1)) + " abc"; +"Exp: " + !Math.pow(t1, Math.pow(t2, ++t1)) + " abc"; +"Exp: " + !Math.pow(t1, Math.pow(t2, --t1)) + " abc"; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols new file mode 100644 index 00000000000..5ef2abc4395 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols @@ -0,0 +1,136 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts === +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) + +`Exp: ${t1 ** t2} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) + +`Exp: ${t1 ** t2 ** t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${t1 + t2 ** t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${t1 - t2 ** t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${t1 ** t2 + t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${t1 ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${t1 + t2 ** t2 + t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${t1 - t2 ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${-t1 ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${+t1 ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${-++t1 ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${+--t1 ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${-t1++ ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${-t1-- ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${+t1++ ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${+t1-- ** t2 - t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${typeof t1 ** t2 ** t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${typeof t1 ** t2 + t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${typeof t1 ** (t2 - t1)} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${!t1 ** t2 ** t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${!t1 ** t2 ** ++t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + +`Exp: ${!t1 ** t2 ** --t1} abc`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types new file mode 100644 index 00000000000..b6324c4bd4c --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types @@ -0,0 +1,248 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts === +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +`Exp: ${t1 ** t2} abc`; +>`Exp: ${t1 ** t2} abc` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`Exp: ${t1 ** t2 ** t1} abc`; +>`Exp: ${t1 ** t2 ** t1} abc` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`Exp: ${t1 + t2 ** t1} abc`; +>`Exp: ${t1 + t2 ** t1} abc` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`Exp: ${t1 - t2 ** t1} abc`; +>`Exp: ${t1 - t2 ** t1} abc` : string +>t1 - t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`Exp: ${t1 ** t2 + t1} abc`; +>`Exp: ${t1 ** t2 + t1} abc` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${t1 ** t2 - t1} abc`; +>`Exp: ${t1 ** t2 - t1} abc` : string +>t1 ** t2 - t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${t1 + t2 ** t2 + t1} abc`; +>`Exp: ${t1 + t2 ** t2 + t1} abc` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`Exp: ${t1 - t2 ** t2 - t1} abc`; +>`Exp: ${t1 - t2 ** t2 - t1} abc` : string +>t1 - t2 ** t2 - t1 : number +>t1 - t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`Exp: ${-t1 ** t2 - t1} abc`; +>`Exp: ${-t1 ** t2 - t1} abc` : string +>-t1 ** t2 - t1 : number +>-t1 ** t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${+t1 ** t2 - t1} abc`; +>`Exp: ${+t1 ** t2 - t1} abc` : string +>+t1 ** t2 - t1 : number +>+t1 ** t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${-++t1 ** t2 - t1} abc`; +>`Exp: ${-++t1 ** t2 - t1} abc` : string +>-++t1 ** t2 - t1 : number +>-++t1 ** t2 : number +>++t1 ** t2 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${+--t1 ** t2 - t1} abc`; +>`Exp: ${+--t1 ** t2 - t1} abc` : string +>+--t1 ** t2 - t1 : number +>+--t1 ** t2 : number +>--t1 ** t2 : number +>--t1 : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${-t1++ ** t2 - t1} abc`; +>`Exp: ${-t1++ ** t2 - t1} abc` : string +>-t1++ ** t2 - t1 : number +>-t1++ ** t2 : number +>t1++ ** t2 : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${-t1-- ** t2 - t1} abc`; +>`Exp: ${-t1-- ** t2 - t1} abc` : string +>-t1-- ** t2 - t1 : number +>-t1-- ** t2 : number +>t1-- ** t2 : number +>t1-- : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${+t1++ ** t2 - t1} abc`; +>`Exp: ${+t1++ ** t2 - t1} abc` : string +>+t1++ ** t2 - t1 : number +>+t1++ ** t2 : number +>t1++ ** t2 : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${+t1-- ** t2 - t1} abc`; +>`Exp: ${+t1-- ** t2 - t1} abc` : string +>+t1-- ** t2 - t1 : number +>+t1-- ** t2 : number +>t1-- ** t2 : number +>t1-- : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${typeof t1 ** t2 ** t1} abc`; +>`Exp: ${typeof t1 ** t2 ** t1} abc` : string +>typeof t1 ** t2 ** t1 : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`Exp: ${typeof t1 ** t2 + t1} abc`; +>`Exp: ${typeof t1 ** t2 + t1} abc` : string +>typeof t1 ** t2 + t1 : string +>typeof t1 ** t2 : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`Exp: ${typeof t1 ** (t2 - t1)} abc`; +>`Exp: ${typeof t1 ** (t2 - t1)} abc` : string +>typeof t1 ** (t2 - t1) : string +>t1 ** (t2 - t1) : number +>t1 : number +>(t2 - t1) : number +>t2 - t1 : number +>t2 : number +>t1 : number + +`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; +>`Exp: ${1 + typeof t1 ** t2 ** t1} abc` : string +>1 + typeof t1 ** t2 ** t1 : string +>1 : number +>typeof t1 ** t2 ** t1 : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; +>`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc` : string +>2 + typeof t1 ** t2 ** ++t1 : string +>2 : number +>typeof t1 ** t2 ** ++t1 : string +>t1 ** t2 ** ++t1 : number +>t1 : number +>t2 ** ++t1 : number +>t2 : number +>++t1 : number +>t1 : number + +`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; +>`Exp: ${3 + typeof t1 ** t2 ** --t1} abc` : string +>3 + typeof t1 ** t2 ** --t1 : string +>3 : number +>typeof t1 ** t2 ** --t1 : string +>t1 ** t2 ** --t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`Exp: ${!t1 ** t2 ** t1} abc`; +>`Exp: ${!t1 ** t2 ** t1} abc` : string +>!t1 ** t2 ** t1 : boolean +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`Exp: ${!t1 ** t2 ** ++t1} abc`; +>`Exp: ${!t1 ** t2 ** ++t1} abc` : string +>!t1 ** t2 ** ++t1 : boolean +>t1 ** t2 ** ++t1 : number +>t1 : number +>t2 ** ++t1 : number +>t2 : number +>++t1 : number +>t1 : number + +`Exp: ${!t1 ** t2 ** --t1} abc`; +>`Exp: ${!t1 ** t2 ** --t1} abc` : string +>!t1 ** t2 ** --t1 : boolean +>t1 ** t2 ** --t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + diff --git a/tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.js b/tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.js new file mode 100644 index 00000000000..0072c546253 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.js @@ -0,0 +1,26 @@ +//// [exponentiationOperatorWithAnyAndNumber.ts] +var a: any; +var b: number; + +// operator ** +var r1 = a ** a; +var r2 = a ** b; +var r3 = a ** 0; +var r4 = 0 ** a; +var r5 = 0 ** 0; +var r6 = b ** 0; +var r7 = 0 ** b; +var r8 = b ** b; + +//// [exponentiationOperatorWithAnyAndNumber.js] +var a; +var b; +// operator ** +var r1 = Math.pow(a, a); +var r2 = Math.pow(a, b); +var r3 = Math.pow(a, 0); +var r4 = Math.pow(0, a); +var r5 = Math.pow(0, 0); +var r6 = Math.pow(b, 0); +var r7 = Math.pow(0, b); +var r8 = Math.pow(b, b); diff --git a/tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.symbols b/tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.symbols new file mode 100644 index 00000000000..997401a15c9 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.symbols @@ -0,0 +1,42 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithAnyAndNumber.ts === +var a: any; +>a : Symbol(a, Decl(exponentiationOperatorWithAnyAndNumber.ts, 0, 3)) + +var b: number; +>b : Symbol(b, Decl(exponentiationOperatorWithAnyAndNumber.ts, 1, 3)) + +// operator ** +var r1 = a ** a; +>r1 : Symbol(r1, Decl(exponentiationOperatorWithAnyAndNumber.ts, 4, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithAnyAndNumber.ts, 0, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithAnyAndNumber.ts, 0, 3)) + +var r2 = a ** b; +>r2 : Symbol(r2, Decl(exponentiationOperatorWithAnyAndNumber.ts, 5, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithAnyAndNumber.ts, 0, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithAnyAndNumber.ts, 1, 3)) + +var r3 = a ** 0; +>r3 : Symbol(r3, Decl(exponentiationOperatorWithAnyAndNumber.ts, 6, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithAnyAndNumber.ts, 0, 3)) + +var r4 = 0 ** a; +>r4 : Symbol(r4, Decl(exponentiationOperatorWithAnyAndNumber.ts, 7, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithAnyAndNumber.ts, 0, 3)) + +var r5 = 0 ** 0; +>r5 : Symbol(r5, Decl(exponentiationOperatorWithAnyAndNumber.ts, 8, 3)) + +var r6 = b ** 0; +>r6 : Symbol(r6, Decl(exponentiationOperatorWithAnyAndNumber.ts, 9, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithAnyAndNumber.ts, 1, 3)) + +var r7 = 0 ** b; +>r7 : Symbol(r7, Decl(exponentiationOperatorWithAnyAndNumber.ts, 10, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithAnyAndNumber.ts, 1, 3)) + +var r8 = b ** b; +>r8 : Symbol(r8, Decl(exponentiationOperatorWithAnyAndNumber.ts, 11, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithAnyAndNumber.ts, 1, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithAnyAndNumber.ts, 1, 3)) + diff --git a/tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.types b/tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.types new file mode 100644 index 00000000000..ec48b80f192 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithAnyAndNumber.types @@ -0,0 +1,56 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithAnyAndNumber.ts === +var a: any; +>a : any + +var b: number; +>b : number + +// operator ** +var r1 = a ** a; +>r1 : number +>a ** a : number +>a : any +>a : any + +var r2 = a ** b; +>r2 : number +>a ** b : number +>a : any +>b : number + +var r3 = a ** 0; +>r3 : number +>a ** 0 : number +>a : any +>0 : number + +var r4 = 0 ** a; +>r4 : number +>0 ** a : number +>0 : number +>a : any + +var r5 = 0 ** 0; +>r5 : number +>0 ** 0 : number +>0 : number +>0 : number + +var r6 = b ** 0; +>r6 : number +>b ** 0 : number +>b : number +>0 : number + +var r7 = 0 ** b; +>r7 : number +>0 ** b : number +>0 : number +>b : number + +var r8 = b ** b; +>r8 : number +>b ** b : number +>b : number +>b : number + diff --git a/tests/baselines/reference/exponentiationOperatorWithEnum.js b/tests/baselines/reference/exponentiationOperatorWithEnum.js new file mode 100644 index 00000000000..8175ca30c9e --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithEnum.js @@ -0,0 +1,49 @@ +//// [exponentiationOperatorWithEnum.ts] +// operands of an enum type are treated as having the primitive type Number. + +enum E { + a, + b +} + +var a: any; +var b: number; +var c: E; + +// operator ** +var r1 = c ** a; +var r2 = c ** b; +var r3 = c ** c; +var r4 = a ** c; +var r5 = b ** c; +var r6 = E.a ** a; +var r7 = E.a ** b; +var r8 = E.a ** E.b; +var r9 = E.a ** 1; +var r10 = a ** E.b; +var r11 = b ** E.b; +var r12 = 1 ** E.b; + +//// [exponentiationOperatorWithEnum.js] +// operands of an enum type are treated as having the primitive type Number. +var E; +(function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; +})(E || (E = {})); +var a; +var b; +var c; +// operator ** +var r1 = Math.pow(c, a); +var r2 = Math.pow(c, b); +var r3 = Math.pow(c, c); +var r4 = Math.pow(a, c); +var r5 = Math.pow(b, c); +var r6 = Math.pow(E.a, a); +var r7 = Math.pow(E.a, b); +var r8 = Math.pow(E.a, E.b); +var r9 = Math.pow(E.a, 1); +var r10 = Math.pow(a, E.b); +var r11 = Math.pow(b, E.b); +var r12 = Math.pow(1, E.b); diff --git a/tests/baselines/reference/exponentiationOperatorWithEnum.symbols b/tests/baselines/reference/exponentiationOperatorWithEnum.symbols new file mode 100644 index 00000000000..9c8413dc441 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithEnum.symbols @@ -0,0 +1,98 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnum.ts === +// operands of an enum type are treated as having the primitive type Number. + +enum E { +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) + + a, +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnum.ts, 2, 8)) + + b +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnum.ts, 3, 6)) +} + +var a: any; +>a : Symbol(a, Decl(exponentiationOperatorWithEnum.ts, 7, 3)) + +var b: number; +>b : Symbol(b, Decl(exponentiationOperatorWithEnum.ts, 8, 3)) + +var c: E; +>c : Symbol(c, Decl(exponentiationOperatorWithEnum.ts, 9, 3)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) + +// operator ** +var r1 = c ** a; +>r1 : Symbol(r1, Decl(exponentiationOperatorWithEnum.ts, 12, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnum.ts, 9, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithEnum.ts, 7, 3)) + +var r2 = c ** b; +>r2 : Symbol(r2, Decl(exponentiationOperatorWithEnum.ts, 13, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnum.ts, 9, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithEnum.ts, 8, 3)) + +var r3 = c ** c; +>r3 : Symbol(r3, Decl(exponentiationOperatorWithEnum.ts, 14, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnum.ts, 9, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnum.ts, 9, 3)) + +var r4 = a ** c; +>r4 : Symbol(r4, Decl(exponentiationOperatorWithEnum.ts, 15, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithEnum.ts, 7, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnum.ts, 9, 3)) + +var r5 = b ** c; +>r5 : Symbol(r5, Decl(exponentiationOperatorWithEnum.ts, 16, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithEnum.ts, 8, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnum.ts, 9, 3)) + +var r6 = E.a ** a; +>r6 : Symbol(r6, Decl(exponentiationOperatorWithEnum.ts, 17, 3)) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithEnum.ts, 2, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnum.ts, 2, 8)) +>a : Symbol(a, Decl(exponentiationOperatorWithEnum.ts, 7, 3)) + +var r7 = E.a ** b; +>r7 : Symbol(r7, Decl(exponentiationOperatorWithEnum.ts, 18, 3)) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithEnum.ts, 2, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnum.ts, 2, 8)) +>b : Symbol(b, Decl(exponentiationOperatorWithEnum.ts, 8, 3)) + +var r8 = E.a ** E.b; +>r8 : Symbol(r8, Decl(exponentiationOperatorWithEnum.ts, 19, 3)) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithEnum.ts, 2, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnum.ts, 2, 8)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithEnum.ts, 3, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnum.ts, 3, 6)) + +var r9 = E.a ** 1; +>r9 : Symbol(r9, Decl(exponentiationOperatorWithEnum.ts, 20, 3)) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithEnum.ts, 2, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnum.ts, 2, 8)) + +var r10 = a ** E.b; +>r10 : Symbol(r10, Decl(exponentiationOperatorWithEnum.ts, 21, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithEnum.ts, 7, 3)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithEnum.ts, 3, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnum.ts, 3, 6)) + +var r11 = b ** E.b; +>r11 : Symbol(r11, Decl(exponentiationOperatorWithEnum.ts, 22, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithEnum.ts, 8, 3)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithEnum.ts, 3, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnum.ts, 3, 6)) + +var r12 = 1 ** E.b; +>r12 : Symbol(r12, Decl(exponentiationOperatorWithEnum.ts, 23, 3)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithEnum.ts, 3, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnum.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnum.ts, 3, 6)) + diff --git a/tests/baselines/reference/exponentiationOperatorWithEnum.types b/tests/baselines/reference/exponentiationOperatorWithEnum.types new file mode 100644 index 00000000000..037ff9d1261 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithEnum.types @@ -0,0 +1,112 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnum.ts === +// operands of an enum type are treated as having the primitive type Number. + +enum E { +>E : E + + a, +>a : E + + b +>b : E +} + +var a: any; +>a : any + +var b: number; +>b : number + +var c: E; +>c : E +>E : E + +// operator ** +var r1 = c ** a; +>r1 : number +>c ** a : number +>c : E +>a : any + +var r2 = c ** b; +>r2 : number +>c ** b : number +>c : E +>b : number + +var r3 = c ** c; +>r3 : number +>c ** c : number +>c : E +>c : E + +var r4 = a ** c; +>r4 : number +>a ** c : number +>a : any +>c : E + +var r5 = b ** c; +>r5 : number +>b ** c : number +>b : number +>c : E + +var r6 = E.a ** a; +>r6 : number +>E.a ** a : number +>E.a : E +>E : typeof E +>a : E +>a : any + +var r7 = E.a ** b; +>r7 : number +>E.a ** b : number +>E.a : E +>E : typeof E +>a : E +>b : number + +var r8 = E.a ** E.b; +>r8 : number +>E.a ** E.b : number +>E.a : E +>E : typeof E +>a : E +>E.b : E +>E : typeof E +>b : E + +var r9 = E.a ** 1; +>r9 : number +>E.a ** 1 : number +>E.a : E +>E : typeof E +>a : E +>1 : number + +var r10 = a ** E.b; +>r10 : number +>a ** E.b : number +>a : any +>E.b : E +>E : typeof E +>b : E + +var r11 = b ** E.b; +>r11 : number +>b ** E.b : number +>b : number +>E.b : E +>E : typeof E +>b : E + +var r12 = 1 ** E.b; +>r12 : number +>1 ** E.b : number +>1 : number +>E.b : E +>E : typeof E +>b : E + diff --git a/tests/baselines/reference/exponentiationOperatorWithEnumUnion.js b/tests/baselines/reference/exponentiationOperatorWithEnumUnion.js new file mode 100644 index 00000000000..0493c9cdefd --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithEnumUnion.js @@ -0,0 +1,58 @@ +//// [exponentiationOperatorWithEnumUnion.ts] +// operands of an enum type are treated as having the primitive type Number. + +enum E { + a, + b +} +enum F { + c, + d +} + +var a: any; +var b: number; +var c: E | F; + +// operator ** +var r1 = c ** a; +var r2 = c ** b; +var r3 = c ** c; +var r4 = a ** c; +var r5 = b ** c; +var r6 = E.a ** a; +var r7 = E.a ** b; +var r8 = E.a ** E.b; +var r9 = E.a ** 1; +var r10 = a ** E.b; +var r11 = b ** E.b; +var r12 = 1 ** E.b; + +//// [exponentiationOperatorWithEnumUnion.js] +// operands of an enum type are treated as having the primitive type Number. +var E; +(function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; +})(E || (E = {})); +var F; +(function (F) { + F[F["c"] = 0] = "c"; + F[F["d"] = 1] = "d"; +})(F || (F = {})); +var a; +var b; +var c; +// operator ** +var r1 = Math.pow(c, a); +var r2 = Math.pow(c, b); +var r3 = Math.pow(c, c); +var r4 = Math.pow(a, c); +var r5 = Math.pow(b, c); +var r6 = Math.pow(E.a, a); +var r7 = Math.pow(E.a, b); +var r8 = Math.pow(E.a, E.b); +var r9 = Math.pow(E.a, 1); +var r10 = Math.pow(a, E.b); +var r11 = Math.pow(b, E.b); +var r12 = Math.pow(1, E.b); diff --git a/tests/baselines/reference/exponentiationOperatorWithEnumUnion.symbols b/tests/baselines/reference/exponentiationOperatorWithEnumUnion.symbols new file mode 100644 index 00000000000..f46a32d8c97 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithEnumUnion.symbols @@ -0,0 +1,108 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnumUnion.ts === +// operands of an enum type are treated as having the primitive type Number. + +enum E { +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) + + a, +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnumUnion.ts, 2, 8)) + + b +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnumUnion.ts, 3, 6)) +} +enum F { +>F : Symbol(F, Decl(exponentiationOperatorWithEnumUnion.ts, 5, 1)) + + c, +>c : Symbol(F.c, Decl(exponentiationOperatorWithEnumUnion.ts, 6, 8)) + + d +>d : Symbol(F.d, Decl(exponentiationOperatorWithEnumUnion.ts, 7, 6)) +} + +var a: any; +>a : Symbol(a, Decl(exponentiationOperatorWithEnumUnion.ts, 11, 3)) + +var b: number; +>b : Symbol(b, Decl(exponentiationOperatorWithEnumUnion.ts, 12, 3)) + +var c: E | F; +>c : Symbol(c, Decl(exponentiationOperatorWithEnumUnion.ts, 13, 3)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) +>F : Symbol(F, Decl(exponentiationOperatorWithEnumUnion.ts, 5, 1)) + +// operator ** +var r1 = c ** a; +>r1 : Symbol(r1, Decl(exponentiationOperatorWithEnumUnion.ts, 16, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnumUnion.ts, 13, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithEnumUnion.ts, 11, 3)) + +var r2 = c ** b; +>r2 : Symbol(r2, Decl(exponentiationOperatorWithEnumUnion.ts, 17, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnumUnion.ts, 13, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithEnumUnion.ts, 12, 3)) + +var r3 = c ** c; +>r3 : Symbol(r3, Decl(exponentiationOperatorWithEnumUnion.ts, 18, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnumUnion.ts, 13, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnumUnion.ts, 13, 3)) + +var r4 = a ** c; +>r4 : Symbol(r4, Decl(exponentiationOperatorWithEnumUnion.ts, 19, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithEnumUnion.ts, 11, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnumUnion.ts, 13, 3)) + +var r5 = b ** c; +>r5 : Symbol(r5, Decl(exponentiationOperatorWithEnumUnion.ts, 20, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithEnumUnion.ts, 12, 3)) +>c : Symbol(c, Decl(exponentiationOperatorWithEnumUnion.ts, 13, 3)) + +var r6 = E.a ** a; +>r6 : Symbol(r6, Decl(exponentiationOperatorWithEnumUnion.ts, 21, 3)) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithEnumUnion.ts, 2, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnumUnion.ts, 2, 8)) +>a : Symbol(a, Decl(exponentiationOperatorWithEnumUnion.ts, 11, 3)) + +var r7 = E.a ** b; +>r7 : Symbol(r7, Decl(exponentiationOperatorWithEnumUnion.ts, 22, 3)) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithEnumUnion.ts, 2, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnumUnion.ts, 2, 8)) +>b : Symbol(b, Decl(exponentiationOperatorWithEnumUnion.ts, 12, 3)) + +var r8 = E.a ** E.b; +>r8 : Symbol(r8, Decl(exponentiationOperatorWithEnumUnion.ts, 23, 3)) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithEnumUnion.ts, 2, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnumUnion.ts, 2, 8)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithEnumUnion.ts, 3, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnumUnion.ts, 3, 6)) + +var r9 = E.a ** 1; +>r9 : Symbol(r9, Decl(exponentiationOperatorWithEnumUnion.ts, 24, 3)) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithEnumUnion.ts, 2, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithEnumUnion.ts, 2, 8)) + +var r10 = a ** E.b; +>r10 : Symbol(r10, Decl(exponentiationOperatorWithEnumUnion.ts, 25, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithEnumUnion.ts, 11, 3)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithEnumUnion.ts, 3, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnumUnion.ts, 3, 6)) + +var r11 = b ** E.b; +>r11 : Symbol(r11, Decl(exponentiationOperatorWithEnumUnion.ts, 26, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithEnumUnion.ts, 12, 3)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithEnumUnion.ts, 3, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnumUnion.ts, 3, 6)) + +var r12 = 1 ** E.b; +>r12 : Symbol(r12, Decl(exponentiationOperatorWithEnumUnion.ts, 27, 3)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithEnumUnion.ts, 3, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithEnumUnion.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithEnumUnion.ts, 3, 6)) + diff --git a/tests/baselines/reference/exponentiationOperatorWithEnumUnion.types b/tests/baselines/reference/exponentiationOperatorWithEnumUnion.types new file mode 100644 index 00000000000..5be479b9e63 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithEnumUnion.types @@ -0,0 +1,122 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnumUnion.ts === +// operands of an enum type are treated as having the primitive type Number. + +enum E { +>E : E + + a, +>a : E + + b +>b : E +} +enum F { +>F : F + + c, +>c : F + + d +>d : F +} + +var a: any; +>a : any + +var b: number; +>b : number + +var c: E | F; +>c : E | F +>E : E +>F : F + +// operator ** +var r1 = c ** a; +>r1 : number +>c ** a : number +>c : E | F +>a : any + +var r2 = c ** b; +>r2 : number +>c ** b : number +>c : E | F +>b : number + +var r3 = c ** c; +>r3 : number +>c ** c : number +>c : E | F +>c : E | F + +var r4 = a ** c; +>r4 : number +>a ** c : number +>a : any +>c : E | F + +var r5 = b ** c; +>r5 : number +>b ** c : number +>b : number +>c : E | F + +var r6 = E.a ** a; +>r6 : number +>E.a ** a : number +>E.a : E +>E : typeof E +>a : E +>a : any + +var r7 = E.a ** b; +>r7 : number +>E.a ** b : number +>E.a : E +>E : typeof E +>a : E +>b : number + +var r8 = E.a ** E.b; +>r8 : number +>E.a ** E.b : number +>E.a : E +>E : typeof E +>a : E +>E.b : E +>E : typeof E +>b : E + +var r9 = E.a ** 1; +>r9 : number +>E.a ** 1 : number +>E.a : E +>E : typeof E +>a : E +>1 : number + +var r10 = a ** E.b; +>r10 : number +>a ** E.b : number +>a : any +>E.b : E +>E : typeof E +>b : E + +var r11 = b ** E.b; +>r11 : number +>b ** E.b : number +>b : number +>E.b : E +>E : typeof E +>b : E + +var r12 = 1 ** E.b; +>r12 : number +>1 ** E.b : number +>1 : number +>E.b : E +>E : typeof E +>b : E + diff --git a/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.errors.txt new file mode 100644 index 00000000000..b62cd9601e4 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.errors.txt @@ -0,0 +1,239 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(15,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(17,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(18,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(19,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(22,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(24,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(24,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(25,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(25,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(26,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(26,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(29,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(31,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(32,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(33,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(35,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(36,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(36,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(37,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(38,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(38,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(39,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(39,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(40,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(40,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(42,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(43,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(43,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(44,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(45,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(45,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(46,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(46,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(47,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(47,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(49,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(50,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(50,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(51,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(52,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(52,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(53,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(53,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(54,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(54,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(57,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(59,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(60,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(61,19): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(64,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(66,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(67,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts(68,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidOperands.ts (56 errors) ==== + // these operators require their operands to be of type Any, the Number primitive type, or + // an enum type + enum E { a, b, c } + + var a: any; + var b: boolean; + var c: number; + var d: string; + var e: { a: number }; + var f: Number; + + // All of the below should be an error unless otherwise noted + // operator ** + var r1a1 = a ** a; //ok + var r1a2 = a ** b; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1a3 = a ** c; //ok + var r1a4 = a ** d; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1a5 = a ** e; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1a6 = a ** f; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1b1 = b ** a; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b2 = b ** b; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b3 = b ** c; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b4 = b ** d; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b5 = b ** e; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b6 = b ** f; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1c1 = c ** a; //ok + var r1c2 = c ** b; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1c3 = c ** c; //ok + var r1c4 = c ** d; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1c5 = c ** e; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1c6 = c ** f; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1d1 = d ** a; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d2 = d ** b; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d3 = d ** c; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d4 = d ** d; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d5 = d ** e; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d6 = d ** f; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1e1 = e ** a; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1e2 = e ** b; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1e3 = e ** c; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1e4 = e ** d; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1e5 = e ** e; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1e6 = e ** f; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1f1 = f ** a; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1f2 = f ** b; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1f3 = f ** c; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1f4 = f ** d; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1f5 = f ** e; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1f6 = f ** f; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1g1 = E.a ** a; //ok + var r1g2 = E.a ** b; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1g3 = E.a ** c; //ok + var r1g4 = E.a ** d; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1g5 = E.a ** e; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1g6 = E.a ** f; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1h1 = a ** E.b; //ok + var r1h2 = b ** E.b; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1h3 = c ** E.b; //ok + var r1h4 = d ** E.b; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1h5 = e ** E.b; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1h6 = f ** E.b + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.js b/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.js new file mode 100644 index 00000000000..e7fb22ca6f1 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithInvalidOperands.js @@ -0,0 +1,135 @@ +//// [exponentiationOperatorWithInvalidOperands.ts] +// these operators require their operands to be of type Any, the Number primitive type, or +// an enum type +enum E { a, b, c } + +var a: any; +var b: boolean; +var c: number; +var d: string; +var e: { a: number }; +var f: Number; + +// All of the below should be an error unless otherwise noted +// operator ** +var r1a1 = a ** a; //ok +var r1a2 = a ** b; +var r1a3 = a ** c; //ok +var r1a4 = a ** d; +var r1a5 = a ** e; +var r1a6 = a ** f; + +var r1b1 = b ** a; +var r1b2 = b ** b; +var r1b3 = b ** c; +var r1b4 = b ** d; +var r1b5 = b ** e; +var r1b6 = b ** f; + +var r1c1 = c ** a; //ok +var r1c2 = c ** b; +var r1c3 = c ** c; //ok +var r1c4 = c ** d; +var r1c5 = c ** e; +var r1c6 = c ** f; + +var r1d1 = d ** a; +var r1d2 = d ** b; +var r1d3 = d ** c; +var r1d4 = d ** d; +var r1d5 = d ** e; +var r1d6 = d ** f; + +var r1e1 = e ** a; +var r1e2 = e ** b; +var r1e3 = e ** c; +var r1e4 = e ** d; +var r1e5 = e ** e; +var r1e6 = e ** f; + +var r1f1 = f ** a; +var r1f2 = f ** b; +var r1f3 = f ** c; +var r1f4 = f ** d; +var r1f5 = f ** e; +var r1f6 = f ** f; + +var r1g1 = E.a ** a; //ok +var r1g2 = E.a ** b; +var r1g3 = E.a ** c; //ok +var r1g4 = E.a ** d; +var r1g5 = E.a ** e; +var r1g6 = E.a ** f; + +var r1h1 = a ** E.b; //ok +var r1h2 = b ** E.b; +var r1h3 = c ** E.b; //ok +var r1h4 = d ** E.b; +var r1h5 = e ** E.b; +var r1h6 = f ** E.b + +//// [exponentiationOperatorWithInvalidOperands.js] +// these operators require their operands to be of type Any, the Number primitive type, or +// an enum type +var E; +(function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; + E[E["c"] = 2] = "c"; +})(E || (E = {})); +var a; +var b; +var c; +var d; +var e; +var f; +// All of the below should be an error unless otherwise noted +// operator ** +var r1a1 = Math.pow(a, a); //ok +var r1a2 = Math.pow(a, b); +var r1a3 = Math.pow(a, c); //ok +var r1a4 = Math.pow(a, d); +var r1a5 = Math.pow(a, e); +var r1a6 = Math.pow(a, f); +var r1b1 = Math.pow(b, a); +var r1b2 = Math.pow(b, b); +var r1b3 = Math.pow(b, c); +var r1b4 = Math.pow(b, d); +var r1b5 = Math.pow(b, e); +var r1b6 = Math.pow(b, f); +var r1c1 = Math.pow(c, a); //ok +var r1c2 = Math.pow(c, b); +var r1c3 = Math.pow(c, c); //ok +var r1c4 = Math.pow(c, d); +var r1c5 = Math.pow(c, e); +var r1c6 = Math.pow(c, f); +var r1d1 = Math.pow(d, a); +var r1d2 = Math.pow(d, b); +var r1d3 = Math.pow(d, c); +var r1d4 = Math.pow(d, d); +var r1d5 = Math.pow(d, e); +var r1d6 = Math.pow(d, f); +var r1e1 = Math.pow(e, a); +var r1e2 = Math.pow(e, b); +var r1e3 = Math.pow(e, c); +var r1e4 = Math.pow(e, d); +var r1e5 = Math.pow(e, e); +var r1e6 = Math.pow(e, f); +var r1f1 = Math.pow(f, a); +var r1f2 = Math.pow(f, b); +var r1f3 = Math.pow(f, c); +var r1f4 = Math.pow(f, d); +var r1f5 = Math.pow(f, e); +var r1f6 = Math.pow(f, f); +var r1g1 = Math.pow(E.a, a); //ok +var r1g2 = Math.pow(E.a, b); +var r1g3 = Math.pow(E.a, c); //ok +var r1g4 = Math.pow(E.a, d); +var r1g5 = Math.pow(E.a, e); +var r1g6 = Math.pow(E.a, f); +var r1h1 = Math.pow(a, E.b); //ok +var r1h2 = Math.pow(b, E.b); +var r1h3 = Math.pow(c, E.b); //ok +var r1h4 = Math.pow(d, E.b); +var r1h5 = Math.pow(e, E.b); +var r1h6 = Math.pow(f, E.b); diff --git a/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.errors.txt new file mode 100644 index 00000000000..99535985628 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.errors.txt @@ -0,0 +1,98 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(9,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(9,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(10,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(10,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(11,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(11,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(13,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(14,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(15,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(17,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(17,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(18,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(18,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(19,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(19,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(21,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(22,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts(23,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndInvalidOperands.ts (24 errors) ==== + // If one operand is the null or undefined value, it is treated as having the type of the + // other operand. + + var a: boolean; + var b: string; + var c: Object; + + // operator ** + var r1a1 = null ** a; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1a2 = null ** b; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1a3 = null ** c; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1b1 = a ** null; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b2 = b ** null; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b3 = c ** null; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1c1 = null ** true; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1c2 = null ** ''; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1c3 = null ** {}; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1d1 = true ** null; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d2 = '' ** null; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d3 = {} ** null; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.js b/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.js new file mode 100644 index 00000000000..8af703fd032 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithNullValueAndInvalidOperands.js @@ -0,0 +1,44 @@ +//// [exponentiationOperatorWithNullValueAndInvalidOperands.ts] +// If one operand is the null or undefined value, it is treated as having the type of the +// other operand. + +var a: boolean; +var b: string; +var c: Object; + +// operator ** +var r1a1 = null ** a; +var r1a2 = null ** b; +var r1a3 = null ** c; + +var r1b1 = a ** null; +var r1b2 = b ** null; +var r1b3 = c ** null; + +var r1c1 = null ** true; +var r1c2 = null ** ''; +var r1c3 = null ** {}; + +var r1d1 = true ** null; +var r1d2 = '' ** null; +var r1d3 = {} ** null; + +//// [exponentiationOperatorWithNullValueAndInvalidOperands.js] +// If one operand is the null or undefined value, it is treated as having the type of the +// other operand. +var a; +var b; +var c; +// operator ** +var r1a1 = Math.pow(null, a); +var r1a2 = Math.pow(null, b); +var r1a3 = Math.pow(null, c); +var r1b1 = Math.pow(a, null); +var r1b2 = Math.pow(b, null); +var r1b3 = Math.pow(c, null); +var r1c1 = Math.pow(null, true); +var r1c2 = Math.pow(null, ''); +var r1c3 = Math.pow(null, {}); +var r1d1 = Math.pow(true, null); +var r1d2 = Math.pow('', null); +var r1d3 = Math.pow({}, null); diff --git a/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.js b/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.js new file mode 100644 index 00000000000..a7fe81296e0 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.js @@ -0,0 +1,41 @@ +//// [exponentiationOperatorWithNullValueAndValidOperands.ts] +// If one operand is the null or undefined value, it is treated as having the type of the +// other operand. + +enum E { + a, + b +} + +var a: any; +var b: number; + +// operator ** +var r1 = null ** a; +var r2 = null ** b; +var r3 = null ** 1; +var r4 = null ** E.a; +var r5 = a ** null; +var r6 = b ** null; +var r7 = 0 ** null; +var r8 = E.b ** null; + +//// [exponentiationOperatorWithNullValueAndValidOperands.js] +// If one operand is the null or undefined value, it is treated as having the type of the +// other operand. +var E; +(function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; +})(E || (E = {})); +var a; +var b; +// operator ** +var r1 = Math.pow(null, a); +var r2 = Math.pow(null, b); +var r3 = Math.pow(null, 1); +var r4 = Math.pow(null, E.a); +var r5 = Math.pow(a, null); +var r6 = Math.pow(b, null); +var r7 = Math.pow(0, null); +var r8 = Math.pow(E.b, null); diff --git a/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.symbols b/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.symbols new file mode 100644 index 00000000000..cc1ead64f67 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.symbols @@ -0,0 +1,55 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts === +// If one operand is the null or undefined value, it is treated as having the type of the +// other operand. + +enum E { +>E : Symbol(E, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 0, 0)) + + a, +>a : Symbol(E.a, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 3, 8)) + + b +>b : Symbol(E.b, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 4, 6)) +} + +var a: any; +>a : Symbol(a, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 8, 3)) + +var b: number; +>b : Symbol(b, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 9, 3)) + +// operator ** +var r1 = null ** a; +>r1 : Symbol(r1, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 12, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 8, 3)) + +var r2 = null ** b; +>r2 : Symbol(r2, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 13, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 9, 3)) + +var r3 = null ** 1; +>r3 : Symbol(r3, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 14, 3)) + +var r4 = null ** E.a; +>r4 : Symbol(r4, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 15, 3)) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 3, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 3, 8)) + +var r5 = a ** null; +>r5 : Symbol(r5, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 16, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 8, 3)) + +var r6 = b ** null; +>r6 : Symbol(r6, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 17, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 9, 3)) + +var r7 = 0 ** null; +>r7 : Symbol(r7, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 18, 3)) + +var r8 = E.b ** null; +>r8 : Symbol(r8, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 19, 3)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 4, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithNullValueAndValidOperands.ts, 4, 6)) + diff --git a/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.types b/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.types new file mode 100644 index 00000000000..2a3c4807763 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithNullValueAndValidOperands.types @@ -0,0 +1,73 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNullValueAndValidOperands.ts === +// If one operand is the null or undefined value, it is treated as having the type of the +// other operand. + +enum E { +>E : E + + a, +>a : E + + b +>b : E +} + +var a: any; +>a : any + +var b: number; +>b : number + +// operator ** +var r1 = null ** a; +>r1 : number +>null ** a : number +>null : null +>a : any + +var r2 = null ** b; +>r2 : number +>null ** b : number +>null : null +>b : number + +var r3 = null ** 1; +>r3 : number +>null ** 1 : number +>null : null +>1 : number + +var r4 = null ** E.a; +>r4 : number +>null ** E.a : number +>null : null +>E.a : E +>E : typeof E +>a : E + +var r5 = a ** null; +>r5 : number +>a ** null : number +>a : any +>null : null + +var r6 = b ** null; +>r6 : number +>b ** null : number +>b : number +>null : null + +var r7 = 0 ** null; +>r7 : number +>0 ** null : number +>0 : number +>null : null + +var r8 = E.b ** null; +>r8 : number +>E.b ** null : number +>E.b : E +>E : typeof E +>b : E +>null : null + diff --git a/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.errors.txt b/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.errors.txt new file mode 100644 index 00000000000..86f4930e77c --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.errors.txt @@ -0,0 +1,33 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(2,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(2,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(3,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(3,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(4,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(4,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(5,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts(5,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts (8 errors) ==== + // operator ** + var r1 = null ** null; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r2 = null ** undefined; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r3 = undefined ** null; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r4 = undefined ** undefined; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.js b/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.js new file mode 100644 index 00000000000..86b775cd82b --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithOnlyNullValueOrUndefinedValue.js @@ -0,0 +1,14 @@ +//// [exponentiationOperatorWithOnlyNullValueOrUndefinedValue.ts] +// operator ** +var r1 = null ** null; +var r2 = null ** undefined; +var r3 = undefined ** null; +var r4 = undefined ** undefined; + + +//// [exponentiationOperatorWithOnlyNullValueOrUndefinedValue.js] +// operator ** +var r1 = Math.pow(null, null); +var r2 = Math.pow(null, undefined); +var r3 = Math.pow(undefined, null); +var r4 = Math.pow(undefined, undefined); diff --git a/tests/baselines/reference/exponentiationOperatorWithTypeParameter.errors.txt b/tests/baselines/reference/exponentiationOperatorWithTypeParameter.errors.txt new file mode 100644 index 00000000000..46fd0832468 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithTypeParameter.errors.txt @@ -0,0 +1,77 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(9,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(10,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(11,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(11,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(12,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(12,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(13,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(14,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(15,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(15,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(16,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(16,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(17,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(17,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(18,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(18,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(19,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts(19,21): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTypeParameter.ts (18 errors) ==== + // type parameter type is not valid for arithmetic operand + function foo(t: T) { + var a: any; + var b: boolean; + var c: number; + var d: string; + var e: {}; + + var r1a1 = a ** t; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r2a1 = t ** a; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b1 = b ** t; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r2b1 = t ** b; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1c1 = c ** t; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r2c1 = t ** c; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d1 = d ** t; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r2d1 = t ** d; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1e1 = e ** t; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r2e1 = t ** d; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1f1 = t ** t; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + } \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithTypeParameter.js b/tests/baselines/reference/exponentiationOperatorWithTypeParameter.js new file mode 100644 index 00000000000..45eb12ac331 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithTypeParameter.js @@ -0,0 +1,42 @@ +//// [exponentiationOperatorWithTypeParameter.ts] +// type parameter type is not valid for arithmetic operand +function foo(t: T) { + var a: any; + var b: boolean; + var c: number; + var d: string; + var e: {}; + + var r1a1 = a ** t; + var r2a1 = t ** a; + var r1b1 = b ** t; + var r2b1 = t ** b; + var r1c1 = c ** t; + var r2c1 = t ** c; + var r1d1 = d ** t; + var r2d1 = t ** d; + var r1e1 = e ** t; + var r2e1 = t ** d; + var r1f1 = t ** t; +} + +//// [exponentiationOperatorWithTypeParameter.js] +// type parameter type is not valid for arithmetic operand +function foo(t) { + var a; + var b; + var c; + var d; + var e; + var r1a1 = Math.pow(a, t); + var r2a1 = Math.pow(t, a); + var r1b1 = Math.pow(b, t); + var r2b1 = Math.pow(t, b); + var r1c1 = Math.pow(c, t); + var r2c1 = Math.pow(t, c); + var r1d1 = Math.pow(d, t); + var r2d1 = Math.pow(t, d); + var r1e1 = Math.pow(e, t); + var r2e1 = Math.pow(t, d); + var r1f1 = Math.pow(t, t); +} diff --git a/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.errors.txt new file mode 100644 index 00000000000..f456e0f554f --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.errors.txt @@ -0,0 +1,98 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(9,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(9,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(10,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(10,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(11,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(11,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(13,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(13,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(14,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(14,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(15,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(15,17): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(17,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(17,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(18,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(18,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(19,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(19,25): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(21,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(21,20): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(22,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(22,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(23,12): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts(23,18): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts (24 errors) ==== + // If one operand is the undefined or undefined value, it is treated as having the type of the + // other operand. + + var a: boolean; + var b: string; + var c: Object; + + // operator ** + var r1a1 = undefined ** a; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1a2 = undefined ** b; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1a3 = undefined ** c; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1b1 = a ** undefined; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b2 = b ** undefined; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1b3 = c ** undefined; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1c1 = undefined ** true; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1c2 = undefined ** ''; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1c3 = undefined ** {}; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var r1d1 = true ** undefined; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d2 = '' ** undefined; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var r1d3 = {} ** undefined; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.js b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.js new file mode 100644 index 00000000000..89a7c6910b5 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndInvalidOperands.js @@ -0,0 +1,44 @@ +//// [exponentiationOperatorWithUndefinedValueAndInvalidOperands.ts] +// If one operand is the undefined or undefined value, it is treated as having the type of the +// other operand. + +var a: boolean; +var b: string; +var c: Object; + +// operator ** +var r1a1 = undefined ** a; +var r1a2 = undefined ** b; +var r1a3 = undefined ** c; + +var r1b1 = a ** undefined; +var r1b2 = b ** undefined; +var r1b3 = c ** undefined; + +var r1c1 = undefined ** true; +var r1c2 = undefined ** ''; +var r1c3 = undefined ** {}; + +var r1d1 = true ** undefined; +var r1d2 = '' ** undefined; +var r1d3 = {} ** undefined; + +//// [exponentiationOperatorWithUndefinedValueAndInvalidOperands.js] +// If one operand is the undefined or undefined value, it is treated as having the type of the +// other operand. +var a; +var b; +var c; +// operator ** +var r1a1 = Math.pow(undefined, a); +var r1a2 = Math.pow(undefined, b); +var r1a3 = Math.pow(undefined, c); +var r1b1 = Math.pow(a, undefined); +var r1b2 = Math.pow(b, undefined); +var r1b3 = Math.pow(c, undefined); +var r1c1 = Math.pow(undefined, true); +var r1c2 = Math.pow(undefined, ''); +var r1c3 = Math.pow(undefined, {}); +var r1d1 = Math.pow(true, undefined); +var r1d2 = Math.pow('', undefined); +var r1d3 = Math.pow({}, undefined); diff --git a/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.js b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.js new file mode 100644 index 00000000000..0f9d04faaa2 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.js @@ -0,0 +1,41 @@ +//// [exponentiationOperatorWithUndefinedValueAndValidOperands.ts] +// If one operand is the undefined or undefined value, it is treated as having the type of the +// other operand. + +enum E { + a, + b +} + +var a: any; +var b: number; + +// operator * +var rk1 = undefined ** a; +var rk2 = undefined ** b; +var rk3 = undefined ** 1; +var rk4 = undefined ** E.a; +var rk5 = a ** undefined; +var rk6 = b ** undefined; +var rk7 = 0 ** undefined; +var rk8 = E.b ** undefined; + +//// [exponentiationOperatorWithUndefinedValueAndValidOperands.js] +// If one operand is the undefined or undefined value, it is treated as having the type of the +// other operand. +var E; +(function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; +})(E || (E = {})); +var a; +var b; +// operator * +var rk1 = Math.pow(undefined, a); +var rk2 = Math.pow(undefined, b); +var rk3 = Math.pow(undefined, 1); +var rk4 = Math.pow(undefined, E.a); +var rk5 = Math.pow(a, undefined); +var rk6 = Math.pow(b, undefined); +var rk7 = Math.pow(0, undefined); +var rk8 = Math.pow(E.b, undefined); diff --git a/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.symbols b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.symbols new file mode 100644 index 00000000000..e15ccecf70e --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.symbols @@ -0,0 +1,63 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts === +// If one operand is the undefined or undefined value, it is treated as having the type of the +// other operand. + +enum E { +>E : Symbol(E, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 0, 0)) + + a, +>a : Symbol(E.a, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 3, 8)) + + b +>b : Symbol(E.b, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 4, 6)) +} + +var a: any; +>a : Symbol(a, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) + +var b: number; +>b : Symbol(b, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) + +// operator * +var rk1 = undefined ** a; +>rk1 : Symbol(rk1, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 12, 3)) +>undefined : Symbol(undefined) +>a : Symbol(a, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) + +var rk2 = undefined ** b; +>rk2 : Symbol(rk2, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 13, 3)) +>undefined : Symbol(undefined) +>b : Symbol(b, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) + +var rk3 = undefined ** 1; +>rk3 : Symbol(rk3, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 14, 3)) +>undefined : Symbol(undefined) + +var rk4 = undefined ** E.a; +>rk4 : Symbol(rk4, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 15, 3)) +>undefined : Symbol(undefined) +>E.a : Symbol(E.a, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 3, 8)) +>E : Symbol(E, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 0, 0)) +>a : Symbol(E.a, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 3, 8)) + +var rk5 = a ** undefined; +>rk5 : Symbol(rk5, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 16, 3)) +>a : Symbol(a, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 8, 3)) +>undefined : Symbol(undefined) + +var rk6 = b ** undefined; +>rk6 : Symbol(rk6, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 17, 3)) +>b : Symbol(b, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 9, 3)) +>undefined : Symbol(undefined) + +var rk7 = 0 ** undefined; +>rk7 : Symbol(rk7, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 18, 3)) +>undefined : Symbol(undefined) + +var rk8 = E.b ** undefined; +>rk8 : Symbol(rk8, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 19, 3)) +>E.b : Symbol(E.b, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 4, 6)) +>E : Symbol(E, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 0, 0)) +>b : Symbol(E.b, Decl(exponentiationOperatorWithUndefinedValueAndValidOperands.ts, 4, 6)) +>undefined : Symbol(undefined) + diff --git a/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.types b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.types new file mode 100644 index 00000000000..4e44144511e --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithUndefinedValueAndValidOperands.types @@ -0,0 +1,73 @@ +=== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithUndefinedValueAndValidOperands.ts === +// If one operand is the undefined or undefined value, it is treated as having the type of the +// other operand. + +enum E { +>E : E + + a, +>a : E + + b +>b : E +} + +var a: any; +>a : any + +var b: number; +>b : number + +// operator * +var rk1 = undefined ** a; +>rk1 : number +>undefined ** a : number +>undefined : undefined +>a : any + +var rk2 = undefined ** b; +>rk2 : number +>undefined ** b : number +>undefined : undefined +>b : number + +var rk3 = undefined ** 1; +>rk3 : number +>undefined ** 1 : number +>undefined : undefined +>1 : number + +var rk4 = undefined ** E.a; +>rk4 : number +>undefined ** E.a : number +>undefined : undefined +>E.a : E +>E : typeof E +>a : E + +var rk5 = a ** undefined; +>rk5 : number +>a ** undefined : number +>a : any +>undefined : undefined + +var rk6 = b ** undefined; +>rk6 : number +>b ** undefined : number +>b : number +>undefined : undefined + +var rk7 = 0 ** undefined; +>rk7 : number +>0 ** undefined : number +>0 : number +>undefined : undefined + +var rk8 = E.b ** undefined; +>rk8 : number +>E.b ** undefined : number +>E.b : E +>E : typeof E +>b : E +>undefined : undefined + From a3f5666a803176fa575a7f27f6045188ffd6ec95 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 21 Sep 2015 16:47:23 -0700 Subject: [PATCH 011/121] remove unnecessary union --- src/compiler/types.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index b8002903586..32e4afed5b5 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -704,8 +704,6 @@ namespace ts { contextualType?: Type; // Used to temporarily assign a contextual type during overload resolution } - export type UnaryOrBinaryExpression = UnaryExpression | BinaryExpression; - export interface UnaryExpression extends Expression { _unaryExpressionBrand: any; } @@ -714,7 +712,7 @@ namespace ts { export interface PrefixUnaryExpression extends UnaryExpression { operator: SyntaxKind; - operand: UnaryOrBinaryExpression; + operand: UnaryExpression | BinaryExpression; } export interface PostfixUnaryExpression extends PostfixExpression { @@ -739,19 +737,19 @@ namespace ts { } export interface DeleteExpression extends UnaryExpression { - expression: UnaryOrBinaryExpression; + expression: UnaryExpression | BinaryExpression; } export interface TypeOfExpression extends UnaryExpression { - expression: UnaryOrBinaryExpression; + expression: UnaryExpression | BinaryExpression; } export interface VoidExpression extends UnaryExpression { - expression: UnaryOrBinaryExpression; + expression: UnaryExpression | BinaryExpression; } export interface AwaitExpression extends UnaryExpression { - expression: UnaryOrBinaryExpression; + expression: UnaryExpression | BinaryExpression; } export interface YieldExpression extends Expression { @@ -858,7 +856,7 @@ namespace ts { export interface TypeAssertion extends UnaryExpression { type: TypeNode; - expression: UnaryOrBinaryExpression; + expression: UnaryExpression | BinaryExpression; } export type AssertionExpression = TypeAssertion | AsExpression; From df18dfcaaed959ea39e0d25233f8d0d138fb5370 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 25 Sep 2015 14:38:08 -0700 Subject: [PATCH 012/121] Address PR --- src/compiler/parser.ts | 31 ++++++++++++++++++++++++++----- src/compiler/types.ts | 13 ++++++++----- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 236a07d2248..aaf460f33cc 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3015,11 +3015,31 @@ namespace ts { let newPrecedence = getBinaryOperatorPrecedence(); // Check the precedence to see if we should "take" this operator - if (token === SyntaxKind.AsteriskAsteriskToken && newPrecedence < precedence) { - // ** operator is right-assocative - break; - } - else if (token !== SyntaxKind.AsteriskAsteriskToken && newPrecedence <= precedence) { + // - For left associative operator (all operator but **), only consume the operator + // , recursively call the function below and parse binaryExpression as a rightOperand + // of the caller if the new precendence of the operator is greater then or equal to the current precendence. + // For example: + // a - b - c; + // ^token; leftOperand = b. Return b to the caller as a rightOperand + // a * b - c + // ^token; leftOperand = b. Return b to the caller as a rightOperand + // a - b * c; + // ^token; leftOperand = b. Return b * c to the caller as a rightOperand + // - For right associative operator (**), only consume the operator, recursively call the function + // and parse binaryExpression as a rightOperand of the caller if the new precendence of + // the operator is strictly grater than the current precendence + // For example: + // a ** b ** c; + // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand + // a - b ** c; + // ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand + // a ** b - c + // ^token; leftOperand = b. Return b to the caller as a rightOperand + const consumeCurrentOperator = token === SyntaxKind.AsteriskAsteriskToken ? + newPrecedence >= precedence : + newPrecedence > precedence; + + if (!consumeCurrentOperator) { break; } @@ -3226,6 +3246,7 @@ namespace ts { * 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- * 4) ++LeftHandSideExpression[?yield] * 5) --LeftHandSideExpression[?yield] + * In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression */ function parseIncrementExpression(): IncrementExpression { if (token === SyntaxKind.PlusPlusToken || token === SyntaxKind.MinusMinusToken) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 32e4afed5b5..e885aa2b7f4 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -707,15 +707,18 @@ namespace ts { export interface UnaryExpression extends Expression { _unaryExpressionBrand: any; } + + export interface IncrementExpression extends UnaryExpression { + _incrementExpressionBrand: any; + } + //export type IncrementExpression = PrefixUnaryExpression | PostfixUnaryExpression | LeftHandSideExpression; - export interface IncrementExpression extends UnaryExpression { } - - export interface PrefixUnaryExpression extends UnaryExpression { + export interface PrefixUnaryExpression extends IncrementExpression { operator: SyntaxKind; operand: UnaryExpression | BinaryExpression; } - export interface PostfixUnaryExpression extends PostfixExpression { + export interface PostfixUnaryExpression extends IncrementExpression { operand: LeftHandSideExpression; operator: SyntaxKind; } @@ -724,7 +727,7 @@ namespace ts { _postfixExpressionBrand: any; } - export interface LeftHandSideExpression extends PostfixExpression { + export interface LeftHandSideExpression extends IncrementExpression { _leftHandSideExpressionBrand: any; } From 9a85ad6a4eac71150923b3406a3db7500574d102 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 30 Sep 2015 09:10:56 +0200 Subject: [PATCH 013/121] Fixed #5032: tsserver: Format on type broken --- src/server/session.ts | 73 +++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/src/server/session.ts b/src/server/session.ts index da044e7b4c6..7a95f6d75e9 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -17,10 +17,25 @@ namespace ts.server { strBuilder += " "; } spaceCache[n] = strBuilder; - } + } return spaceCache[n]; } + export function generateIndentString(n: number, editorOptions: EditorOptions): string { + if (editorOptions.ConvertTabsToSpaces) { + return generateSpaces(n); + } else { + var result = ""; + for (var i = 0; i < Math.floor(n / editorOptions.TabSize); i++) { + result += "\t"; + } + for (var i = 0; i < n % editorOptions.TabSize; i++) { + result += " "; + } + return result; + } + } + interface FileStart { file: string; start: ILineInfo; @@ -51,7 +66,7 @@ namespace ts.server { return 1; } } - + function formatDiag(fileName: string, project: Project, diag: ts.Diagnostic) { return { start: project.compilerService.host.positionToLineOffset(fileName, diag.start), @@ -104,7 +119,7 @@ namespace ts.server { export const Unknown = "unknown"; } - module Errors { + module Errors { export var NoProject = new Error("No Project."); } @@ -121,9 +136,9 @@ namespace ts.server { private changeSeq = 0; constructor( - private host: ServerHost, - private byteLength: (buf: string, encoding?: string) => number, - private hrtime: (start?: number[]) => number[], + private host: ServerHost, + private byteLength: (buf: string, encoding?: string) => number, + private hrtime: (start?: number[]) => number[], private logger: Logger ) { this.projectService = @@ -227,7 +242,7 @@ namespace ts.server { this.syntacticCheck(file, project); this.semanticCheck(file, project); } - + private reloadProjects() { this.projectService.reloadProjects(); } @@ -360,9 +375,9 @@ namespace ts.server { let { compilerService } = project; let position = compilerService.host.lineOffsetToPosition(fileName, line, offset); - + let documentHighlights = compilerService.languageService.getDocumentHighlights(fileName, position, filesToSearch); - + if (!documentHighlights) { return undefined; } @@ -557,7 +572,7 @@ namespace ts.server { var compilerService = project.compilerService; var startPosition = compilerService.host.lineOffsetToPosition(file, line, offset); var endPosition = compilerService.host.lineOffsetToPosition(file, endLine, endOffset); - + // TODO: avoid duplicate code (with formatonkey) var edits = compilerService.languageService.getFormattingEditsForRange(file, startPosition, endPosition, this.projectService.getFormatCodeOptions(file)); @@ -607,27 +622,25 @@ namespace ts.server { NewLineCharacter: "\n", ConvertTabsToSpaces: formatOptions.ConvertTabsToSpaces, }; - var indentPosition = - compilerService.languageService.getIndentationAtPosition(file, position, editorOptions); + var preferredIndent = compilerService.languageService.getIndentationAtPosition(file, position, editorOptions); + var hasIndent = 0; for (var i = 0, len = lineText.length; i < len; i++) { if (lineText.charAt(i) == " ") { - indentPosition--; + hasIndent++; } else if (lineText.charAt(i) == "\t") { - indentPosition -= editorOptions.IndentSize; + hasIndent += editorOptions.TabSize; } else { break; } } - if (indentPosition > 0) { - var spaces = generateSpaces(indentPosition); - edits.push({ span: ts.createTextSpanFromBounds(position, position), newText: spaces }); - } - else if (indentPosition < 0) { + // i points to the first non whitespace character + if (preferredIndent !== hasIndent) { + var firstNoWhiteSpacePosition = lineInfo.offset + i; edits.push({ - span: ts.createTextSpanFromBounds(position, position - indentPosition), - newText: "" + span: ts.createTextSpanFromBounds(lineInfo.offset, firstNoWhiteSpacePosition), + newText: generateIndentString(preferredIndent, editorOptions) }); } } @@ -702,14 +715,14 @@ namespace ts.server { if (!project) { throw Errors.NoProject; } - + var compilerService = project.compilerService; var position = compilerService.host.lineOffsetToPosition(file, line, offset); var helpItems = compilerService.languageService.getSignatureHelpItems(file, position); if (!helpItems) { return undefined; } - + var span = helpItems.applicableSpan; var result: protocol.SignatureHelpItems = { items: helpItems.items, @@ -721,10 +734,10 @@ namespace ts.server { argumentIndex: helpItems.argumentIndex, argumentCount: helpItems.argumentCount, } - + return result; } - + private getDiagnostics(delay: number, fileNames: string[]) { var checkList = fileNames.reduce((accum: PendingErrorCheck[], fileName: string) => { fileName = ts.normalizePath(fileName); @@ -859,20 +872,20 @@ namespace ts.server { private getBraceMatching(line: number, offset: number, fileName: string): protocol.TextSpan[] { var file = ts.normalizePath(fileName); - + var project = this.projectService.getProjectForFile(file); if (!project) { throw Errors.NoProject; } - + var compilerService = project.compilerService; var position = compilerService.host.lineOffsetToPosition(file, line, offset); - + var spans = compilerService.languageService.getBraceMatchingAtPosition(file, position); if (!spans) { return undefined; } - + return spans.map(span => ({ start: compilerService.host.positionToLineOffset(file, span.start), end: compilerService.host.positionToLineOffset(file, span.start + span.length) @@ -1064,7 +1077,7 @@ namespace ts.server { public onMessage(message: string) { if (this.logger.isVerbose()) { this.logger.info("request: " + message); - var start = this.hrtime(); + var start = this.hrtime(); } try { var request = JSON.parse(message); From 2f8e4fa6bd1697c6ec82afc269ee7a51640ce78f Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 30 Sep 2015 09:18:50 +0200 Subject: [PATCH 014/121] Fixed unnecessay whitespace changes --- src/server/session.ts | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/server/session.ts b/src/server/session.ts index 7a95f6d75e9..41a0e409d57 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -17,7 +17,7 @@ namespace ts.server { strBuilder += " "; } spaceCache[n] = strBuilder; - } + } return spaceCache[n]; } @@ -35,7 +35,7 @@ namespace ts.server { return result; } } - + interface FileStart { file: string; start: ILineInfo; @@ -66,7 +66,7 @@ namespace ts.server { return 1; } } - + function formatDiag(fileName: string, project: Project, diag: ts.Diagnostic) { return { start: project.compilerService.host.positionToLineOffset(fileName, diag.start), @@ -119,7 +119,7 @@ namespace ts.server { export const Unknown = "unknown"; } - module Errors { + module Errors { export var NoProject = new Error("No Project."); } @@ -136,9 +136,9 @@ namespace ts.server { private changeSeq = 0; constructor( - private host: ServerHost, - private byteLength: (buf: string, encoding?: string) => number, - private hrtime: (start?: number[]) => number[], + private host: ServerHost, + private byteLength: (buf: string, encoding?: string) => number, + private hrtime: (start?: number[]) => number[], private logger: Logger ) { this.projectService = @@ -242,7 +242,7 @@ namespace ts.server { this.syntacticCheck(file, project); this.semanticCheck(file, project); } - + private reloadProjects() { this.projectService.reloadProjects(); } @@ -375,9 +375,9 @@ namespace ts.server { let { compilerService } = project; let position = compilerService.host.lineOffsetToPosition(fileName, line, offset); - + let documentHighlights = compilerService.languageService.getDocumentHighlights(fileName, position, filesToSearch); - + if (!documentHighlights) { return undefined; } @@ -572,7 +572,7 @@ namespace ts.server { var compilerService = project.compilerService; var startPosition = compilerService.host.lineOffsetToPosition(file, line, offset); var endPosition = compilerService.host.lineOffsetToPosition(file, endLine, endOffset); - + // TODO: avoid duplicate code (with formatonkey) var edits = compilerService.languageService.getFormattingEditsForRange(file, startPosition, endPosition, this.projectService.getFormatCodeOptions(file)); @@ -715,14 +715,14 @@ namespace ts.server { if (!project) { throw Errors.NoProject; } - + var compilerService = project.compilerService; var position = compilerService.host.lineOffsetToPosition(file, line, offset); var helpItems = compilerService.languageService.getSignatureHelpItems(file, position); if (!helpItems) { return undefined; } - + var span = helpItems.applicableSpan; var result: protocol.SignatureHelpItems = { items: helpItems.items, @@ -734,10 +734,10 @@ namespace ts.server { argumentIndex: helpItems.argumentIndex, argumentCount: helpItems.argumentCount, } - + return result; } - + private getDiagnostics(delay: number, fileNames: string[]) { var checkList = fileNames.reduce((accum: PendingErrorCheck[], fileName: string) => { fileName = ts.normalizePath(fileName); @@ -872,20 +872,20 @@ namespace ts.server { private getBraceMatching(line: number, offset: number, fileName: string): protocol.TextSpan[] { var file = ts.normalizePath(fileName); - + var project = this.projectService.getProjectForFile(file); if (!project) { throw Errors.NoProject; } - + var compilerService = project.compilerService; var position = compilerService.host.lineOffsetToPosition(file, line, offset); - + var spans = compilerService.languageService.getBraceMatchingAtPosition(file, position); if (!spans) { return undefined; } - + return spans.map(span => ({ start: compilerService.host.positionToLineOffset(file, span.start), end: compilerService.host.positionToLineOffset(file, span.start + span.length) @@ -1077,7 +1077,7 @@ namespace ts.server { public onMessage(message: string) { if (this.logger.isVerbose()) { this.logger.info("request: " + message); - var start = this.hrtime(); + var start = this.hrtime(); } try { var request = JSON.parse(message); From 590569b87d25733ebf1aebf24b8812331fcf132c Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Wed, 30 Sep 2015 15:20:56 -0700 Subject: [PATCH 015/121] Handle indirect imports of JSX elements from external modules Fixes #4675 --- src/compiler/checker.ts | 4 +- tests/baselines/reference/tsxPreserveEmit1.js | 32 ++++++++++++++ .../reference/tsxPreserveEmit1.symbols | 41 ++++++++++++++++++ .../reference/tsxPreserveEmit1.types | 42 +++++++++++++++++++ .../conformance/jsx/tsxPreserveEmit1.tsx | 26 ++++++++++++ 5 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/tsxPreserveEmit1.js create mode 100644 tests/baselines/reference/tsxPreserveEmit1.symbols create mode 100644 tests/baselines/reference/tsxPreserveEmit1.types create mode 100644 tests/cases/conformance/jsx/tsxPreserveEmit1.tsx diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d57f9eaed1b..c4da6e3d320 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7463,7 +7463,9 @@ namespace ts { // Look up the value in the current scope if (valueSymbol && valueSymbol !== unknownSymbol) { links.jsxFlags |= JsxFlags.ClassElement; - getSymbolLinks(valueSymbol).referenced = true; + if (valueSymbol.flags & SymbolFlags.Alias) { + markAliasSymbolAsReferenced(valueSymbol); + } } return valueSymbol || unknownSymbol; diff --git a/tests/baselines/reference/tsxPreserveEmit1.js b/tests/baselines/reference/tsxPreserveEmit1.js new file mode 100644 index 00000000000..80aeef6b297 --- /dev/null +++ b/tests/baselines/reference/tsxPreserveEmit1.js @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/jsx/tsxPreserveEmit1.tsx] //// + +//// [react.d.ts] + +declare module 'react' { + var x: any; + export = x; +} + +declare module ReactRouter { + var Route: any; + interface Thing { } +} +declare module 'react-router' { + export = ReactRouter; +} + +//// [test.tsx] +// Should emit 'react-router' in the AMD dependency list +import React = require('react'); +import ReactRouter = require('react-router'); + +import Route = ReactRouter.Route; + +var routes = ; + + +//// [test.jsx] +define(["require", "exports", 'react-router'], function (require, exports, ReactRouter) { + var Route = ReactRouter.Route; + var routes = ; +}); diff --git a/tests/baselines/reference/tsxPreserveEmit1.symbols b/tests/baselines/reference/tsxPreserveEmit1.symbols new file mode 100644 index 00000000000..6dcf4d9ac49 --- /dev/null +++ b/tests/baselines/reference/tsxPreserveEmit1.symbols @@ -0,0 +1,41 @@ +=== tests/cases/conformance/jsx/test.tsx === +// Should emit 'react-router' in the AMD dependency list +import React = require('react'); +>React : Symbol(React, Decl(test.tsx, 0, 0)) + +import ReactRouter = require('react-router'); +>ReactRouter : Symbol(ReactRouter, Decl(test.tsx, 1, 32)) + +import Route = ReactRouter.Route; +>Route : Symbol(Route, Decl(test.tsx, 2, 45)) +>ReactRouter : Symbol(ReactRouter, Decl(react.d.ts, 4, 1)) +>Route : Symbol(ReactRouter.Route, Decl(react.d.ts, 7, 4)) + +var routes = ; +>routes : Symbol(routes, Decl(test.tsx, 6, 3)) +>Route : Symbol(Route, Decl(test.tsx, 2, 45)) + +=== tests/cases/conformance/jsx/react.d.ts === + +declare module 'react' { + var x: any; +>x : Symbol(x, Decl(react.d.ts, 2, 4)) + + export = x; +>x : Symbol(x, Decl(react.d.ts, 2, 4)) +} + +declare module ReactRouter { +>ReactRouter : Symbol(ReactRouter, Decl(react.d.ts, 4, 1)) + + var Route: any; +>Route : Symbol(Route, Decl(react.d.ts, 7, 4)) + + interface Thing { } +>Thing : Symbol(Thing, Decl(react.d.ts, 7, 16)) +} +declare module 'react-router' { + export = ReactRouter; +>ReactRouter : Symbol(ReactRouter, Decl(react.d.ts, 4, 1)) +} + diff --git a/tests/baselines/reference/tsxPreserveEmit1.types b/tests/baselines/reference/tsxPreserveEmit1.types new file mode 100644 index 00000000000..ea64e2d2e94 --- /dev/null +++ b/tests/baselines/reference/tsxPreserveEmit1.types @@ -0,0 +1,42 @@ +=== tests/cases/conformance/jsx/test.tsx === +// Should emit 'react-router' in the AMD dependency list +import React = require('react'); +>React : any + +import ReactRouter = require('react-router'); +>ReactRouter : typeof ReactRouter + +import Route = ReactRouter.Route; +>Route : any +>ReactRouter : typeof ReactRouter +>Route : any + +var routes = ; +>routes : any +> : any +>Route : any + +=== tests/cases/conformance/jsx/react.d.ts === + +declare module 'react' { + var x: any; +>x : any + + export = x; +>x : any +} + +declare module ReactRouter { +>ReactRouter : typeof ReactRouter + + var Route: any; +>Route : any + + interface Thing { } +>Thing : Thing +} +declare module 'react-router' { + export = ReactRouter; +>ReactRouter : typeof ReactRouter +} + diff --git a/tests/cases/conformance/jsx/tsxPreserveEmit1.tsx b/tests/cases/conformance/jsx/tsxPreserveEmit1.tsx new file mode 100644 index 00000000000..e75a1dbfde2 --- /dev/null +++ b/tests/cases/conformance/jsx/tsxPreserveEmit1.tsx @@ -0,0 +1,26 @@ +//@module: amd +//@jsx: preserve +//@target: ES5 + +//@Filename: react.d.ts +declare module 'react' { + var x: any; + export = x; +} + +declare module ReactRouter { + var Route: any; + interface Thing { } +} +declare module 'react-router' { + export = ReactRouter; +} + +//@Filename: test.tsx +// Should emit 'react-router' in the AMD dependency list +import React = require('react'); +import ReactRouter = require('react-router'); + +import Route = ReactRouter.Route; + +var routes = ; From de902e2c6e09ab099786a2617608856d8e017972 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 30 Sep 2015 13:41:03 -0700 Subject: [PATCH 016/121] Remove MS specific types from lib.d.ts --- src/lib/dom.generated.d.ts | 492 ------------------------------- src/lib/webworker.generated.d.ts | 48 --- 2 files changed, 540 deletions(-) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index e34ce36633f..961be2aa48d 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -480,7 +480,6 @@ interface Blob { size: number; type: string; msClose(): void; - msDetachStream(): any; slice(start?: number, end?: number, contentType?: string): Blob; } @@ -1523,19 +1522,6 @@ declare var DataTransferItemList: { new(): DataTransferItemList; } -interface DeferredPermissionRequest { - id: number; - type: string; - uri: string; - allow(): void; - deny(): void; -} - -declare var DeferredPermissionRequest: { - prototype: DeferredPermissionRequest; - new(): DeferredPermissionRequest; -} - interface DelayNode extends AudioNode { delayTime: AudioParam; } @@ -2190,7 +2176,6 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven createElement(tagName: "ul"): HTMLUListElement; createElement(tagName: "var"): HTMLPhraseElement; createElement(tagName: "video"): HTMLVideoElement; - createElement(tagName: "x-ms-webview"): MSHTMLWebViewElement; createElement(tagName: "xmp"): HTMLBlockElement; createElement(tagName: string): HTMLElement; createElementNS(namespaceURI: string, qualifiedName: string): Element; @@ -2435,7 +2420,6 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven getElementsByTagName(tagname: "video"): NodeListOf; getElementsByTagName(tagname: "view"): NodeListOf; getElementsByTagName(tagname: "wbr"): NodeListOf; - getElementsByTagName(tagname: "x-ms-webview"): NodeListOf; getElementsByTagName(tagname: "xmp"): NodeListOf; getElementsByTagName(tagname: string): NodeListOf; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf; @@ -2450,8 +2434,6 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven importNode(importedNode: Node, deep: boolean): Node; msElementsFromPoint(x: number, y: number): NodeList; msElementsFromRect(left: number, top: number, width: number, height: number): NodeList; - msGetPrintDocumentForNamedFlow(flowName: string): Document; - msSetPrintDocumentUriForNamedFlow(flowName: string, uri: string): void; /** * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method. * @param url Specifies a MIME type for the document. @@ -2890,7 +2872,6 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec getElementsByTagName(name: "video"): NodeListOf; getElementsByTagName(name: "view"): NodeListOf; getElementsByTagName(name: "wbr"): NodeListOf; - getElementsByTagName(name: "x-ms-webview"): NodeListOf; getElementsByTagName(name: "xmp"): NodeListOf; getElementsByTagName(name: string): NodeListOf; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf; @@ -4038,10 +4019,6 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument { * Gets or sets the primary DLNA PlayTo device. */ msPlayToPrimary: boolean; - /** - * Gets the source associated with the media element for use by the PlayToManager. - */ - msPlayToSource: any; /** * Sets or retrieves the name of the object. */ @@ -4842,10 +4819,6 @@ interface HTMLImageElement extends HTMLElement { * Gets or sets the primary DLNA PlayTo device. */ msPlayToPrimary: boolean; - /** - * Gets the source associated with the media element for use by the PlayToManager. - */ - msPlayToSource: any; /** * Sets or retrieves the name of the object. */ @@ -4877,7 +4850,6 @@ interface HTMLImageElement extends HTMLElement { width: number; x: number; y: number; - msGetAsCastingSource(): any; } declare var HTMLImageElement: { @@ -5393,14 +5365,6 @@ interface HTMLMediaElement extends HTMLElement { * Gets or sets a flag to specify whether playback should restart after it completes. */ loop: boolean; - /** - * Specifies the purpose of the audio or video media, such as background audio or alerts. - */ - msAudioCategory: string; - /** - * Specifies the output device id that the audio will be sent to. - */ - msAudioDeviceType: string; msGraphicsTrustStatus: MSGraphicsTrust; /** * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element. @@ -5418,14 +5382,6 @@ interface HTMLMediaElement extends HTMLElement { * Gets or sets the primary DLNA PlayTo device. */ msPlayToPrimary: boolean; - /** - * Gets the source associated with the media element for use by the PlayToManager. - */ - msPlayToSource: any; - /** - * Specifies whether or not to enable low-latency playback on the media element. - */ - msRealTime: boolean; /** * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted. */ @@ -5479,20 +5435,7 @@ interface HTMLMediaElement extends HTMLElement { * Fires immediately after the client loads the object. */ load(): void; - /** - * Clears all effects from the media pipeline. - */ - msClearEffects(): void; - msGetAsCastingSource(): any; - /** - * Inserts the specified audio effect into media pipeline. - */ - msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void; msSetMediaKeys(mediaKeys: MSMediaKeys): void; - /** - * Specifies the media protection manager for a given media pipeline. - */ - msSetMediaProtectionManager(mediaProtectionManager?: any): void; /** * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not. */ @@ -5772,10 +5715,6 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument { * Gets or sets the primary DLNA PlayTo device. */ msPlayToPrimary: boolean; - /** - * Gets the source associated with the media element for use by the PlayToManager. - */ - msPlayToSource: any; /** * Sets or retrieves the name of the object. */ @@ -6648,15 +6587,7 @@ interface HTMLVideoElement extends HTMLMediaElement { * Gets or sets the height of the video element. */ height: number; - msHorizontalMirror: boolean; - msIsLayoutOptimalForPlayback: boolean; - msIsStereo3D: boolean; - msStereo3DPackingMode: string; - msStereo3DRenderMode: string; msZoom: boolean; - onMSVideoFormatChanged: (ev: Event) => any; - onMSVideoFrameStepCompleted: (ev: Event) => any; - onMSVideoOptimalLayoutChanged: (ev: Event) => any; /** * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available. */ @@ -6676,120 +6607,10 @@ interface HTMLVideoElement extends HTMLMediaElement { */ width: number; getVideoPlaybackQuality(): VideoPlaybackQuality; - msFrameStep(forward: boolean): void; - msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void; - msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void; webkitEnterFullScreen(): void; webkitEnterFullscreen(): void; webkitExitFullScreen(): void; webkitExitFullscreen(): void; - addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "MSVideoFormatChanged", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "MSVideoFrameStepCompleted", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "MSVideoOptimalLayoutChanged", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; - addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; - addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; - addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; - addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void; - addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; - addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; - addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; - addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; - addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } declare var HTMLVideoElement: { @@ -7079,62 +6900,6 @@ declare var Location: { new(): Location; } -interface LongRunningScriptDetectedEvent extends Event { - executionTime: number; - stopPageScriptExecution: boolean; -} - -declare var LongRunningScriptDetectedEvent: { - prototype: LongRunningScriptDetectedEvent; - new(): LongRunningScriptDetectedEvent; -} - -interface MSApp { - clearTemporaryWebDataAsync(): MSAppAsyncOperation; - createBlobFromRandomAccessStream(type: string, seeker: any): Blob; - createDataPackage(object: any): any; - createDataPackageFromSelection(): any; - createFileFromStorageFile(storageFile: any): File; - createStreamFromInputStream(type: string, inputStream: any): MSStream; - execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void; - execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any; - getCurrentPriority(): string; - getHtmlPrintDocumentSourceAsync(htmlDoc: any): any; - getViewId(view: any): any; - isTaskScheduledAtPriorityOrHigher(priority: string): boolean; - pageHandlesAllApplicationActivations(enabled: boolean): void; - suppressSubdownloadCredentialPrompts(suppress: boolean): void; - terminateApp(exceptionObject: any): void; - CURRENT: string; - HIGH: string; - IDLE: string; - NORMAL: string; -} -declare var MSApp: MSApp; - -interface MSAppAsyncOperation extends EventTarget { - error: DOMError; - oncomplete: (ev: Event) => any; - onerror: (ev: Event) => any; - readyState: number; - result: any; - start(): void; - COMPLETED: number; - ERROR: number; - STARTED: number; - addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MSAppAsyncOperation: { - prototype: MSAppAsyncOperation; - new(): MSAppAsyncOperation; - COMPLETED: number; - ERROR: number; - STARTED: number; -} - interface MSBlobBuilder { append(data: any, endings?: string): void; getBlob(contentType?: string): Blob; @@ -7242,58 +7007,6 @@ declare var MSGraphicsTrust: { new(): MSGraphicsTrust; } -interface MSHTMLWebViewElement extends HTMLElement { - canGoBack: boolean; - canGoForward: boolean; - containsFullScreenElement: boolean; - documentTitle: string; - height: number; - settings: MSWebViewSettings; - src: string; - width: number; - addWebAllowedObject(name: string, applicationObject: any): void; - buildLocalStreamUri(contentIdentifier: string, relativePath: string): string; - capturePreviewToBlobAsync(): MSWebViewAsyncOperation; - captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation; - getDeferredPermissionRequestById(id: number): DeferredPermissionRequest; - getDeferredPermissionRequests(): DeferredPermissionRequest[]; - goBack(): void; - goForward(): void; - invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation; - navigate(uri: string): void; - navigateToLocalStreamUri(source: string, streamResolver: any): void; - navigateToString(contents: string): void; - navigateWithHttpRequestMessage(requestMessage: any): void; - refresh(): void; - stop(): void; -} - -declare var MSHTMLWebViewElement: { - prototype: MSHTMLWebViewElement; - new(): MSHTMLWebViewElement; -} - -interface MSHeaderFooter { - URL: string; - dateLong: string; - dateShort: string; - font: string; - htmlFoot: string; - htmlHead: string; - page: number; - pageTotal: number; - textFoot: string; - textHead: string; - timeLong: string; - timeShort: string; - title: string; -} - -declare var MSHeaderFooter: { - prototype: MSHeaderFooter; - new(): MSHeaderFooter; -} - interface MSInputMethodContext extends EventTarget { compositionEndOffset: number; compositionStartOffset: number; @@ -7430,10 +7143,8 @@ declare var MSPluginsCollection: { } interface MSPointerEvent extends MouseEvent { - currentPoint: any; height: number; hwTimestamp: number; - intermediatePoints: any; isPrimary: boolean; pointerId: number; pointerType: any; @@ -7442,7 +7153,6 @@ interface MSPointerEvent extends MouseEvent { tiltX: number; tiltY: number; width: number; - getCurrentPoint(element: Element): void; getIntermediatePoints(element: Element): void; initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void; } @@ -7452,24 +7162,6 @@ declare var MSPointerEvent: { new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent; } -interface MSPrintManagerTemplatePrinter extends MSTemplatePrinter, EventTarget { - percentScale: number; - showHeaderFooter: boolean; - shrinkToFit: boolean; - drawPreviewPage(element: HTMLElement, pageNumber: number): void; - endPrint(): void; - getPrintTaskOptionValue(key: string): any; - invalidatePreview(): void; - setPageCount(pageCount: number): void; - startPrint(): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MSPrintManagerTemplatePrinter: { - prototype: MSPrintManagerTemplatePrinter; - new(): MSPrintManagerTemplatePrinter; -} - interface MSRangeCollection { length: number; item(index: number): Range; @@ -7494,7 +7186,6 @@ declare var MSSiteModeEvent: { interface MSStream { type: string; msClose(): void; - msDetachStream(): any; } declare var MSStream: { @@ -7517,104 +7208,6 @@ declare var MSStreamReader: { new(): MSStreamReader; } -interface MSTemplatePrinter { - collate: boolean; - copies: number; - currentPage: boolean; - currentPageAvail: boolean; - duplex: boolean; - footer: string; - frameActive: boolean; - frameActiveEnabled: boolean; - frameAsShown: boolean; - framesetDocument: boolean; - header: string; - headerFooterFont: string; - marginBottom: number; - marginLeft: number; - marginRight: number; - marginTop: number; - orientation: string; - pageFrom: number; - pageHeight: number; - pageTo: number; - pageWidth: number; - selectedPages: boolean; - selection: boolean; - selectionEnabled: boolean; - unprintableBottom: number; - unprintableLeft: number; - unprintableRight: number; - unprintableTop: number; - usePrinterCopyCollate: boolean; - createHeaderFooter(): MSHeaderFooter; - deviceSupports(property: string): any; - ensurePrintDialogDefaults(): boolean; - getPageMarginBottom(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any; - getPageMarginBottomImportant(pageRule: CSSPageRule): boolean; - getPageMarginLeft(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any; - getPageMarginLeftImportant(pageRule: CSSPageRule): boolean; - getPageMarginRight(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any; - getPageMarginRightImportant(pageRule: CSSPageRule): boolean; - getPageMarginTop(pageRule: CSSPageRule, pageWidth: number, pageHeight: number): any; - getPageMarginTopImportant(pageRule: CSSPageRule): boolean; - printBlankPage(): void; - printNonNative(document: any): boolean; - printNonNativeFrames(document: any, activeFrame: boolean): void; - printPage(element: HTMLElement): void; - showPageSetupDialog(): boolean; - showPrintDialog(): boolean; - startDoc(title: string): boolean; - stopDoc(): void; - updatePageStatus(status: number): void; -} - -declare var MSTemplatePrinter: { - prototype: MSTemplatePrinter; - new(): MSTemplatePrinter; -} - -interface MSWebViewAsyncOperation extends EventTarget { - error: DOMError; - oncomplete: (ev: Event) => any; - onerror: (ev: Event) => any; - readyState: number; - result: any; - target: MSHTMLWebViewElement; - type: number; - start(): void; - COMPLETED: number; - ERROR: number; - STARTED: number; - TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number; - TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number; - TYPE_INVOKE_SCRIPT: number; - addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MSWebViewAsyncOperation: { - prototype: MSWebViewAsyncOperation; - new(): MSWebViewAsyncOperation; - COMPLETED: number; - ERROR: number; - STARTED: number; - TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number; - TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number; - TYPE_INVOKE_SCRIPT: number; -} - -interface MSWebViewSettings { - isIndexedDBEnabled: boolean; - isJavaScriptEnabled: boolean; -} - -declare var MSWebViewSettings: { - prototype: MSWebViewSettings; - new(): MSWebViewSettings; -} - interface MediaElementAudioSourceNode extends AudioNode { } @@ -7858,34 +7451,6 @@ declare var NamedNodeMap: { new(): NamedNodeMap; } -interface NavigationCompletedEvent extends NavigationEvent { - isSuccess: boolean; - webErrorStatus: number; -} - -declare var NavigationCompletedEvent: { - prototype: NavigationCompletedEvent; - new(): NavigationCompletedEvent; -} - -interface NavigationEvent extends Event { - uri: string; -} - -declare var NavigationEvent: { - prototype: NavigationEvent; - new(): NavigationEvent; -} - -interface NavigationEventWithReferrer extends NavigationEvent { - referer: string; -} - -declare var NavigationEventWithReferrer: { - prototype: NavigationEventWithReferrer; - new(): NavigationEventWithReferrer; -} - interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver { appCodeName: string; appMinorVersion: string; @@ -8322,25 +7887,6 @@ declare var PeriodicWave: { new(): PeriodicWave; } -interface PermissionRequest extends DeferredPermissionRequest { - state: string; - defer(): void; -} - -declare var PermissionRequest: { - prototype: PermissionRequest; - new(): PermissionRequest; -} - -interface PermissionRequestedEvent extends Event { - permissionRequest: PermissionRequest; -} - -declare var PermissionRequestedEvent: { - prototype: PermissionRequestedEvent; - new(): PermissionRequestedEvent; -} - interface Plugin { description: string; filename: string; @@ -8371,10 +7917,8 @@ declare var PluginArray: { } interface PointerEvent extends MouseEvent { - currentPoint: any; height: number; hwTimestamp: number; - intermediatePoints: any; isPrimary: boolean; pointerId: number; pointerType: any; @@ -8383,7 +7927,6 @@ interface PointerEvent extends MouseEvent { tiltX: number; tiltY: number; width: number; - getCurrentPoint(element: Element): void; getIntermediatePoints(element: Element): void; initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void; } @@ -10289,16 +9832,6 @@ declare var Screen: { new(): Screen; } -interface ScriptNotifyEvent extends Event { - callingUri: string; - value: string; -} - -declare var ScriptNotifyEvent: { - prototype: ScriptNotifyEvent; - new(): ScriptNotifyEvent; -} - interface ScriptProcessorNode extends AudioNode { bufferSize: number; onaudioprocess: (ev: AudioProcessingEvent) => any; @@ -10780,15 +10313,6 @@ interface URL { } declare var URL: URL; -interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer { - mediaType: string; -} - -declare var UnviewableContentIdentifiedEvent: { - prototype: UnviewableContentIdentifiedEvent; - new(): UnviewableContentIdentifiedEvent; -} - interface ValidityState { badInput: boolean; customError: boolean; @@ -11834,7 +11358,6 @@ interface WheelEvent extends MouseEvent { deltaX: number; deltaY: number; deltaZ: number; - getCurrentPoint(element: Element): void; initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void; DOM_DELTA_LINE: number; DOM_DELTA_PAGE: number; @@ -11871,7 +11394,6 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window locationbar: BarProp; menubar: BarProp; msAnimationStartTime: number; - msTemplatePrinter: MSTemplatePrinter; name: string; navigator: Navigator; offscreenBuffering: string | boolean; @@ -12333,7 +11855,6 @@ interface DocumentEvent { createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent; createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent; createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent; - createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent; createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent; createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent; createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent; @@ -12346,18 +11867,13 @@ interface DocumentEvent { createEvent(eventInterface:"MouseWheelEvent"): MouseWheelEvent; createEvent(eventInterface:"MutationEvent"): MutationEvent; createEvent(eventInterface:"MutationEvents"): MutationEvent; - createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent; - createEvent(eventInterface:"NavigationEvent"): NavigationEvent; - createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer; createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent; - createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent; createEvent(eventInterface:"PointerEvent"): PointerEvent; createEvent(eventInterface:"PopStateEvent"): PopStateEvent; createEvent(eventInterface:"ProgressEvent"): ProgressEvent; createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent; createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent; - createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent; createEvent(eventInterface:"StorageEvent"): StorageEvent; createEvent(eventInterface:"TextEvent"): TextEvent; createEvent(eventInterface:"TouchEvent"): TouchEvent; @@ -12365,7 +11881,6 @@ interface DocumentEvent { createEvent(eventInterface:"TransitionEvent"): TransitionEvent; createEvent(eventInterface:"UIEvent"): UIEvent; createEvent(eventInterface:"UIEvents"): UIEvent; - createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent; createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent; createEvent(eventInterface:"WheelEvent"): WheelEvent; createEvent(eventInterface: string): Event; @@ -12664,12 +12179,6 @@ interface MSLaunchUriCallback { interface FrameRequestCallback { (time: number): void; } -interface MSUnsafeFunctionCallback { - (): any; -} -interface MSExecAtPriorityFunctionCallback { - (...args: any[]): any; -} interface MutationCallback { (mutations: MutationRecord[], observer: MutationObserver): void; } @@ -12706,7 +12215,6 @@ declare var location: Location; declare var locationbar: BarProp; declare var menubar: BarProp; declare var msAnimationStartTime: number; -declare var msTemplatePrinter: MSTemplatePrinter; declare var name: string; declare var navigator: Navigator; declare var offscreenBuffering: string | boolean; diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index f37ea5c6ed2..f89e3b88c83 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -29,7 +29,6 @@ interface Blob { size: number; type: string; msClose(): void; - msDetachStream(): any; slice(start?: number, end?: number, contentType?: string): Blob; } @@ -473,52 +472,6 @@ interface ImageDataConstructor { declare var ImageData: ImageDataConstructor; -interface MSApp { - clearTemporaryWebDataAsync(): MSAppAsyncOperation; - createBlobFromRandomAccessStream(type: string, seeker: any): Blob; - createDataPackage(object: any): any; - createDataPackageFromSelection(): any; - createFileFromStorageFile(storageFile: any): File; - createStreamFromInputStream(type: string, inputStream: any): MSStream; - execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void; - execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any; - getCurrentPriority(): string; - getHtmlPrintDocumentSourceAsync(htmlDoc: any): any; - getViewId(view: any): any; - isTaskScheduledAtPriorityOrHigher(priority: string): boolean; - pageHandlesAllApplicationActivations(enabled: boolean): void; - suppressSubdownloadCredentialPrompts(suppress: boolean): void; - terminateApp(exceptionObject: any): void; - CURRENT: string; - HIGH: string; - IDLE: string; - NORMAL: string; -} -declare var MSApp: MSApp; - -interface MSAppAsyncOperation extends EventTarget { - error: DOMError; - oncomplete: (ev: Event) => any; - onerror: (ev: Event) => any; - readyState: number; - result: any; - start(): void; - COMPLETED: number; - ERROR: number; - STARTED: number; - addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; - addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MSAppAsyncOperation: { - prototype: MSAppAsyncOperation; - new(): MSAppAsyncOperation; - COMPLETED: number; - ERROR: number; - STARTED: number; -} - interface MSBlobBuilder { append(data: any, endings?: string): void; getBlob(contentType?: string): Blob; @@ -532,7 +485,6 @@ declare var MSBlobBuilder: { interface MSStream { type: string; msClose(): void; - msDetachStream(): any; } declare var MSStream: { From 1860f4358e64d9c97c6f5b9008d2287689f55267 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Thu, 1 Oct 2015 10:07:11 -0700 Subject: [PATCH 017/121] Add msapp content back, only remove the internal content --- src/lib/dom.generated.d.ts | 392 +++++++++++++++++++++++++++++++ src/lib/webworker.generated.d.ts | 48 ++++ 2 files changed, 440 insertions(+) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 961be2aa48d..3f3e598fb18 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -480,6 +480,7 @@ interface Blob { size: number; type: string; msClose(): void; + msDetachStream(): any; slice(start?: number, end?: number, contentType?: string): Blob; } @@ -1522,6 +1523,19 @@ declare var DataTransferItemList: { new(): DataTransferItemList; } +interface DeferredPermissionRequest { + id: number; + type: string; + uri: string; + allow(): void; + deny(): void; +} + +declare var DeferredPermissionRequest: { + prototype: DeferredPermissionRequest; + new(): DeferredPermissionRequest; +} + interface DelayNode extends AudioNode { delayTime: AudioParam; } @@ -2176,6 +2190,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven createElement(tagName: "ul"): HTMLUListElement; createElement(tagName: "var"): HTMLPhraseElement; createElement(tagName: "video"): HTMLVideoElement; + createElement(tagName: "x-ms-webview"): MSHTMLWebViewElement; createElement(tagName: "xmp"): HTMLBlockElement; createElement(tagName: string): HTMLElement; createElementNS(namespaceURI: string, qualifiedName: string): Element; @@ -2420,6 +2435,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven getElementsByTagName(tagname: "video"): NodeListOf; getElementsByTagName(tagname: "view"): NodeListOf; getElementsByTagName(tagname: "wbr"): NodeListOf; + getElementsByTagName(tagname: "x-ms-webview"): NodeListOf; getElementsByTagName(tagname: "xmp"): NodeListOf; getElementsByTagName(tagname: string): NodeListOf; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf; @@ -2872,6 +2888,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec getElementsByTagName(name: "video"): NodeListOf; getElementsByTagName(name: "view"): NodeListOf; getElementsByTagName(name: "wbr"): NodeListOf; + getElementsByTagName(name: "x-ms-webview"): NodeListOf; getElementsByTagName(name: "xmp"): NodeListOf; getElementsByTagName(name: string): NodeListOf; getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf; @@ -4019,6 +4036,10 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument { * Gets or sets the primary DLNA PlayTo device. */ msPlayToPrimary: boolean; + /** + * Gets the source associated with the media element for use by the PlayToManager. + */ + msPlayToSource: any; /** * Sets or retrieves the name of the object. */ @@ -4819,6 +4840,10 @@ interface HTMLImageElement extends HTMLElement { * Gets or sets the primary DLNA PlayTo device. */ msPlayToPrimary: boolean; + /** + * Gets the source associated with the media element for use by the PlayToManager. + */ + msPlayToSource: any; /** * Sets or retrieves the name of the object. */ @@ -4850,6 +4875,7 @@ interface HTMLImageElement extends HTMLElement { width: number; x: number; y: number; + msGetAsCastingSource(): any; } declare var HTMLImageElement: { @@ -5365,6 +5391,14 @@ interface HTMLMediaElement extends HTMLElement { * Gets or sets a flag to specify whether playback should restart after it completes. */ loop: boolean; + /** + * Specifies the purpose of the audio or video media, such as background audio or alerts. + */ + msAudioCategory: string; + /** + * Specifies the output device id that the audio will be sent to. + */ + msAudioDeviceType: string; msGraphicsTrustStatus: MSGraphicsTrust; /** * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element. @@ -5382,6 +5416,14 @@ interface HTMLMediaElement extends HTMLElement { * Gets or sets the primary DLNA PlayTo device. */ msPlayToPrimary: boolean; + /** + * Gets the source associated with the media element for use by the PlayToManager. + */ + msPlayToSource: any; + /** + * Specifies whether or not to enable low-latency playback on the media element. + */ + msRealTime: boolean; /** * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted. */ @@ -5435,7 +5477,20 @@ interface HTMLMediaElement extends HTMLElement { * Fires immediately after the client loads the object. */ load(): void; + /** + * Clears all effects from the media pipeline. + */ + msClearEffects(): void; + msGetAsCastingSource(): any; + /** + * Inserts the specified audio effect into media pipeline. + */ + msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void; msSetMediaKeys(mediaKeys: MSMediaKeys): void; + /** + * Specifies the media protection manager for a given media pipeline. + */ + msSetMediaProtectionManager(mediaProtectionManager?: any): void; /** * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not. */ @@ -5715,6 +5770,10 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument { * Gets or sets the primary DLNA PlayTo device. */ msPlayToPrimary: boolean; + /** + * Gets the source associated with the media element for use by the PlayToManager. + */ + msPlayToSource: any; /** * Sets or retrieves the name of the object. */ @@ -6587,7 +6646,15 @@ interface HTMLVideoElement extends HTMLMediaElement { * Gets or sets the height of the video element. */ height: number; + msHorizontalMirror: boolean; + msIsLayoutOptimalForPlayback: boolean; + msIsStereo3D: boolean; + msStereo3DPackingMode: string; + msStereo3DRenderMode: string; msZoom: boolean; + onMSVideoFormatChanged: (ev: Event) => any; + onMSVideoFrameStepCompleted: (ev: Event) => any; + onMSVideoOptimalLayoutChanged: (ev: Event) => any; /** * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available. */ @@ -6607,10 +6674,120 @@ interface HTMLVideoElement extends HTMLMediaElement { */ width: number; getVideoPlaybackQuality(): VideoPlaybackQuality; + msFrameStep(forward: boolean): void; + msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void; + msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void; webkitEnterFullScreen(): void; webkitEnterFullscreen(): void; webkitExitFullScreen(): void; webkitExitFullscreen(): void; + addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "MSVideoFormatChanged", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "MSVideoFrameStepCompleted", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "MSVideoOptimalLayoutChanged", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void; + addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; + addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void; + addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; + addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; + addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; + addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; + addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void; + addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; + addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void; + addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; + addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void; + addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; + addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; + addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void; + addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; + addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; + addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; + addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; + addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; + addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; + addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void; + addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void; + addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void; + addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void; + addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void; + addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void; + addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void; + addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void; + addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; + addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; + addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; + addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void; + addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } declare var HTMLVideoElement: { @@ -6900,6 +7077,62 @@ declare var Location: { new(): Location; } +interface LongRunningScriptDetectedEvent extends Event { + executionTime: number; + stopPageScriptExecution: boolean; +} + +declare var LongRunningScriptDetectedEvent: { + prototype: LongRunningScriptDetectedEvent; + new(): LongRunningScriptDetectedEvent; +} + +interface MSApp { + clearTemporaryWebDataAsync(): MSAppAsyncOperation; + createBlobFromRandomAccessStream(type: string, seeker: any): Blob; + createDataPackage(object: any): any; + createDataPackageFromSelection(): any; + createFileFromStorageFile(storageFile: any): File; + createStreamFromInputStream(type: string, inputStream: any): MSStream; + execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void; + execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any; + getCurrentPriority(): string; + getHtmlPrintDocumentSourceAsync(htmlDoc: any): any; + getViewId(view: any): any; + isTaskScheduledAtPriorityOrHigher(priority: string): boolean; + pageHandlesAllApplicationActivations(enabled: boolean): void; + suppressSubdownloadCredentialPrompts(suppress: boolean): void; + terminateApp(exceptionObject: any): void; + CURRENT: string; + HIGH: string; + IDLE: string; + NORMAL: string; +} +declare var MSApp: MSApp; + +interface MSAppAsyncOperation extends EventTarget { + error: DOMError; + oncomplete: (ev: Event) => any; + onerror: (ev: Event) => any; + readyState: number; + result: any; + start(): void; + COMPLETED: number; + ERROR: number; + STARTED: number; + addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var MSAppAsyncOperation: { + prototype: MSAppAsyncOperation; + new(): MSAppAsyncOperation; + COMPLETED: number; + ERROR: number; + STARTED: number; +} + interface MSBlobBuilder { append(data: any, endings?: string): void; getBlob(contentType?: string): Blob; @@ -7007,6 +7240,37 @@ declare var MSGraphicsTrust: { new(): MSGraphicsTrust; } +interface MSHTMLWebViewElement extends HTMLElement { + canGoBack: boolean; + canGoForward: boolean; + containsFullScreenElement: boolean; + documentTitle: string; + height: number; + settings: MSWebViewSettings; + src: string; + width: number; + addWebAllowedObject(name: string, applicationObject: any): void; + buildLocalStreamUri(contentIdentifier: string, relativePath: string): string; + capturePreviewToBlobAsync(): MSWebViewAsyncOperation; + captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation; + getDeferredPermissionRequestById(id: number): DeferredPermissionRequest; + getDeferredPermissionRequests(): DeferredPermissionRequest[]; + goBack(): void; + goForward(): void; + invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation; + navigate(uri: string): void; + navigateToLocalStreamUri(source: string, streamResolver: any): void; + navigateToString(contents: string): void; + navigateWithHttpRequestMessage(requestMessage: any): void; + refresh(): void; + stop(): void; +} + +declare var MSHTMLWebViewElement: { + prototype: MSHTMLWebViewElement; + new(): MSHTMLWebViewElement; +} + interface MSInputMethodContext extends EventTarget { compositionEndOffset: number; compositionStartOffset: number; @@ -7143,8 +7407,10 @@ declare var MSPluginsCollection: { } interface MSPointerEvent extends MouseEvent { + currentPoint: any; height: number; hwTimestamp: number; + intermediatePoints: any; isPrimary: boolean; pointerId: number; pointerType: any; @@ -7153,6 +7419,7 @@ interface MSPointerEvent extends MouseEvent { tiltX: number; tiltY: number; width: number; + getCurrentPoint(element: Element): void; getIntermediatePoints(element: Element): void; initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void; } @@ -7186,6 +7453,7 @@ declare var MSSiteModeEvent: { interface MSStream { type: string; msClose(): void; + msDetachStream(): any; } declare var MSStream: { @@ -7208,6 +7476,47 @@ declare var MSStreamReader: { new(): MSStreamReader; } +interface MSWebViewAsyncOperation extends EventTarget { + error: DOMError; + oncomplete: (ev: Event) => any; + onerror: (ev: Event) => any; + readyState: number; + result: any; + target: MSHTMLWebViewElement; + type: number; + start(): void; + COMPLETED: number; + ERROR: number; + STARTED: number; + TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number; + TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number; + TYPE_INVOKE_SCRIPT: number; + addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var MSWebViewAsyncOperation: { + prototype: MSWebViewAsyncOperation; + new(): MSWebViewAsyncOperation; + COMPLETED: number; + ERROR: number; + STARTED: number; + TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number; + TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number; + TYPE_INVOKE_SCRIPT: number; +} + +interface MSWebViewSettings { + isIndexedDBEnabled: boolean; + isJavaScriptEnabled: boolean; +} + +declare var MSWebViewSettings: { + prototype: MSWebViewSettings; + new(): MSWebViewSettings; +} + interface MediaElementAudioSourceNode extends AudioNode { } @@ -7451,6 +7760,34 @@ declare var NamedNodeMap: { new(): NamedNodeMap; } +interface NavigationCompletedEvent extends NavigationEvent { + isSuccess: boolean; + webErrorStatus: number; +} + +declare var NavigationCompletedEvent: { + prototype: NavigationCompletedEvent; + new(): NavigationCompletedEvent; +} + +interface NavigationEvent extends Event { + uri: string; +} + +declare var NavigationEvent: { + prototype: NavigationEvent; + new(): NavigationEvent; +} + +interface NavigationEventWithReferrer extends NavigationEvent { + referer: string; +} + +declare var NavigationEventWithReferrer: { + prototype: NavigationEventWithReferrer; + new(): NavigationEventWithReferrer; +} + interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver { appCodeName: string; appMinorVersion: string; @@ -7887,6 +8224,25 @@ declare var PeriodicWave: { new(): PeriodicWave; } +interface PermissionRequest extends DeferredPermissionRequest { + state: string; + defer(): void; +} + +declare var PermissionRequest: { + prototype: PermissionRequest; + new(): PermissionRequest; +} + +interface PermissionRequestedEvent extends Event { + permissionRequest: PermissionRequest; +} + +declare var PermissionRequestedEvent: { + prototype: PermissionRequestedEvent; + new(): PermissionRequestedEvent; +} + interface Plugin { description: string; filename: string; @@ -7917,8 +8273,10 @@ declare var PluginArray: { } interface PointerEvent extends MouseEvent { + currentPoint: any; height: number; hwTimestamp: number; + intermediatePoints: any; isPrimary: boolean; pointerId: number; pointerType: any; @@ -7927,6 +8285,7 @@ interface PointerEvent extends MouseEvent { tiltX: number; tiltY: number; width: number; + getCurrentPoint(element: Element): void; getIntermediatePoints(element: Element): void; initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void; } @@ -9832,6 +10191,16 @@ declare var Screen: { new(): Screen; } +interface ScriptNotifyEvent extends Event { + callingUri: string; + value: string; +} + +declare var ScriptNotifyEvent: { + prototype: ScriptNotifyEvent; + new(): ScriptNotifyEvent; +} + interface ScriptProcessorNode extends AudioNode { bufferSize: number; onaudioprocess: (ev: AudioProcessingEvent) => any; @@ -10313,6 +10682,15 @@ interface URL { } declare var URL: URL; +interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer { + mediaType: string; +} + +declare var UnviewableContentIdentifiedEvent: { + prototype: UnviewableContentIdentifiedEvent; + new(): UnviewableContentIdentifiedEvent; +} + interface ValidityState { badInput: boolean; customError: boolean; @@ -11358,6 +11736,7 @@ interface WheelEvent extends MouseEvent { deltaX: number; deltaY: number; deltaZ: number; + getCurrentPoint(element: Element): void; initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void; DOM_DELTA_LINE: number; DOM_DELTA_PAGE: number; @@ -11855,6 +12234,7 @@ interface DocumentEvent { createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent; createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent; createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent; + createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent; createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent; createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent; createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent; @@ -11867,13 +12247,18 @@ interface DocumentEvent { createEvent(eventInterface:"MouseWheelEvent"): MouseWheelEvent; createEvent(eventInterface:"MutationEvent"): MutationEvent; createEvent(eventInterface:"MutationEvents"): MutationEvent; + createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent; + createEvent(eventInterface:"NavigationEvent"): NavigationEvent; + createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer; createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent; + createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent; createEvent(eventInterface:"PointerEvent"): PointerEvent; createEvent(eventInterface:"PopStateEvent"): PopStateEvent; createEvent(eventInterface:"ProgressEvent"): ProgressEvent; createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent; createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent; + createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent; createEvent(eventInterface:"StorageEvent"): StorageEvent; createEvent(eventInterface:"TextEvent"): TextEvent; createEvent(eventInterface:"TouchEvent"): TouchEvent; @@ -11881,6 +12266,7 @@ interface DocumentEvent { createEvent(eventInterface:"TransitionEvent"): TransitionEvent; createEvent(eventInterface:"UIEvent"): UIEvent; createEvent(eventInterface:"UIEvents"): UIEvent; + createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent; createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent; createEvent(eventInterface:"WheelEvent"): WheelEvent; createEvent(eventInterface: string): Event; @@ -12179,6 +12565,12 @@ interface MSLaunchUriCallback { interface FrameRequestCallback { (time: number): void; } +interface MSUnsafeFunctionCallback { + (): any; +} +interface MSExecAtPriorityFunctionCallback { + (...args: any[]): any; +} interface MutationCallback { (mutations: MutationRecord[], observer: MutationObserver): void; } diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index f89e3b88c83..f37ea5c6ed2 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -29,6 +29,7 @@ interface Blob { size: number; type: string; msClose(): void; + msDetachStream(): any; slice(start?: number, end?: number, contentType?: string): Blob; } @@ -472,6 +473,52 @@ interface ImageDataConstructor { declare var ImageData: ImageDataConstructor; +interface MSApp { + clearTemporaryWebDataAsync(): MSAppAsyncOperation; + createBlobFromRandomAccessStream(type: string, seeker: any): Blob; + createDataPackage(object: any): any; + createDataPackageFromSelection(): any; + createFileFromStorageFile(storageFile: any): File; + createStreamFromInputStream(type: string, inputStream: any): MSStream; + execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void; + execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any; + getCurrentPriority(): string; + getHtmlPrintDocumentSourceAsync(htmlDoc: any): any; + getViewId(view: any): any; + isTaskScheduledAtPriorityOrHigher(priority: string): boolean; + pageHandlesAllApplicationActivations(enabled: boolean): void; + suppressSubdownloadCredentialPrompts(suppress: boolean): void; + terminateApp(exceptionObject: any): void; + CURRENT: string; + HIGH: string; + IDLE: string; + NORMAL: string; +} +declare var MSApp: MSApp; + +interface MSAppAsyncOperation extends EventTarget { + error: DOMError; + oncomplete: (ev: Event) => any; + onerror: (ev: Event) => any; + readyState: number; + result: any; + start(): void; + COMPLETED: number; + ERROR: number; + STARTED: number; + addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void; + addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var MSAppAsyncOperation: { + prototype: MSAppAsyncOperation; + new(): MSAppAsyncOperation; + COMPLETED: number; + ERROR: number; + STARTED: number; +} + interface MSBlobBuilder { append(data: any, endings?: string): void; getBlob(contentType?: string): Blob; @@ -485,6 +532,7 @@ declare var MSBlobBuilder: { interface MSStream { type: string; msClose(): void; + msDetachStream(): any; } declare var MSStream: { From 0bc5c14d51b253527cb2dee2e17927d6a215444d Mon Sep 17 00:00:00 2001 From: zhengbli Date: Thu, 1 Oct 2015 15:25:43 -0700 Subject: [PATCH 018/121] Change fileWatcher in sys for node 4 --- src/compiler/sys.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index f3f2b02a30e..3782f4d11e9 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -9,6 +9,7 @@ namespace ts { readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; watchFile?(path: string, callback: (path: string) => void): FileWatcher; + watchDirectory?(path: string, callback: (path: string) => void): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; directoryExists(path: string): boolean; @@ -191,6 +192,12 @@ namespace ts { const _fs = require("fs"); const _path = require("path"); const _os = require("os"); + const _process = require("process"); + + + function isNode4OrLater(): Boolean { + return parseInt(_process.version.charAt(1)) >= 4; + } const platform: string = _os.platform(); // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive @@ -284,6 +291,15 @@ namespace ts { readFile, writeFile, watchFile: (fileName, callback) => { + + // Node 4.0 stablized the `fs.watch` function which avoids polling + // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 + // and https://github.com/Microsoft/TypeScript/issues/4643), therefore + // if the current node.js version is newer than 4, use `fs.watch` instead. + if (isNode4OrLater()) { + return _fs.watch(fileName, (eventName: string, path: string) => callback(path)); + } + // watchFile polls a file every 250ms, picking up file notifications. _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); From 5daa100bf40fdb5cc13d5ae1555dc09c1e9078e4 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 1 Oct 2015 15:40:13 -0700 Subject: [PATCH 019/121] unify the node filewatcher in sys.ts and server.ts --- src/compiler/sys.ts | 122 +++++++++++++++++++++++++++++++++++++------ src/server/server.ts | 110 -------------------------------------- 2 files changed, 107 insertions(+), 125 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 3782f4d11e9..91856a46b29 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -21,6 +21,12 @@ namespace ts { exit(exitCode?: number): void; } + interface WatchedFile { + fileName: string; + callback: (fileName: string) => void; + mtime: Date; + } + export interface FileWatcher { close(): void; } @@ -193,7 +199,104 @@ namespace ts { const _path = require("path"); const _os = require("os"); const _process = require("process"); - + + class WatchedFileSet { + private watchedFiles: WatchedFile[] = []; + private nextFileToCheck = 0; + private watchTimer: NodeJS.Timer; + + // average async stat takes about 30 microseconds + // set chunk size to do 30 files in < 1 millisecond + constructor(public interval = 2500, public chunkSize = 30) { + } + + private static copyListRemovingItem(item: T, list: T[]) { + var copiedList: T[] = []; + for (var i = 0, len = list.length; i < len; i++) { + if (list[i] != item) { + copiedList.push(list[i]); + } + } + return copiedList; + } + + private static getModifiedTime(fileName: string): Date { + return _fs.statSync(fileName).mtime; + } + + private poll(checkedIndex: number) { + var watchedFile = this.watchedFiles[checkedIndex]; + if (!watchedFile) { + return; + } + + _fs.stat(watchedFile.fileName, (err: any, stats: any) => { + if (err) { + watchedFile.callback(watchedFile.fileName); + } + else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { + watchedFile.mtime = WatchedFileSet.getModifiedTime(watchedFile.fileName); + watchedFile.callback(watchedFile.fileName); + } + }); + } + + // this implementation uses polling and + // stat due to inconsistencies of fs.watch + // and efficiency of stat on modern filesystems + private startWatchTimer() { + this.watchTimer = setInterval(() => { + var count = 0; + var nextToCheck = this.nextFileToCheck; + var firstCheck = -1; + while ((count < this.chunkSize) && (nextToCheck !== firstCheck)) { + this.poll(nextToCheck); + if (firstCheck < 0) { + firstCheck = nextToCheck; + } + nextToCheck++; + if (nextToCheck === this.watchedFiles.length) { + nextToCheck = 0; + } + count++; + } + this.nextFileToCheck = nextToCheck; + }, this.interval); + } + + addFile(fileName: string, callback: (fileName: string) => void): WatchedFile { + var file: WatchedFile = { + fileName, + callback, + mtime: WatchedFileSet.getModifiedTime(fileName) + }; + + this.watchedFiles.push(file); + if (this.watchedFiles.length === 1) { + this.startWatchTimer(); + } + return file; + } + + removeFile(file: WatchedFile) { + this.watchedFiles = WatchedFileSet.copyListRemovingItem(file, this.watchedFiles); + } + } + + // REVIEW: for now this implementation uses polling. + // The advantage of polling is that it works reliably + // on all os and with network mounted files. + // For 90 referenced files, the average time to detect + // changes is 2*msInterval (by default 5 seconds). + // The overhead of this is .04 percent (1/2500) with + // average pause of < 1 millisecond (and max + // pause less than 1.5 milliseconds); question is + // do we anticipate reference sets in the 100s and + // do we care about waiting 10-20 seconds to detect + // changes for large reference sets? If so, do we want + // to increase the chunk size or decrease the interval + // time dynamically to match the large reference set? + var watchedFileSet = new WatchedFileSet(); function isNode4OrLater(): Boolean { return parseInt(_process.version.charAt(1)) >= 4; @@ -291,8 +394,7 @@ namespace ts { readFile, writeFile, watchFile: (fileName, callback) => { - - // Node 4.0 stablized the `fs.watch` function which avoids polling + // Node 4.0 stablized the `fs.watch` function on Windows which avoids polling // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. @@ -300,19 +402,9 @@ namespace ts { return _fs.watch(fileName, (eventName: string, path: string) => callback(path)); } - // watchFile polls a file every 250ms, picking up file notifications. - _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); - + var watchedFile = watchedFileSet.addFile(fileName, callback); return { - close() { _fs.unwatchFile(fileName, fileChanged); } - }; - - function fileChanged(curr: any, prev: any) { - if (+curr.mtime <= +prev.mtime) { - return; - } - - callback(fileName); + close: () => watchedFileSet.removeFile(watchedFile) } }, resolvePath: function (path: string): string { diff --git a/src/server/server.ts b/src/server/server.ts index 843197b918a..39864fc8477 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -83,95 +83,6 @@ namespace ts.server { } } - interface WatchedFile { - fileName: string; - callback: (fileName: string) => void; - mtime: Date; - } - - class WatchedFileSet { - private watchedFiles: WatchedFile[] = []; - private nextFileToCheck = 0; - private watchTimer: NodeJS.Timer; - - // average async stat takes about 30 microseconds - // set chunk size to do 30 files in < 1 millisecond - constructor(public interval = 2500, public chunkSize = 30) { - } - - private static copyListRemovingItem(item: T, list: T[]) { - var copiedList: T[] = []; - for (var i = 0, len = list.length; i < len; i++) { - if (list[i] != item) { - copiedList.push(list[i]); - } - } - return copiedList; - } - - private static getModifiedTime(fileName: string): Date { - return fs.statSync(fileName).mtime; - } - - private poll(checkedIndex: number) { - var watchedFile = this.watchedFiles[checkedIndex]; - if (!watchedFile) { - return; - } - - fs.stat(watchedFile.fileName,(err, stats) => { - if (err) { - watchedFile.callback(watchedFile.fileName); - } - else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { - watchedFile.mtime = WatchedFileSet.getModifiedTime(watchedFile.fileName); - watchedFile.callback(watchedFile.fileName); - } - }); - } - - // this implementation uses polling and - // stat due to inconsistencies of fs.watch - // and efficiency of stat on modern filesystems - private startWatchTimer() { - this.watchTimer = setInterval(() => { - var count = 0; - var nextToCheck = this.nextFileToCheck; - var firstCheck = -1; - while ((count < this.chunkSize) && (nextToCheck !== firstCheck)) { - this.poll(nextToCheck); - if (firstCheck < 0) { - firstCheck = nextToCheck; - } - nextToCheck++; - if (nextToCheck === this.watchedFiles.length) { - nextToCheck = 0; - } - count++; - } - this.nextFileToCheck = nextToCheck; - }, this.interval); - } - - addFile(fileName: string, callback: (fileName: string) => void ): WatchedFile { - var file: WatchedFile = { - fileName, - callback, - mtime: WatchedFileSet.getModifiedTime(fileName) - }; - - this.watchedFiles.push(file); - if (this.watchedFiles.length === 1) { - this.startWatchTimer(); - } - return file; - } - - removeFile(file: WatchedFile) { - this.watchedFiles = WatchedFileSet.copyListRemovingItem(file, this.watchedFiles); - } - } - class IOSession extends Session { constructor(host: ServerHost, logger: ts.server.Logger) { super(host, Buffer.byteLength, process.hrtime, logger); @@ -243,28 +154,7 @@ namespace ts.server { // TODO: check that this location is writable var logger = createLoggerFromEnv(); - - // REVIEW: for now this implementation uses polling. - // The advantage of polling is that it works reliably - // on all os and with network mounted files. - // For 90 referenced files, the average time to detect - // changes is 2*msInterval (by default 5 seconds). - // The overhead of this is .04 percent (1/2500) with - // average pause of < 1 millisecond (and max - // pause less than 1.5 milliseconds); question is - // do we anticipate reference sets in the 100s and - // do we care about waiting 10-20 seconds to detect - // changes for large reference sets? If so, do we want - // to increase the chunk size or decrease the interval - // time dynamically to match the large reference set? - var watchedFileSet = new WatchedFileSet(); - ts.sys.watchFile = function (fileName, callback) { - var watchedFile = watchedFileSet.addFile(fileName, callback); - return { - close: () => watchedFileSet.removeFile(watchedFile) - } - }; var ioSession = new IOSession(ts.sys, logger); process.on('uncaughtException', function(err: Error) { ioSession.logError(err, "unknown"); From 4dcf8c773729e577ad49a64255e1d9c76c09f7c1 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 1 Oct 2015 15:59:03 -0700 Subject: [PATCH 020/121] bug fixes --- src/compiler/sys.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 91856a46b29..0b4d4dabd52 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -198,12 +198,11 @@ namespace ts { const _fs = require("fs"); const _path = require("path"); const _os = require("os"); - const _process = require("process"); class WatchedFileSet { private watchedFiles: WatchedFile[] = []; private nextFileToCheck = 0; - private watchTimer: NodeJS.Timer; + private watchTimer: any; // average async stat takes about 30 microseconds // set chunk size to do 30 files in < 1 millisecond @@ -299,7 +298,7 @@ namespace ts { var watchedFileSet = new WatchedFileSet(); function isNode4OrLater(): Boolean { - return parseInt(_process.version.charAt(1)) >= 4; + return parseInt(process.version.charAt(1)) >= 4; } const platform: string = _os.platform(); From c496c2f3c0da831554a35f4b6dff74fd7e475a57 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 1 Oct 2015 18:56:36 -0700 Subject: [PATCH 021/121] CI Against Node 4.1 Perf isn't as bad as 0.12, and it's the new LTS release series. TBH, we should probably also CI against `'node'` for the latest public version. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 572ac835cd4..954589f2eec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: node_js node_js: + - '4.1' - '0.10' -sudo: false \ No newline at end of file +sudo: false From 98eaeba4f162049f6595aa05127e9a9f9704d8e4 Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Fri, 2 Oct 2015 11:49:30 -0700 Subject: [PATCH 022/121] temp save --- src/compiler/sys.ts | 16 ++++++- src/server/editorServices.ts | 92 +++++++++++++++++++++++++++--------- 2 files changed, 85 insertions(+), 23 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 0b4d4dabd52..85c674ec904 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -9,7 +9,7 @@ namespace ts { readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; watchFile?(path: string, callback: (path: string) => void): FileWatcher; - watchDirectory?(path: string, callback: (path: string) => void): FileWatcher; + watchDirectory?(path: string, callback: (path: string) => void, recursive?: boolean): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; directoryExists(path: string): boolean; @@ -406,6 +406,20 @@ namespace ts { close: () => watchedFileSet.removeFile(watchedFile) } }, + watchDirectory: (path, callback, recursive) => { + // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows + // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) + // therefore if the current node.js version is newer than 4, use `fs.watch` instead. + if (isNode4OrLater()) { + return _fs.watch(path, { persisten: true, recursive: !!recursive }, (eventName: string, modifiedPath: string) => callback(modifiedPath)); + } + + // If Node version is older than 4.0, the "recursive" parameter will be ignored + var watchedFile = watchedFileSet.addFile(path, callback); + return { + close: () => watchedFileSet.removeFile(watchedFile) + } + }, resolvePath: function (path: string): string { return _path.resolve(path); }, diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 7ab46fc689e..dc6b8700a3d 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -78,19 +78,19 @@ namespace ts.server { return this.snap().getChangeRange(oldSnapshot); } } - + interface TimestampedResolvedModule extends ResolvedModuleWithFailedLookupLocations { - lastCheckTime: number; + lastCheckTime: number; } - + export class LSHost implements ts.LanguageServiceHost { ls: ts.LanguageService = null; compilationSettings: ts.CompilerOptions; filenameToScript: ts.Map = {}; roots: ScriptInfo[] = []; - private resolvedModuleNames: ts.FileMap>; + private resolvedModuleNames: ts.FileMap>; private moduleResolutionHost: ts.ModuleResolutionHost; - + constructor(public host: ServerHost, public project: Project) { this.resolvedModuleNames = ts.createFileMap>(ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames)) this.moduleResolutionHost = { @@ -98,15 +98,15 @@ namespace ts.server { readFile: fileName => this.host.readFile(fileName) } } - + resolveModuleNames(moduleNames: string[], containingFile: string): ResolvedModule[] { let currentResolutionsInFile = this.resolvedModuleNames.get(containingFile); - + let newResolutions: Map = {}; let resolvedModules: ResolvedModule[] = []; - + let compilerOptions = this.getCompilationSettings(); - + for (let moduleName of moduleNames) { // check if this is a duplicate entry in the list let resolution = lookUp(newResolutions, moduleName); @@ -122,21 +122,21 @@ namespace ts.server { newResolutions[moduleName] = resolution; } } - + ts.Debug.assert(resolution !== undefined); - + resolvedModules.push(resolution.resolvedModule); } // replace old results with a new one this.resolvedModuleNames.set(containingFile, newResolutions); return resolvedModules; - + function moduleResolutionIsValid(resolution: TimestampedResolvedModule): boolean { if (!resolution) { return false; } - + if (resolution.resolvedModule) { // TODO: consider checking failedLookupLocations // TODO: use lastCheckTime to track expiration for module name resolution @@ -147,7 +147,7 @@ namespace ts.server { // after all there is no point to invalidate it if we have no idea where to look for the module. return resolution.failedLookupLocations.length === 0; } - } + } getDefaultLibFileName() { var nodeModuleBinDir = ts.getDirectoryPath(ts.normalizePath(this.host.getExecutingFilePath())); @@ -224,7 +224,7 @@ namespace ts.server { this.roots.push(info); } } - + removeRoot(info: ScriptInfo) { var scriptInfo = ts.lookUp(this.filenameToScript, info.fileName); if (scriptInfo) { @@ -354,6 +354,11 @@ namespace ts.server { compilerService: CompilerService; projectFilename: string; projectFileWatcher: FileWatcher; + // Inferred projects have a collection of non-recursive directory watchers starting + // from the root path (e.g. "C:\" or "/") to the current path; + // while configured projects whose tsconfig files don't have a "files" array have one + // recursive directory watcher starting from the current path + directoryWatchers: FileWatcher[] = []; program: ts.Program; filenameToSourceFile: ts.Map = {}; updateGraphSeq = 0; @@ -532,6 +537,41 @@ namespace ts.server { } } + /** + * This is the callback function when the directory that an inferred project belongs + * to changed. The function looks for newly added tsconfig.json files; if it found one, + * and the tsconfig.json file contains the root file of the current inferred project, + * it will update the project structure. + */ + watchedDirectoryChanged(project: Project, path: string) { + if (project.isConfiguredProject()) { + return; + } + + let configFileName = ts.combinePaths(path, "tsconfig.json"); + if (sys.fileExists(configFileName)) { + let {succeeded, projectOptions, error} = this.configFileToProjectOptions(configFileName); + if (!succeeded) { + return; + } + + let newProjectFileNames = projectOptions.files.map(f => this.getCanonicalFileName(f)); + let rootFiles = project.getRootFiles().map(f => this.getCanonicalFileName(f)); + for (let rootFile of rootFiles) { + if (newProjectFileNames.indexOf(rootFile) >= 0) { + this.reloadProjects(); + return; + } + } + + } + } + + getCanonicalFileName(fileName: string) { + let name = this.host.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + return ts.normalizePath(name); + } + watchedProjectConfigFileChanged(project: Project) { this.log("Config File Changed: " + project.projectFilename); this.updateConfiguredProject(project); @@ -567,11 +607,19 @@ namespace ts.server { } createInferredProject(root: ScriptInfo) { - var iproj = new Project(this); - iproj.addRoot(root); - iproj.finishGraph(); - this.inferredProjects.push(iproj); - return iproj; + var project = new Project(this); + project.addRoot(root); + + let currentPath = ts.getDirectoryPath(root.fileName); + let parentPath = ts.getDirectoryPath(currentPath); + while (currentPath != parentPath) { + // To finish + let directoryWatcher = this.host.watchDirectory(currentPath, p => this.);; + } + + project.finishGraph(); + this.inferredProjects.push(project); + return project; } fileDeletedInFilesystem(info: ScriptInfo) { @@ -1217,9 +1265,9 @@ namespace ts.server { goSubtree: boolean; done: boolean; leaf(relativeStart: number, relativeLength: number, lineCollection: LineLeaf): void; - pre? (relativeStart: number, relativeLength: number, lineCollection: LineCollection, + pre?(relativeStart: number, relativeLength: number, lineCollection: LineCollection, parent: LineNode, nodeType: CharRangeSection): LineCollection; - post? (relativeStart: number, relativeLength: number, lineCollection: LineCollection, + post?(relativeStart: number, relativeLength: number, lineCollection: LineCollection, parent: LineNode, nodeType: CharRangeSection): LineCollection; } From 2d7b217d95326fdbf8ffb3fbc73efae02bd94ac9 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 2 Oct 2015 12:45:33 -0700 Subject: [PATCH 023/121] linter runs after tests via jake --- Jakefile.js | 9 ++++++++- package.json | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Jakefile.js b/Jakefile.js index 943f2eff5ec..dcee5f7ef53 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -655,7 +655,14 @@ task("runtests", ["tests", builtLocalDirectory], function() { // default timeout is 2sec which really should be enough, but maybe we just need a small amount longer var cmd = host + (debug ? " --debug-brk" : "") + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run; console.log(cmd); - exec(cmd, deleteTemporaryProjectOutput); + exec(cmd, function() { + deleteTemporaryProjectOutput(); + var lint = jake.Task['lint']; + lint.addListener('complete', function () { + complete(); + }); + lint.invoke(); + }); }, {async: true}); desc("Generates code coverage data via instanbul"); diff --git a/package.json b/package.json index 607a38552ba..28f2c1b5755 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "scripts": { "pretest": "jake tests", - "test": "jake runtests && npm run lint", + "test": "jake runtests", "build": "npm run build:compiler && npm run build:tests", "build:compiler": "jake local", "build:tests": "jake tests", From 04510ac1573e0f983e400d12258024d59525d84f Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Fri, 2 Oct 2015 14:30:31 -0700 Subject: [PATCH 024/121] Automatic semicolon insertion for class modifiers This includes public, private, protected, abstract async and declare already work this way, but it looks like they didn't block the completion list, so I added them to the list too. --- src/compiler/parser.ts | 18 +++- src/services/services.ts | 14 ++- .../reference/asiAbstract.errors.txt | 24 +++++ tests/baselines/reference/asiAbstract.js | 36 +++++++ .../asiPublicPrivateProtected.errors.txt | 52 +++++++++++ .../reference/asiPublicPrivateProtected.js | 93 +++++++++++++++++++ .../classAbstractMultiLineDecl.errors.txt | 24 ----- .../classAbstractSingleLineDecl.errors.txt | 24 +++++ ...Decl.js => classAbstractSingleLineDecl.js} | 6 +- tests/cases/compiler/asiAbstract.ts | 14 +++ .../compiler/asiPublicPrivateProtected.ts | 39 ++++++++ ...Decl.ts => classAbstractSingleLineDecl.ts} | 0 12 files changed, 309 insertions(+), 35 deletions(-) create mode 100644 tests/baselines/reference/asiAbstract.errors.txt create mode 100644 tests/baselines/reference/asiAbstract.js create mode 100644 tests/baselines/reference/asiPublicPrivateProtected.errors.txt create mode 100644 tests/baselines/reference/asiPublicPrivateProtected.js delete mode 100644 tests/baselines/reference/classAbstractMultiLineDecl.errors.txt create mode 100644 tests/baselines/reference/classAbstractSingleLineDecl.errors.txt rename tests/baselines/reference/{classAbstractMultiLineDecl.js => classAbstractSingleLineDecl.js} (72%) create mode 100644 tests/cases/compiler/asiAbstract.ts create mode 100644 tests/cases/compiler/asiPublicPrivateProtected.ts rename tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/{classAbstractMultiLineDecl.ts => classAbstractSingleLineDecl.ts} (100%) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 08f21e80e14..dcdaec98318 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -856,7 +856,7 @@ namespace ts { let saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; // Note: it is not actually necessary to save/restore the context flags here. That's - // because the saving/restorating of these flags happens naturally through the recursive + // because the saving/restoring of these flags happens naturally through the recursive // descent nature of our parser. However, we still store this here just so we can // assert that that invariant holds. let saveContextFlags = contextFlags; @@ -1124,7 +1124,15 @@ namespace ts { if (token === SyntaxKind.DefaultKeyword) { return nextTokenIsClassOrFunction(); } + if (token === SyntaxKind.StaticKeyword) { + nextToken(); + return canFollowModifier(); + } + nextToken(); + if (scanner.hasPrecedingLineBreak()) { + return false; + } return canFollowModifier(); } @@ -4157,8 +4165,12 @@ namespace ts { case SyntaxKind.ModuleKeyword: case SyntaxKind.NamespaceKeyword: return nextTokenIsIdentifierOrStringLiteralOnSameLine(); + case SyntaxKind.AbstractKeyword: case SyntaxKind.AsyncKeyword: case SyntaxKind.DeclareKeyword: + case SyntaxKind.PrivateKeyword: + case SyntaxKind.ProtectedKeyword: + case SyntaxKind.PublicKeyword: nextToken(); // ASI takes effect for this modifier. if (scanner.hasPrecedingLineBreak()) { @@ -4178,11 +4190,7 @@ namespace ts { } continue; - case SyntaxKind.PublicKeyword: - case SyntaxKind.PrivateKeyword: - case SyntaxKind.ProtectedKeyword: case SyntaxKind.StaticKeyword: - case SyntaxKind.AbstractKeyword: nextToken(); continue; default: diff --git a/src/services/services.ts b/src/services/services.ts index 82fa9de5203..99c6e4d6032 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3683,14 +3683,20 @@ namespace ts { // Previous token may have been a keyword that was converted to an identifier. switch (contextToken.getText()) { + case "abstract": + case "async": case "class": - case "interface": + case "const": + case "declare": case "enum": case "function": - case "var": - case "static": + case "interface": case "let": - case "const": + case "private": + case "protected": + case "public": + case "static": + case "var": case "yield": return true; } diff --git a/tests/baselines/reference/asiAbstract.errors.txt b/tests/baselines/reference/asiAbstract.errors.txt new file mode 100644 index 00000000000..3cc8999a2f2 --- /dev/null +++ b/tests/baselines/reference/asiAbstract.errors.txt @@ -0,0 +1,24 @@ +tests/cases/compiler/asiAbstract.ts(1,1): error TS2304: Cannot find name 'abstract'. +tests/cases/compiler/asiAbstract.ts(3,3): error TS1244: Abstract methods can only appear within an abstract class. + + +==== tests/cases/compiler/asiAbstract.ts (2 errors) ==== + abstract + ~~~~~~~~ +!!! error TS2304: Cannot find name 'abstract'. + class NonAbstractClass { + abstract s(); + ~~~~~~~~ +!!! error TS1244: Abstract methods can only appear within an abstract class. + } + + class C2 { + abstract + nonAbstractFunction() { + } + } + + class C3 { + abstract + } + \ No newline at end of file diff --git a/tests/baselines/reference/asiAbstract.js b/tests/baselines/reference/asiAbstract.js new file mode 100644 index 00000000000..8d5b412d022 --- /dev/null +++ b/tests/baselines/reference/asiAbstract.js @@ -0,0 +1,36 @@ +//// [asiAbstract.ts] +abstract +class NonAbstractClass { + abstract s(); +} + +class C2 { + abstract + nonAbstractFunction() { + } +} + +class C3 { + abstract +} + + +//// [asiAbstract.js] +abstract; +var NonAbstractClass = (function () { + function NonAbstractClass() { + } + return NonAbstractClass; +})(); +var C2 = (function () { + function C2() { + } + C2.prototype.nonAbstractFunction = function () { + }; + return C2; +})(); +var C3 = (function () { + function C3() { + } + return C3; +})(); diff --git a/tests/baselines/reference/asiPublicPrivateProtected.errors.txt b/tests/baselines/reference/asiPublicPrivateProtected.errors.txt new file mode 100644 index 00000000000..96d243536fb --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected.errors.txt @@ -0,0 +1,52 @@ +tests/cases/compiler/asiPublicPrivateProtected.ts(1,1): error TS2304: Cannot find name 'public'. +tests/cases/compiler/asiPublicPrivateProtected.ts(12,1): error TS2304: Cannot find name 'private'. +tests/cases/compiler/asiPublicPrivateProtected.ts(23,1): error TS2304: Cannot find name 'protected'. + + +==== tests/cases/compiler/asiPublicPrivateProtected.ts (3 errors) ==== + public + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + class NonPublicClass { + public s() { + } + } + + class NonPublicClass2 { + public + private nonPublicFunction() { + } + } + private + ~~~~~~~ +!!! error TS2304: Cannot find name 'private'. + class NonPrivateClass { + private s() { + } + } + + class NonPrivateClass2 { + private + public nonPrivateFunction() { + } + } + protected + ~~~~~~~~~ +!!! error TS2304: Cannot find name 'protected'. + class NonProtectedClass { + protected s() { + } + } + + class NonProtectedClass2 { + protected + public nonProtectedFunction() { + } + } + + class ClassWithThreeMembers { + public + private + protected + } + \ No newline at end of file diff --git a/tests/baselines/reference/asiPublicPrivateProtected.js b/tests/baselines/reference/asiPublicPrivateProtected.js new file mode 100644 index 00000000000..a17bcb7509a --- /dev/null +++ b/tests/baselines/reference/asiPublicPrivateProtected.js @@ -0,0 +1,93 @@ +//// [asiPublicPrivateProtected.ts] +public +class NonPublicClass { + public s() { + } +} + +class NonPublicClass2 { + public + private nonPublicFunction() { + } +} +private +class NonPrivateClass { + private s() { + } +} + +class NonPrivateClass2 { + private + public nonPrivateFunction() { + } +} +protected +class NonProtectedClass { + protected s() { + } +} + +class NonProtectedClass2 { + protected + public nonProtectedFunction() { + } +} + +class ClassWithThreeMembers { + public + private + protected +} + + +//// [asiPublicPrivateProtected.js] +public; +var NonPublicClass = (function () { + function NonPublicClass() { + } + NonPublicClass.prototype.s = function () { + }; + return NonPublicClass; +})(); +var NonPublicClass2 = (function () { + function NonPublicClass2() { + } + NonPublicClass2.prototype.nonPublicFunction = function () { + }; + return NonPublicClass2; +})(); +private; +var NonPrivateClass = (function () { + function NonPrivateClass() { + } + NonPrivateClass.prototype.s = function () { + }; + return NonPrivateClass; +})(); +var NonPrivateClass2 = (function () { + function NonPrivateClass2() { + } + NonPrivateClass2.prototype.nonPrivateFunction = function () { + }; + return NonPrivateClass2; +})(); +protected; +var NonProtectedClass = (function () { + function NonProtectedClass() { + } + NonProtectedClass.prototype.s = function () { + }; + return NonProtectedClass; +})(); +var NonProtectedClass2 = (function () { + function NonProtectedClass2() { + } + NonProtectedClass2.prototype.nonProtectedFunction = function () { + }; + return NonProtectedClass2; +})(); +var ClassWithThreeMembers = (function () { + function ClassWithThreeMembers() { + } + return ClassWithThreeMembers; +})(); diff --git a/tests/baselines/reference/classAbstractMultiLineDecl.errors.txt b/tests/baselines/reference/classAbstractMultiLineDecl.errors.txt deleted file mode 100644 index 5af440ed4df..00000000000 --- a/tests/baselines/reference/classAbstractMultiLineDecl.errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMultiLineDecl.ts(10,1): error TS2511: Cannot create an instance of the abstract class 'A'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMultiLineDecl.ts(11,1): error TS2511: Cannot create an instance of the abstract class 'B'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMultiLineDecl.ts(12,1): error TS2511: Cannot create an instance of the abstract class 'C'. - - -==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMultiLineDecl.ts (3 errors) ==== - abstract class A {} - - abstract - class B {} - - abstract - - class C {} - - new A; - ~~~~~ -!!! error TS2511: Cannot create an instance of the abstract class 'A'. - new B; - ~~~~~ -!!! error TS2511: Cannot create an instance of the abstract class 'B'. - new C; - ~~~~~ -!!! error TS2511: Cannot create an instance of the abstract class 'C'. \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractSingleLineDecl.errors.txt b/tests/baselines/reference/classAbstractSingleLineDecl.errors.txt new file mode 100644 index 00000000000..0670ea108ea --- /dev/null +++ b/tests/baselines/reference/classAbstractSingleLineDecl.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSingleLineDecl.ts(3,1): error TS2304: Cannot find name 'abstract'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSingleLineDecl.ts(6,1): error TS2304: Cannot find name 'abstract'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSingleLineDecl.ts(10,1): error TS2511: Cannot create an instance of the abstract class 'A'. + + +==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSingleLineDecl.ts (3 errors) ==== + abstract class A {} + + abstract + ~~~~~~~~ +!!! error TS2304: Cannot find name 'abstract'. + class B {} + + abstract + ~~~~~~~~ +!!! error TS2304: Cannot find name 'abstract'. + + class C {} + + new A; + ~~~~~ +!!! error TS2511: Cannot create an instance of the abstract class 'A'. + new B; + new C; \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractMultiLineDecl.js b/tests/baselines/reference/classAbstractSingleLineDecl.js similarity index 72% rename from tests/baselines/reference/classAbstractMultiLineDecl.js rename to tests/baselines/reference/classAbstractSingleLineDecl.js index 3a92e2aa1e5..772ed564a66 100644 --- a/tests/baselines/reference/classAbstractMultiLineDecl.js +++ b/tests/baselines/reference/classAbstractSingleLineDecl.js @@ -1,4 +1,4 @@ -//// [classAbstractMultiLineDecl.ts] +//// [classAbstractSingleLineDecl.ts] abstract class A {} abstract @@ -12,17 +12,19 @@ new A; new B; new C; -//// [classAbstractMultiLineDecl.js] +//// [classAbstractSingleLineDecl.js] var A = (function () { function A() { } return A; })(); +abstract; var B = (function () { function B() { } return B; })(); +abstract; var C = (function () { function C() { } diff --git a/tests/cases/compiler/asiAbstract.ts b/tests/cases/compiler/asiAbstract.ts new file mode 100644 index 00000000000..f9f36b12001 --- /dev/null +++ b/tests/cases/compiler/asiAbstract.ts @@ -0,0 +1,14 @@ +abstract +class NonAbstractClass { + abstract s(); +} + +class C2 { + abstract + nonAbstractFunction() { + } +} + +class C3 { + abstract +} diff --git a/tests/cases/compiler/asiPublicPrivateProtected.ts b/tests/cases/compiler/asiPublicPrivateProtected.ts new file mode 100644 index 00000000000..4ccd4c1c01b --- /dev/null +++ b/tests/cases/compiler/asiPublicPrivateProtected.ts @@ -0,0 +1,39 @@ +public +class NonPublicClass { + public s() { + } +} + +class NonPublicClass2 { + public + private nonPublicFunction() { + } +} +private +class NonPrivateClass { + private s() { + } +} + +class NonPrivateClass2 { + private + public nonPrivateFunction() { + } +} +protected +class NonProtectedClass { + protected s() { + } +} + +class NonProtectedClass2 { + protected + public nonProtectedFunction() { + } +} + +class ClassWithThreeMembers { + public + private + protected +} diff --git a/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMultiLineDecl.ts b/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSingleLineDecl.ts similarity index 100% rename from tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMultiLineDecl.ts rename to tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractSingleLineDecl.ts From da09f35acab63d9e4df543de53c574bf4224b8a6 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 2 Oct 2015 16:21:20 -0700 Subject: [PATCH 025/121] Jake hates deps --- Jakefile.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Jakefile.js b/Jakefile.js index dcee5f7ef53..4c13aba3821 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -628,10 +628,9 @@ function deleteTemporaryProjectOutput() { var testTimeout = 20000; desc("Runs the tests using the built run.js file. Syntax is jake runtests. Optional parameters 'host=', 'tests=[regex], reporter=[list|spec|json|]', debug=true."); -task("runtests", ["tests", builtLocalDirectory], function() { +task("runtests", ["build-rules", "tests", builtLocalDirectory], function() { cleanTestDirs(); var debug = process.env.debug || process.env.d; - host = "mocha" tests = process.env.test || process.env.tests || process.env.t; var light = process.env.light || false; var testConfigFile = 'test.config'; @@ -653,7 +652,7 @@ task("runtests", ["tests", builtLocalDirectory], function() { reporter = process.env.reporter || process.env.r || 'mocha-fivemat-progress-reporter'; // timeout normally isn't necessary but Travis-CI has been timing out on compiler baselines occasionally // default timeout is 2sec which really should be enough, but maybe we just need a small amount longer - var cmd = host + (debug ? " --debug-brk" : "") + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run; + var cmd = "mocha" + (debug ? " --debug-brk" : "") + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run; console.log(cmd); exec(cmd, function() { deleteTemporaryProjectOutput(); @@ -833,7 +832,7 @@ var tslintRulesOutFiles = tslintRules.map(function(p) { desc("Compiles tslint rules to js"); task("build-rules", tslintRulesOutFiles); tslintRulesFiles.forEach(function(ruleFile, i) { - compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ true, /*noOutFile*/ true, /*generateDeclarations*/ false, path.join(builtLocalDirectory, "tslint")); + compileFile(tslintRulesOutFiles[i], [ruleFile], [ruleFile], [], /*useBuiltCompiler*/ false, /*noOutFile*/ true, /*generateDeclarations*/ false, path.join(builtLocalDirectory, "tslint")); }); function getLinterOptions() { From ba2024f493b50fc562653eeaf0004f7ac6554d55 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 2 Oct 2015 17:04:44 -0700 Subject: [PATCH 026/121] Remove obsoleted comment --- Jakefile.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jakefile.js b/Jakefile.js index 4c13aba3821..fcebeb17716 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -866,8 +866,6 @@ function lintFileAsync(options, path, cb) { var lintTargets = compilerSources.concat(harnessCoreSources); -// if the codebase were free of linter errors we could make jake runtests -// run this task automatically desc("Runs tslint on the compiler sources"); task("lint", ["build-rules"], function() { var lintOptions = getLinterOptions(); From 5f7914ca623683889ca45f129a48f8adc51e3fff Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 2 Oct 2015 18:50:45 -0700 Subject: [PATCH 027/121] Downlevel emit --- src/compiler/emitter.ts | 146 ++++++++++++++++++++++++++------------ src/compiler/utilities.ts | 14 +++- 2 files changed, 113 insertions(+), 47 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 541488bd82b..db3cef27aa3 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -836,6 +836,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } let node = nodes[start + i]; + let leadcomment = getLeadingCommentsToEmit(node); + let trailcomment = getTrailingCommentRanges(currentSourceFile.text, node.pos); // This emitting is to make sure we emit following comment properly // ...(x, /*comment1*/ y)... // ^ => node.pos @@ -2505,6 +2507,70 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } + /** + * Emit exponentiation operator down-level using Math.pow + * @param node {BinaryExpression} a binary expression node containing exponentiationOperator (**, **=) + */ + function emitExponentiationOperator(node: BinaryExpression) { + let leftHandSideExpression = node.left; + if (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) { + let synthesizedLHS: ElementAccessExpression | PropertyAccessExpression; + // TODO (yuisu) : comment + let shouldEmitParenthesis = node.parent.kind === SyntaxKind.VariableDeclaration || node.parent.kind === SyntaxKind.BinaryExpression; + + if (isElementAccessExpression(leftHandSideExpression)) { + if (shouldEmitParenthesis) { + write("("); + } + synthesizedLHS = createSynthesizedNode(SyntaxKind.ElementAccessExpression, /*startsOnNewLine*/ false); + let tempExpression = createAndRecordTempVariable(TempFlags.Auto); + emitAssignment(tempExpression, leftHandSideExpression.expression, /*shouldEmitCommaBeforeAssignment*/ false); + synthesizedLHS.expression = tempExpression + + if (leftHandSideExpression.argumentExpression.kind !== SyntaxKind.NumericLiteral && + leftHandSideExpression.argumentExpression.kind !== SyntaxKind.StringLiteral) { + let tempArgumentExpression = createAndRecordTempVariable(TempFlags._i); + (synthesizedLHS).argumentExpression = tempArgumentExpression; + emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true); + } + else { + (synthesizedLHS).argumentExpression = leftHandSideExpression.argumentExpression; + } + write(", "); + } + else if (isPropertyAccessExpression(leftHandSideExpression)) { + if (shouldEmitParenthesis) { + write("("); + } + synthesizedLHS = createSynthesizedNode(SyntaxKind.PropertyAccessExpression, /*startsOnNewLine*/ false); + let tempExpression = createAndRecordTempVariable(TempFlags.Auto); + synthesizedLHS.expression = tempExpression + emitAssignment(tempExpression, leftHandSideExpression.expression, /*shouldEmitCommaBeforeAssignment*/ false); + (synthesizedLHS).dotToken = leftHandSideExpression.dotToken; + (synthesizedLHS).name = leftHandSideExpression.name; + write(", "); + } + + emit(synthesizedLHS || leftHandSideExpression); + write(" = "); + write("Math.pow("); + emit(synthesizedLHS || leftHandSideExpression); + write(", "); + emit(node.right); + write(")"); + if (shouldEmitParenthesis) { + write(")"); + } + } + else { + write("Math.pow("); + emit(leftHandSideExpression); + write(", "); + emit(node.right); + write(")"); + } + } + function emitBinaryExpression(node: BinaryExpression) { if (languageVersion < ScriptTarget.ES6 && node.operatorToken.kind === SyntaxKind.EqualsToken && (node.left.kind === SyntaxKind.ObjectLiteralExpression || node.left.kind === SyntaxKind.ArrayLiteralExpression)) { @@ -2523,17 +2589,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(`", `); } - if (languageVersion < ScriptTarget.ES7 && - (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskToken || node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken)) { - if (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) { - emit(node.left); - write(" = "); - } - write("Math.pow("); - emit(node.left); - write(", "); - emit(node.right); - write(")"); + if (languageVersion < ScriptTarget.ES7 && (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskToken || node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken)) { + emitExponentiationOperator(node); } else { emit(node.left); @@ -3180,6 +3237,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(";"); } + function emitAssignment(name: Identifier, value: Expression, shouldEmitCommaBeforeAssignment: boolean) { + if (shouldEmitCommaBeforeAssignment) { + write(", "); + } + + const isVariableDeclarationOrBindingElement = + name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement); + + let exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name); + + if (exportChanged) { + write(`${exportFunctionForFile}("`); + emitNodeWithCommentsAndWithoutSourcemap(name); + write(`", `); + } + + if (isVariableDeclarationOrBindingElement) { + emitModuleMemberName(name.parent); + } + else { + emit(name); + } + + write(" = "); + emit(value); + + if (exportChanged) { + write(")"); + } + } + function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration, isAssignmentExpressionStatement: boolean, value?: Expression) { let emitCount = 0; @@ -3205,36 +3293,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitBindingElement(root, value); } - function emitAssignment(name: Identifier, value: Expression) { - if (emitCount++) { - write(", "); - } - - const isVariableDeclarationOrBindingElement = - name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement); - - let exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name); - - if (exportChanged) { - write(`${exportFunctionForFile}("`); - emitNodeWithCommentsAndWithoutSourcemap(name); - write(`", `); - } - - if (isVariableDeclarationOrBindingElement) { - emitModuleMemberName(name.parent); - } - else { - emit(name); - } - - write(" = "); - emit(value); - - if (exportChanged) { - write(")"); - } - } /** * Ensures that there exists a declared identifier whose value holds the given expression. @@ -3254,7 +3312,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (!canDefineTempVariablesInPlace) { recordTempDeclaration(identifier); } - emitAssignment(identifier, expr); + emitAssignment(identifier, expr, /*shouldEmitCommaBeforeAssignment*/ emitCount++ > 0); return identifier; } @@ -3354,7 +3412,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitArrayLiteralAssignment(target, value); } else { - emitAssignment(target, value); + emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount++ > 0); } } @@ -3423,7 +3481,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } else { - emitAssignment(target.name, value); + emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount++ > 0); } } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index ed8b516b7f3..9f54a6ff773 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -892,6 +892,14 @@ namespace ts { return nodeIsDecorated(node) || childIsDecorated(node); } + export function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression { + return node.kind === SyntaxKind.PropertyAccessExpression; + } + + export function isElementAccessExpression(node: Node): node is ElementAccessExpression { + return node.kind === SyntaxKind.ElementAccessExpression; + } + export function isExpression(node: Node): boolean { switch (node.kind) { case SyntaxKind.ThisKeyword: @@ -1402,7 +1410,7 @@ namespace ts { * where Symbol is literally the word "Symbol", and name is any identifierName */ export function isWellKnownSymbolSyntactically(node: Expression): boolean { - return node.kind === SyntaxKind.PropertyAccessExpression && isESSymbolIdentifier((node).expression); + return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression); } export function getPropertyNameForPropertyNameNode(name: DeclarationName): string { @@ -2035,8 +2043,8 @@ namespace ts { if (node.kind === SyntaxKind.Identifier) { return true; } - else if (node.kind === SyntaxKind.PropertyAccessExpression) { - return isSupportedExpressionWithTypeArgumentsRest((node).expression); + else if (isPropertyAccessExpression(node)) { + return isSupportedExpressionWithTypeArgumentsRest(node.expression); } else { return false; From ca5da9068a7dda017b5573ab55411d3cf9a27aae Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 2 Oct 2015 19:23:04 -0700 Subject: [PATCH 028/121] Add tests --- ...onentiationAssignmentWithIndexingOnLHS1.ts | 17 +++ ...onentiationAssignmentWithIndexingOnLHS2.ts | 10 ++ ...onentiationAssignmentWithIndexingOnLHS3.ts | 14 +++ ...onentiationAssignmentWithIndexingOnLHS4.ts | 14 +++ ...onAssignmentWithPropertyAccessingOnLHS1.ts | 6 + .../emitCompoundExponentiationOperator1ES7.ts | 22 ++++ .../emitCompoundExponentiationOperator2ES7.ts | 25 ++++ .../emitExponentiationOperator1ES7.ts | 32 +++++ .../emitExponentiationOperator2ES7.ts | 75 ++++++++++++ .../emitExponentiationOperator3ES7.ts | 114 ++++++++++++++++++ ...onentiationOperatorInTemplateString1ES6.ts | 46 +++++++ ...ExponentiationOperatorInTemplateString2.ts | 46 +++++++ ...onentiationOperatorInTemplateString2ES6.ts | 46 +++++++ ...ExponentiationOperatorInTemplateString3.ts | 46 +++++++ ...onentiationOperatorInTemplateString3ES6.ts | 46 +++++++ .../exponentiationOperatorWithNew.ts | 6 + ...iationOperatorWithTemplateStringInvalid.ts | 19 +++ ...ionOperatorWithTemplateStringInvalidES6.ts | 16 +++ 18 files changed, 600 insertions(+) create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNew.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts new file mode 100644 index 00000000000..7e0a7dc3728 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts @@ -0,0 +1,17 @@ +// @target: es5 + +var array0 = [1, 2, 3] +var i0 = 0; +array0[++i0] **= 2; + +var array1 = [1, 2, 3] +var i1 = 0; +array1[++i1] **= array1[++i1] **= 2; + +var array2 = [1, 2, 3] +var i2 = 0; +array2[++i2] **= array2[++i2] ** 2; + +var array3 = [2, 2, 3]; +var j0 = 0, j1 = 1; +array3[j0++] **= array3[j1++] **= array3[j0++] **= 1; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts new file mode 100644 index 00000000000..2648b0d6809 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts @@ -0,0 +1,10 @@ +// @target: es5 +function foo() { + console.log("Call foo()"); + return { 0: 2 }; +} +var result_foo1 = foo()[0] **= foo()[0]; + +var result_foo2 = foo()[0] **= foo()[0] **= 2; + +var result_foo3 = foo()[0] **= foo()[0] ** 2; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts new file mode 100644 index 00000000000..afb12a97563 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts @@ -0,0 +1,14 @@ +// @target: es5 + +var object = { + _0: 2, + get 0() { + return this._0; + }, + set 0(x: number) { + this._0 = x; + }, +} +object[0] **= object[0]; +object[0] **= object[0] **= 2; +object[0] **= object[0] ** 2; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts new file mode 100644 index 00000000000..668d6f0a92b --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts @@ -0,0 +1,14 @@ +// @target: es5 + +function incrementIdx(max: number) { + let idx = Math.floor(Math.random() * max); + return idx; +} + +var array1 = [1, 2, 3, 4, 5]; + +array1[incrementIdx(array1.length)] **= 3; + +array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2; + +array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts new file mode 100644 index 00000000000..bb8530b204f --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts @@ -0,0 +1,6 @@ +// @target: es5 + +function foo() { + return { prop: 2 }; +} +foo().prop **= 2; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts new file mode 100644 index 00000000000..61b057146fc --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts @@ -0,0 +1,22 @@ +// @target:es7 + +var comp: number; + +comp **= 1; +comp **= comp ** comp; +comp **= comp ** comp ** 2; +comp **= comp ** comp + 2; +comp **= comp ** comp - 2; +comp **= comp ** comp * 2; +comp **= comp ** comp / 2; +comp **= comp ** comp % 2; +comp **= (comp - 2) ** 5; +comp **= (comp + 2) ** 5; +comp **= (comp * 2) ** 5; +comp **= (comp / 2) ** 5; +comp **= (comp % 2) ** 5; +comp **= comp ** (5 + 2); +comp **= comp ** (5 - 2); +comp **= comp ** (5 * 2); +comp **= comp ** (5 / 2); +comp **= comp ** (5 % 2); \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts new file mode 100644 index 00000000000..4cc1a29a5f7 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts @@ -0,0 +1,25 @@ +// @target:es7 + +var comp: number; + +comp **= 1; +comp **= comp **= 1; +comp **= comp **= 1 + 2; +comp **= comp **= 1 - 2; +comp **= comp **= 1 * 2; +comp **= comp **= 1 / 2; + +comp **= comp **= (1 + 2); +comp **= comp **= (1 - 2); +comp **= comp **= (1 * 2); +comp **= comp **= (1 / 2); + +comp **= comp **= 1 + 2 ** 3; +comp **= comp **= 1 - 2 ** 4; +comp **= comp **= 1 * 2 ** 5; +comp **= comp **= 1 / 2 ** 6; + +comp **= comp **= (1 + 2) ** 3; +comp **= comp **= (1 - 2) ** 4; +comp **= comp **= (1 * 2) ** 5; +comp **= comp **= (1 / 2) ** 6; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts new file mode 100644 index 00000000000..9007a1e33cb --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts @@ -0,0 +1,32 @@ +// @target: es7 + +1 ** 2; +1 ** 2 ** 3; +1 ** -2 ** 3; +1 ** -2 ** -3; +-1 ** -2 ** -3; +-(1 ** 2) ** 3; +1 ** -(2 ** 3); + +1 ** 2 + 3; +1 ** 2 - 3; +1 ** 2 * 3; +1 ** 2 / 3; +1 ** 2 % 3; + +1 ** -2 + 3; +1 ** -2 - 3; +1 ** -2 * 3; +1 ** -2 / 3; +1 ** -2 % 3; + +2 + 3 ** 3; +2 - 3 ** 3; +2 * 3 ** 3; +2 / 3 ** 3; +2 % 3 ** 3; + +(2 + 3) ** 4; +(2 - 3) ** 4; +(2 * 3) ** 4; +(2 / 3) ** 4; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts new file mode 100644 index 00000000000..ded8e7ce631 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts @@ -0,0 +1,75 @@ +// @target:es7 + +var temp = 10; + +++temp ** 3; +--temp ** 3; +temp++ ** 3; +temp-- ** 3; +--temp + temp ** 3; +--temp - temp ** 3; +--temp * temp ** 3; +--temp / temp ** 3; +--temp % temp ** 3; +-++temp ** 3; ++--temp ** 3; + +temp-- ** 3; +temp++ ** 3; +-temp++ ** 3; ++temp-- ** 3; + +temp-- + temp ** 3; +temp-- - temp ** 3; +temp-- * temp ** 3; +temp-- / temp ** 3; +temp-- % temp ** 3; + +--temp + 2 ** 3; +--temp - 2 ** 3; +--temp * 2 ** 3; +--temp / 2 ** 3; +--temp % 2 ** 3; + +++temp + 2 ** 3; +++temp - 2 ** 3; +++temp * 2 ** 3; +++temp / 2 ** 3; + +3 ** ++temp; +3 ** --temp; +3 ** temp++; +3 ** temp--; +-3 ** temp++; +-3 ** temp--; +-3 ** ++temp; +-3 ** --temp; ++3 ** temp++; ++3 ** temp--; ++3 ** ++temp; ++3 ** --temp + +3 ** ++temp ** 2; +3 ** --temp ** 2; +3 ** temp++ ** 2; +3 ** temp-- ** 2; +-3 ** temp++ ** 2; +-3 ** temp-- ** 2; +-3 ** ++temp ** 2; +-3 ** --temp ** 2; ++3 ** temp++ ** 2; ++3 ** temp-- ** 2; ++3 ** ++temp ** 2; ++3 ** --temp ** 2; + +3 ** ++temp + 2; +3 ** ++temp - 2; +3 ** ++temp * 2; +3 ** ++temp / 2; +3 ** ++temp % 2; + +3 ** --temp + 2; +3 ** --temp - 2; +3 ** --temp * 2; +3 ** --temp / 2; +3 ** --temp % 2; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts new file mode 100644 index 00000000000..466cab93a51 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts @@ -0,0 +1,114 @@ +// @target: es7 +var temp: any; + +delete --temp ** 3; +delete ++temp ** 3; +delete temp-- ** 3; +delete temp++ ** 3; +delete -++temp ** 3; +delete -temp++ ** 3; +delete -temp-- ** 3; + +delete --temp ** 3 ** 1; +delete ++temp ** 3 ** 1; +delete temp-- ** 3 ** 1; +delete temp++ ** 3 ** 1; +delete -++temp ** 3 ** 1; +delete -temp++ ** 3 ** 1; +delete -temp-- ** 3 ** 1;; + +--temp ** 3; +++temp ** 3; +temp-- ** 3; +temp++ ** 3; +-++temp ** 3; +-temp++ ** 3; +-temp-- ** 3; + +--temp ** 3 ** 1; +++temp ** 3 ** 1; +temp-- ** 3 ** 1; +temp++ ** 3 ** 1; +-++temp ** 3 ** 1; +-temp++ ** 3 ** 1; +-temp-- ** 3 ** 1; + +typeof --temp ** 3; +typeof temp-- ** 3; +typeof 3 ** 4; +typeof temp++ ** 4; +typeof temp-- ** 4; +typeof -3 ** 4; +typeof -++temp ** 4; +typeof -temp++ ** 4; +typeof -temp-- ** 4; + +typeof --temp ** 3 ** 1; +typeof temp-- ** 3 ** 1; +typeof 3 ** 4 ** 1; +typeof temp++ ** 4 ** 1; +typeof temp-- ** 4 ** 1; +typeof -3 ** 4 ** 1; +typeof -++temp ** 4 ** 1; +typeof -temp++ ** 4 ** 1; +typeof -temp-- ** 4 ** 1; + +void --temp ** 3; +void temp-- ** 3; +void 3 ** 4; +void temp++ ** 4; +void temp-- ** 4; +void -3 ** 4; +void -++temp ** 4; +void -temp++ ** 4; +void -temp-- ** 4; + +void --temp ** 3 ** 1; +void temp-- ** 3 ** 1; +void 3 ** 4 ** 1; +void temp++ ** 4 ** 1; +void temp-- ** 4 ** 1; +void -3 ** 4 ** 1; +void -++temp ** 4 ** 1; +void -temp++ ** 4 ** 1; +void -temp-- ** 4 ** 1; + +~ --temp ** 3; +~ temp-- ** 3; +~ 3 ** 4; +~ temp++ ** 4; +~ temp-- ** 4; +~ -3 ** 4; +~ -++temp ** 4; +~ -temp++ ** 4; +~ -temp-- ** 4; + +~ --temp ** 3 ** 1; +~ temp-- ** 3 ** 1; +~ 3 ** 4 ** 1; +~ temp++ ** 4 ** 1; +~ temp-- ** 4 ** 1; +~ -3 ** 4 ** 1; +~ -++temp ** 4 ** 1; +~ -temp++ ** 4 ** 1; +~ -temp-- ** 4 ** 1; + +! --temp ** 3; +! temp-- ** 3; +! 3 ** 4; +! temp++ ** 4; +! temp-- ** 4; +! -3 ** 4; +! -++temp ** 4; +! -temp++ ** 4; +! -temp-- ** 4; + +! --temp ** 3 ** 1; +! temp-- ** 3 ** 1; +! 3 ** 4 ** 1; +! temp++ ** 4 ** 1; +! temp-- ** 4 ** 1; +! -3 ** 4 ** 1; +! -++temp ** 4 ** 1; +! -temp++ ** 4 ** 1; +! -temp-- ** 4 ** 1; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts new file mode 100644 index 00000000000..70cdad5b98f --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts @@ -0,0 +1,46 @@ +// @target: es6 + +var t1 = 10; +var t2 = 10; +var s; + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +`${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1 }`; +`${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}`; +`${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof t1 ** t2 ** t1}`; +`${1 + typeof (t1 ** t2 ** t1) }`; + +`${t1 ** t2}${t1 ** t2}`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + +`${t1 ** t2} hello world ${t1 ** t2}`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts new file mode 100644 index 00000000000..3c3349879c3 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts @@ -0,0 +1,46 @@ +// @target: es5 + +var t1 = 10; +var t2 = 10; +var s; + +// With templateHead +`hello ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1 }`; +`hello ${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1}`; +`hello ${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof t1 ** t2 ** t1}`; +`hello ${1 + typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2}${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts new file mode 100644 index 00000000000..7268768f417 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts @@ -0,0 +1,46 @@ +// @target: es6 + +var t1 = 10; +var t2 = 10; +var s; + +// With templateHead +`hello ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1 }`; +`hello ${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1}`; +`hello ${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof t1 ** t2 ** t1}`; +`hello ${1 + typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2}${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts new file mode 100644 index 00000000000..8affe231586 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts @@ -0,0 +1,46 @@ +// @target: es5 + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** t2} world`; +`${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1 } world`; +`${-t1 ** t2 - t1} world`; +`${-++t1 ** t2 - t1} world`; +`${-t1++ ** t2 - t1} world`; +`${!t1 ** t2 ** --t1 } world`; +`${typeof t1 ** t2 ** t1} world`; +`${typeof (t1 ** t2 ** t1) } world`; +`${1 + typeof t1 ** t2 ** t1} world`; +`${1 + typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2}${t1 ** t2} world`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; +`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; +`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; +`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; +`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; +`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; +`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; +`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; +`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts new file mode 100644 index 00000000000..9c54478708e --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts @@ -0,0 +1,46 @@ +// @target: es6 + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** t2} world`; +`${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1 } world`; +`${-t1 ** t2 - t1} world`; +`${-++t1 ** t2 - t1} world`; +`${-t1++ ** t2 - t1} world`; +`${!t1 ** t2 ** --t1 } world`; +`${typeof t1 ** t2 ** t1} world`; +`${typeof (t1 ** t2 ** t1) } world`; +`${1 + typeof t1 ** t2 ** t1} world`; +`${1 + typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2}${t1 ** t2} world`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; +`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; +`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; +`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; +`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; +`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; +`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; +`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; +`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNew.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNew.ts new file mode 100644 index 00000000000..c17b26cc88f --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNew.ts @@ -0,0 +1,6 @@ +var a: any; +var b: any; +var c: any; +new a ** b ** c; +new a ** new b ** c; +new (a ** b ** c); \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts new file mode 100644 index 00000000000..6e055caae04 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts @@ -0,0 +1,19 @@ +// @target: es5 + +var a = 1 ** `${ 3 }`; +var b = 1 ** `2${ 3 }`; +var c = 1 ** `${ 3 }4`; +var d = 1 ** `2${ 3 }4`; +var e = `${ 3 }` ** 5; +var f = `2${ 3 }` ** 5; +var g = `${ 3 }4` ** 5; +var h = `2${ 3 }4` ** 5; + +var k = 10; +k **= `${ 3 }`; +k **= `2${ 3 }`; +k **= `2${ 3 }4`; +k **= `2${ 3 }4`; + + + \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts new file mode 100644 index 00000000000..1593d1290e4 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts @@ -0,0 +1,16 @@ +// @target: es6 + +var a = 1 ** `${ 3 }`; +var b = 1 ** `2${ 3 }`; +var c = 1 ** `${ 3 }4`; +var d = 1 ** `2${ 3 }4`; +var e = `${ 3 }` ** 5; +var f = `2${ 3 }` ** 5; +var g = `${ 3 }4` ** 5; +var h = `2${ 3 }4` ** 5; + +var k = 10; +k **= `${ 3 }`; +k **= `2${ 3 }`; +k **= `2${ 3 }4`; +kj **= `2${ 3 }4`; \ No newline at end of file From bf0903bd1be8e706825b13b32956a6462a518ee0 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 2 Oct 2015 19:23:19 -0700 Subject: [PATCH 029/121] Address PR on fixing tempalte tests --- .../emitExponentiationOperator3.ts | 3 +- ...ExponentiationOperatorInTemplateString1.ts | 70 ++++++++++++------- 2 files changed, 46 insertions(+), 27 deletions(-) diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts index b3b5deaf83d..f8c05f47e6b 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts @@ -1,4 +1,5 @@ -var temp: any; +// @target: es5 +var temp: any; delete --temp ** 3; delete ++temp ** 3; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts index f79b22fedd7..80fe91ee462 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts @@ -1,28 +1,46 @@ -var t1 = 10; +// @target: es5 + +var t1 = 10; var t2 = 10; var s; -`Exp: ${t1 ** t2} abc`; -`Exp: ${t1 ** t2 ** t1} abc`; -`Exp: ${t1 + t2 ** t1} abc`; -`Exp: ${t1 - t2 ** t1} abc`; -`Exp: ${t1 ** t2 + t1} abc`; -`Exp: ${t1 ** t2 - t1} abc`; -`Exp: ${t1 + t2 ** t2 + t1} abc`; -`Exp: ${t1 - t2 ** t2 - t1} abc`; -`Exp: ${-t1 ** t2 - t1} abc`; -`Exp: ${+t1 ** t2 - t1} abc`; -`Exp: ${-++t1 ** t2 - t1} abc`; -`Exp: ${+--t1 ** t2 - t1} abc`; -`Exp: ${-t1++ ** t2 - t1} abc`; -`Exp: ${-t1-- ** t2 - t1} abc`; -`Exp: ${+t1++ ** t2 - t1} abc`; -`Exp: ${+t1-- ** t2 - t1} abc`; -`Exp: ${typeof t1 ** t2 ** t1} abc`; -`Exp: ${typeof t1 ** t2 + t1} abc`; -`Exp: ${typeof t1 ** (t2 - t1)} abc`; -`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; -`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; -`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; -`Exp: ${!t1 ** t2 ** t1} abc`; -`Exp: ${!t1 ** t2 ** ++t1} abc`; -`Exp: ${!t1 ** t2 ** --t1} abc`; + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +`${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1 }`; +`${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}`; +`${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof t1 ** t2 ** t1}`; +`${1 + typeof (t1 ** t2 ** t1) }`; + +`${t1 ** t2}${t1 ** t2}`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + +`${t1 ** t2} hello world ${t1 ** t2}`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; \ No newline at end of file From 1326ba9820c5cf82fbfc88d6b048aab6560b825d Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 2 Oct 2015 19:23:58 -0700 Subject: [PATCH 030/121] Update grammar to error on none-parenthesis --- src/compiler/parser.ts | 53 +++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index aaf460f33cc..147dbfce9ef 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3141,7 +3141,7 @@ namespace ts { let node = createNode(SyntaxKind.PrefixUnaryExpression); node.operator = token; nextToken(); - node.operand = parseUnaryExpressionOrHigher(); + node.operand = parseSimpleUnaryExpression(); return finishNode(node); } @@ -3149,21 +3149,21 @@ namespace ts { function parseDeleteExpression() { let node = createNode(SyntaxKind.DeleteExpression); nextToken(); - node.expression = parseUnaryExpressionOrHigher(); + node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseTypeOfExpression() { let node = createNode(SyntaxKind.TypeOfExpression); nextToken(); - node.expression = parseUnaryExpressionOrHigher(); + node.expression = parseSimpleUnaryExpression(); return finishNode(node); } function parseVoidExpression() { let node = createNode(SyntaxKind.VoidExpression); nextToken(); - node.expression = parseUnaryExpressionOrHigher(); + node.expression = parseSimpleUnaryExpression(); return finishNode(node); } @@ -3183,12 +3183,46 @@ namespace ts { function parseAwaitExpression() { const node = createNode(SyntaxKind.AwaitExpression); nextToken(); - node.expression = parseUnaryExpressionOrHigher(); + node.expression = parseSimpleUnaryExpression(); return finishNode(node); } /** - * Parse UnaryExpression or higher: + * Comment + * @param node + */ + function isIncrementExpression(node: UnaryExpression): node is IncrementExpression { + if (node.kind === SyntaxKind.DeleteExpression || node.kind === SyntaxKind.TypeOfExpression || + node.kind === SyntaxKind.VoidExpression || node.kind === SyntaxKind.TypeAssertionExpression || + node.kind === SyntaxKind.JsxExpression) { + return false; + } + else if (node.kind === SyntaxKind.PrefixUnaryExpression && ((node).operator === SyntaxKind.PlusToken || + (node).operator === SyntaxKind.MinusToken || (node).operator === SyntaxKind.TildeToken || + (node).operator === SyntaxKind.ExclamationToken)) { + return false; + } + return true; + } + + function parseUnaryExpressionOrHigher(): UnaryExpression | BinaryExpression { + let tryParseIncrementExpression = parseSimpleUnaryExpression(); + if (token === SyntaxKind.AsteriskAsteriskToken) { + if (isIncrementExpression(tryParseIncrementExpression)) { + return parseBinaryExpressionRest(getBinaryOperatorPrecedence(), tryParseIncrementExpression); + } + else { + parseErrorAtCurrentToken(Diagnostics.Only_incrementExpression_is_allowed_as_left_operand_of_Asterisk_Asterisk); + return tryParseIncrementExpression; + } + } + else { + return tryParseIncrementExpression; + } + } + + /** + * Parse SimpleUnaryExpression or higher: * In ES7 grammar, * UnaryExpression: * 1) IncrementExpression[?yield] @@ -3201,7 +3235,7 @@ namespace ts { * 8) ! UnaryExpression[?yield] * 9) IncrementExpression[?yield] ** UnaryExpression[?yield] */ - function parseUnaryExpressionOrHigher(): UnaryExpression | BinaryExpression { + function parseSimpleUnaryExpression(): UnaryExpression { if (isAwaitExpression()) { return parseAwaitExpression(); } @@ -3230,10 +3264,7 @@ namespace ts { } // Fall through default: - let tryParseUnaryExpression = parseIncrementExpression(); - return token === SyntaxKind.AsteriskAsteriskToken ? - parseBinaryExpressionRest(getBinaryOperatorPrecedence(), tryParseUnaryExpression) : - tryParseUnaryExpression; + return parseIncrementExpression(); } } From 676a271aabc323a3c9a0668926c129d76af2e510 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 3 Oct 2015 18:08:29 -0700 Subject: [PATCH 031/121] Defer instantiation of members of instantiated anonymous types --- src/compiler/checker.ts | 37 +++++++++++++++++++------------------ src/compiler/types.ts | 9 ++++++++- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 663825f1e84..7e20958ffd7 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3171,8 +3171,8 @@ namespace ts { members = createInstantiatedSymbolTable(source.declaredProperties, mapper, /*mappingThisOnly*/ typeParameters.length === 1); callSignatures = instantiateList(source.declaredCallSignatures, mapper, instantiateSignature); constructSignatures = instantiateList(source.declaredConstructSignatures, mapper, instantiateSignature); - stringIndexType = source.declaredStringIndexType ? instantiateType(source.declaredStringIndexType, mapper) : undefined; - numberIndexType = source.declaredNumberIndexType ? instantiateType(source.declaredNumberIndexType, mapper) : undefined; + stringIndexType = instantiateType(source.declaredStringIndexType, mapper); + numberIndexType = instantiateType(source.declaredNumberIndexType, mapper); } let baseTypes = getBaseTypes(source); if (baseTypes.length) { @@ -3371,7 +3371,7 @@ namespace ts { setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexType, numberIndexType); } - function resolveAnonymousTypeMembers(type: ObjectType) { + function resolveAnonymousTypeMembers(type: AnonymousType) { let symbol = type.symbol; let members: SymbolTable; let callSignatures: Signature[]; @@ -3379,7 +3379,14 @@ namespace ts { let stringIndexType: Type; let numberIndexType: Type; - if (symbol.flags & SymbolFlags.TypeLiteral) { + if (type.target) { + members = createInstantiatedSymbolTable(getPropertiesOfObjectType(type.target), type.mapper, /*mappingThisOnly*/ false); + callSignatures = instantiateList(getSignaturesOfType(type.target, SignatureKind.Call), type.mapper, instantiateSignature); + constructSignatures = instantiateList(getSignaturesOfType(type.target, SignatureKind.Construct), type.mapper, instantiateSignature); + stringIndexType = instantiateType(getIndexTypeOfType(type.target, IndexKind.String), type.mapper); + numberIndexType = instantiateType(getIndexTypeOfType(type.target, IndexKind.Number), type.mapper); + } + else if (symbol.flags & SymbolFlags.TypeLiteral) { members = symbol.members; callSignatures = getSignaturesOfSymbol(members["__call"]); constructSignatures = getSignaturesOfSymbol(members["__new"]); @@ -3424,7 +3431,7 @@ namespace ts { resolveClassOrInterfaceMembers(type); } else if (type.flags & TypeFlags.Anonymous) { - resolveAnonymousTypeMembers(type); + resolveAnonymousTypeMembers(type); } else if (type.flags & TypeFlags.Tuple) { resolveTupleTypeMembers(type); @@ -4543,7 +4550,7 @@ namespace ts { } let result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), - signature.resolvedReturnType ? instantiateType(signature.resolvedReturnType, mapper) : undefined, + instantiateType(signature.resolvedReturnType, mapper), freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); result.target = signature; @@ -4575,7 +4582,7 @@ namespace ts { return result; } - function instantiateAnonymousType(type: ObjectType, mapper: TypeMapper): ObjectType { + function instantiateAnonymousType(type: AnonymousType, mapper: TypeMapper): ObjectType { if (mapper.instantiations) { let cachedType = mapper.instantiations[type.id]; if (cachedType) { @@ -4586,27 +4593,21 @@ namespace ts { mapper.instantiations = []; } // Mark the anonymous type as instantiated such that our infinite instantiation detection logic can recognize it - let result = createObjectType(TypeFlags.Anonymous | TypeFlags.Instantiated, type.symbol); - result.properties = instantiateList(getPropertiesOfObjectType(type), mapper, instantiateSymbol); - result.members = createSymbolTable(result.properties); - result.callSignatures = instantiateList(getSignaturesOfType(type, SignatureKind.Call), mapper, instantiateSignature); - result.constructSignatures = instantiateList(getSignaturesOfType(type, SignatureKind.Construct), mapper, instantiateSignature); - let stringIndexType = getIndexTypeOfType(type, IndexKind.String); - let numberIndexType = getIndexTypeOfType(type, IndexKind.Number); - if (stringIndexType) result.stringIndexType = instantiateType(stringIndexType, mapper); - if (numberIndexType) result.numberIndexType = instantiateType(numberIndexType, mapper); + let result = createObjectType(TypeFlags.Anonymous | TypeFlags.Instantiated, type.symbol); + result.target = type; + result.mapper = mapper; mapper.instantiations[type.id] = result; return result; } function instantiateType(type: Type, mapper: TypeMapper): Type { - if (mapper !== identityMapper) { + if (type && mapper !== identityMapper) { if (type.flags & TypeFlags.TypeParameter) { return mapper(type); } if (type.flags & TypeFlags.Anonymous) { return type.symbol && type.symbol.flags & (SymbolFlags.Function | SymbolFlags.Method | SymbolFlags.Class | SymbolFlags.TypeLiteral | SymbolFlags.ObjectLiteral) ? - instantiateAnonymousType(type, mapper) : type; + instantiateAnonymousType(type, mapper) : type; } if (type.flags & TypeFlags.Reference) { return createTypeReference((type).target, instantiateList((type).typeArguments, mapper, instantiateType)); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5979c4246b1..17156aee0f1 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1880,7 +1880,7 @@ namespace ts { } export interface TupleType extends ObjectType { - elementTypes: Type[]; // Element types + elementTypes: Type[]; // Element types } export interface UnionOrIntersectionType extends Type { @@ -1895,6 +1895,13 @@ namespace ts { export interface IntersectionType extends UnionOrIntersectionType { } + /* @internal */ + // An instantiated anonymous type has a target and a mapper + export interface AnonymousType extends ObjectType { + target?: AnonymousType; // Instantiation target + mapper?: TypeMapper; // Instantiation mapper + } + /* @internal */ // Resolved object, union, or intersection type export interface ResolvedType extends ObjectType, UnionOrIntersectionType { From 139b5545a039933132cb36d24d3d8069477e6ce6 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 3 Oct 2015 18:08:45 -0700 Subject: [PATCH 032/121] Adding tests --- .../compiler/recursiveGenericUnionType1.ts | 20 +++++++++++++++++++ .../compiler/recursiveGenericUnionType2.ts | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/cases/compiler/recursiveGenericUnionType1.ts create mode 100644 tests/cases/compiler/recursiveGenericUnionType2.ts diff --git a/tests/cases/compiler/recursiveGenericUnionType1.ts b/tests/cases/compiler/recursiveGenericUnionType1.ts new file mode 100644 index 00000000000..c1c7b3e81ad --- /dev/null +++ b/tests/cases/compiler/recursiveGenericUnionType1.ts @@ -0,0 +1,20 @@ +declare module Test1 { + export type Container = T | { + [i: string]: Container; + }; + export type IStringContainer = Container; +} + +declare module Test2 { + export type Container = T | { + [i: string]: Container; + }; + export type IStringContainer = Container; +} + +var x: Test1.Container; + +var s1: Test1.IStringContainer; +var s2: Test2.IStringContainer; +s1 = s2; +s2 = s1; diff --git a/tests/cases/compiler/recursiveGenericUnionType2.ts b/tests/cases/compiler/recursiveGenericUnionType2.ts new file mode 100644 index 00000000000..784ddefeb1f --- /dev/null +++ b/tests/cases/compiler/recursiveGenericUnionType2.ts @@ -0,0 +1,20 @@ +declare module Test1 { + export type Container = T | { + [i: string]: Container[]; + }; + export type IStringContainer = Container; +} + +declare module Test2 { + export type Container = T | { + [i: string]: Container[]; + }; + export type IStringContainer = Container; +} + +var x: Test1.Container; + +var s1: Test1.IStringContainer; +var s2: Test2.IStringContainer; +s1 = s2; +s2 = s1; From d9933c8d0e8ae718a59f3de7a284205f4d49ceee Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 3 Oct 2015 18:09:11 -0700 Subject: [PATCH 033/121] Accepting new baselines --- .../reference/recursiveGenericUnionType1.js | 29 +++++++++ .../recursiveGenericUnionType1.symbols | 62 ++++++++++++++++++ .../recursiveGenericUnionType1.types | 64 +++++++++++++++++++ .../reference/recursiveGenericUnionType2.js | 29 +++++++++ .../recursiveGenericUnionType2.symbols | 62 ++++++++++++++++++ .../recursiveGenericUnionType2.types | 64 +++++++++++++++++++ 6 files changed, 310 insertions(+) create mode 100644 tests/baselines/reference/recursiveGenericUnionType1.js create mode 100644 tests/baselines/reference/recursiveGenericUnionType1.symbols create mode 100644 tests/baselines/reference/recursiveGenericUnionType1.types create mode 100644 tests/baselines/reference/recursiveGenericUnionType2.js create mode 100644 tests/baselines/reference/recursiveGenericUnionType2.symbols create mode 100644 tests/baselines/reference/recursiveGenericUnionType2.types diff --git a/tests/baselines/reference/recursiveGenericUnionType1.js b/tests/baselines/reference/recursiveGenericUnionType1.js new file mode 100644 index 00000000000..54faae39b86 --- /dev/null +++ b/tests/baselines/reference/recursiveGenericUnionType1.js @@ -0,0 +1,29 @@ +//// [recursiveGenericUnionType1.ts] +declare module Test1 { + export type Container = T | { + [i: string]: Container; + }; + export type IStringContainer = Container; +} + +declare module Test2 { + export type Container = T | { + [i: string]: Container; + }; + export type IStringContainer = Container; +} + +var x: Test1.Container; + +var s1: Test1.IStringContainer; +var s2: Test2.IStringContainer; +s1 = s2; +s2 = s1; + + +//// [recursiveGenericUnionType1.js] +var x; +var s1; +var s2; +s1 = s2; +s2 = s1; diff --git a/tests/baselines/reference/recursiveGenericUnionType1.symbols b/tests/baselines/reference/recursiveGenericUnionType1.symbols new file mode 100644 index 00000000000..bd48cf90cde --- /dev/null +++ b/tests/baselines/reference/recursiveGenericUnionType1.symbols @@ -0,0 +1,62 @@ +=== tests/cases/compiler/recursiveGenericUnionType1.ts === +declare module Test1 { +>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType1.ts, 0, 0)) + + export type Container = T | { +>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 0, 22)) +>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 1, 26)) +>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 1, 26)) + + [i: string]: Container; +>i : Symbol(i, Decl(recursiveGenericUnionType1.ts, 2, 9)) +>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 0, 22)) +>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 1, 26)) + + }; + export type IStringContainer = Container; +>IStringContainer : Symbol(IStringContainer, Decl(recursiveGenericUnionType1.ts, 3, 6)) +>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 0, 22)) +} + +declare module Test2 { +>Test2 : Symbol(Test2, Decl(recursiveGenericUnionType1.ts, 5, 1)) + + export type Container = T | { +>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 7, 22)) +>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 8, 26)) +>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 8, 26)) + + [i: string]: Container; +>i : Symbol(i, Decl(recursiveGenericUnionType1.ts, 9, 9)) +>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 7, 22)) +>T : Symbol(T, Decl(recursiveGenericUnionType1.ts, 8, 26)) + + }; + export type IStringContainer = Container; +>IStringContainer : Symbol(IStringContainer, Decl(recursiveGenericUnionType1.ts, 10, 6)) +>Container : Symbol(Container, Decl(recursiveGenericUnionType1.ts, 7, 22)) +} + +var x: Test1.Container; +>x : Symbol(x, Decl(recursiveGenericUnionType1.ts, 14, 3)) +>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType1.ts, 0, 0)) +>Container : Symbol(Test1.Container, Decl(recursiveGenericUnionType1.ts, 0, 22)) + +var s1: Test1.IStringContainer; +>s1 : Symbol(s1, Decl(recursiveGenericUnionType1.ts, 16, 3)) +>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType1.ts, 0, 0)) +>IStringContainer : Symbol(Test1.IStringContainer, Decl(recursiveGenericUnionType1.ts, 3, 6)) + +var s2: Test2.IStringContainer; +>s2 : Symbol(s2, Decl(recursiveGenericUnionType1.ts, 17, 3)) +>Test2 : Symbol(Test2, Decl(recursiveGenericUnionType1.ts, 5, 1)) +>IStringContainer : Symbol(Test2.IStringContainer, Decl(recursiveGenericUnionType1.ts, 10, 6)) + +s1 = s2; +>s1 : Symbol(s1, Decl(recursiveGenericUnionType1.ts, 16, 3)) +>s2 : Symbol(s2, Decl(recursiveGenericUnionType1.ts, 17, 3)) + +s2 = s1; +>s2 : Symbol(s2, Decl(recursiveGenericUnionType1.ts, 17, 3)) +>s1 : Symbol(s1, Decl(recursiveGenericUnionType1.ts, 16, 3)) + diff --git a/tests/baselines/reference/recursiveGenericUnionType1.types b/tests/baselines/reference/recursiveGenericUnionType1.types new file mode 100644 index 00000000000..c153aba0e7c --- /dev/null +++ b/tests/baselines/reference/recursiveGenericUnionType1.types @@ -0,0 +1,64 @@ +=== tests/cases/compiler/recursiveGenericUnionType1.ts === +declare module Test1 { +>Test1 : any + + export type Container = T | { +>Container : T | { [i: string]: T | any; } +>T : T +>T : T + + [i: string]: Container; +>i : string +>Container : T | { [i: string]: T | any; } +>T : T + + }; + export type IStringContainer = Container; +>IStringContainer : string | { [i: string]: string | any; } +>Container : T | { [i: string]: T | any; } +} + +declare module Test2 { +>Test2 : any + + export type Container = T | { +>Container : T | { [i: string]: T | any; } +>T : T +>T : T + + [i: string]: Container; +>i : string +>Container : T | { [i: string]: T | any; } +>T : T + + }; + export type IStringContainer = Container; +>IStringContainer : string | { [i: string]: string | any; } +>Container : T | { [i: string]: T | any; } +} + +var x: Test1.Container; +>x : number | { [i: string]: number | any; } +>Test1 : any +>Container : T | { [i: string]: T | any; } + +var s1: Test1.IStringContainer; +>s1 : string | { [i: string]: string | any; } +>Test1 : any +>IStringContainer : string | { [i: string]: string | any; } + +var s2: Test2.IStringContainer; +>s2 : string | { [i: string]: string | any; } +>Test2 : any +>IStringContainer : string | { [i: string]: string | any; } + +s1 = s2; +>s1 = s2 : string | { [i: string]: string | any; } +>s1 : string | { [i: string]: string | any; } +>s2 : string | { [i: string]: string | any; } + +s2 = s1; +>s2 = s1 : string | { [i: string]: string | any; } +>s2 : string | { [i: string]: string | any; } +>s1 : string | { [i: string]: string | any; } + diff --git a/tests/baselines/reference/recursiveGenericUnionType2.js b/tests/baselines/reference/recursiveGenericUnionType2.js new file mode 100644 index 00000000000..bb7977d02cd --- /dev/null +++ b/tests/baselines/reference/recursiveGenericUnionType2.js @@ -0,0 +1,29 @@ +//// [recursiveGenericUnionType2.ts] +declare module Test1 { + export type Container = T | { + [i: string]: Container[]; + }; + export type IStringContainer = Container; +} + +declare module Test2 { + export type Container = T | { + [i: string]: Container[]; + }; + export type IStringContainer = Container; +} + +var x: Test1.Container; + +var s1: Test1.IStringContainer; +var s2: Test2.IStringContainer; +s1 = s2; +s2 = s1; + + +//// [recursiveGenericUnionType2.js] +var x; +var s1; +var s2; +s1 = s2; +s2 = s1; diff --git a/tests/baselines/reference/recursiveGenericUnionType2.symbols b/tests/baselines/reference/recursiveGenericUnionType2.symbols new file mode 100644 index 00000000000..bd189e68f3a --- /dev/null +++ b/tests/baselines/reference/recursiveGenericUnionType2.symbols @@ -0,0 +1,62 @@ +=== tests/cases/compiler/recursiveGenericUnionType2.ts === +declare module Test1 { +>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType2.ts, 0, 0)) + + export type Container = T | { +>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 0, 22)) +>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 1, 26)) +>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 1, 26)) + + [i: string]: Container[]; +>i : Symbol(i, Decl(recursiveGenericUnionType2.ts, 2, 9)) +>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 0, 22)) +>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 1, 26)) + + }; + export type IStringContainer = Container; +>IStringContainer : Symbol(IStringContainer, Decl(recursiveGenericUnionType2.ts, 3, 6)) +>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 0, 22)) +} + +declare module Test2 { +>Test2 : Symbol(Test2, Decl(recursiveGenericUnionType2.ts, 5, 1)) + + export type Container = T | { +>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 7, 22)) +>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 8, 26)) +>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 8, 26)) + + [i: string]: Container[]; +>i : Symbol(i, Decl(recursiveGenericUnionType2.ts, 9, 9)) +>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 7, 22)) +>T : Symbol(T, Decl(recursiveGenericUnionType2.ts, 8, 26)) + + }; + export type IStringContainer = Container; +>IStringContainer : Symbol(IStringContainer, Decl(recursiveGenericUnionType2.ts, 10, 6)) +>Container : Symbol(Container, Decl(recursiveGenericUnionType2.ts, 7, 22)) +} + +var x: Test1.Container; +>x : Symbol(x, Decl(recursiveGenericUnionType2.ts, 14, 3)) +>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType2.ts, 0, 0)) +>Container : Symbol(Test1.Container, Decl(recursiveGenericUnionType2.ts, 0, 22)) + +var s1: Test1.IStringContainer; +>s1 : Symbol(s1, Decl(recursiveGenericUnionType2.ts, 16, 3)) +>Test1 : Symbol(Test1, Decl(recursiveGenericUnionType2.ts, 0, 0)) +>IStringContainer : Symbol(Test1.IStringContainer, Decl(recursiveGenericUnionType2.ts, 3, 6)) + +var s2: Test2.IStringContainer; +>s2 : Symbol(s2, Decl(recursiveGenericUnionType2.ts, 17, 3)) +>Test2 : Symbol(Test2, Decl(recursiveGenericUnionType2.ts, 5, 1)) +>IStringContainer : Symbol(Test2.IStringContainer, Decl(recursiveGenericUnionType2.ts, 10, 6)) + +s1 = s2; +>s1 : Symbol(s1, Decl(recursiveGenericUnionType2.ts, 16, 3)) +>s2 : Symbol(s2, Decl(recursiveGenericUnionType2.ts, 17, 3)) + +s2 = s1; +>s2 : Symbol(s2, Decl(recursiveGenericUnionType2.ts, 17, 3)) +>s1 : Symbol(s1, Decl(recursiveGenericUnionType2.ts, 16, 3)) + diff --git a/tests/baselines/reference/recursiveGenericUnionType2.types b/tests/baselines/reference/recursiveGenericUnionType2.types new file mode 100644 index 00000000000..f98cf144780 --- /dev/null +++ b/tests/baselines/reference/recursiveGenericUnionType2.types @@ -0,0 +1,64 @@ +=== tests/cases/compiler/recursiveGenericUnionType2.ts === +declare module Test1 { +>Test1 : any + + export type Container = T | { +>Container : T | { [i: string]: (T | any)[]; } +>T : T +>T : T + + [i: string]: Container[]; +>i : string +>Container : T | { [i: string]: (T | any)[]; } +>T : T + + }; + export type IStringContainer = Container; +>IStringContainer : string | { [i: string]: (string | any)[]; } +>Container : T | { [i: string]: (T | any)[]; } +} + +declare module Test2 { +>Test2 : any + + export type Container = T | { +>Container : T | { [i: string]: (T | any)[]; } +>T : T +>T : T + + [i: string]: Container[]; +>i : string +>Container : T | { [i: string]: (T | any)[]; } +>T : T + + }; + export type IStringContainer = Container; +>IStringContainer : string | { [i: string]: (string | any)[]; } +>Container : T | { [i: string]: (T | any)[]; } +} + +var x: Test1.Container; +>x : number | { [i: string]: (number | any)[]; } +>Test1 : any +>Container : T | { [i: string]: (T | any)[]; } + +var s1: Test1.IStringContainer; +>s1 : string | { [i: string]: (string | any)[]; } +>Test1 : any +>IStringContainer : string | { [i: string]: (string | any)[]; } + +var s2: Test2.IStringContainer; +>s2 : string | { [i: string]: (string | any)[]; } +>Test2 : any +>IStringContainer : string | { [i: string]: (string | any)[]; } + +s1 = s2; +>s1 = s2 : string | { [i: string]: (string | any)[]; } +>s1 : string | { [i: string]: (string | any)[]; } +>s2 : string | { [i: string]: (string | any)[]; } + +s2 = s1; +>s2 = s1 : string | { [i: string]: (string | any)[]; } +>s2 : string | { [i: string]: (string | any)[]; } +>s1 : string | { [i: string]: (string | any)[]; } + From c9e237c2b3bbe8c4cec39fb57137978064d4631c Mon Sep 17 00:00:00 2001 From: SaschaNaz Date: Mon, 5 Oct 2015 07:02:22 +0900 Subject: [PATCH 034/121] Format template internal spaces --- src/services/formatting/rules.ts | 8 ++++-- .../cases/fourslash/formatTemplateLiteral.ts | 26 +++++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 02e785f6b3e..c3bc8e7802d 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -216,8 +216,10 @@ namespace ts.formatting { // Async functions public SpaceBetweenAsyncAndFunctionKeyword: Rule; - // Tagged template string + // Template strings public SpaceBetweenTagAndTemplateString: Rule; + public NoSpaceAfterTemplateHeadAndMiddle: Rule; + public NoSpaceBeforeTemplateMiddleAndTail: Rule; constructor() { /// @@ -371,6 +373,8 @@ namespace ts.formatting { // template string this.SpaceBetweenTagAndTemplateString = new Rule(RuleDescriptor.create3(SyntaxKind.Identifier, Shared.TokenRange.FromTokens([SyntaxKind.NoSubstitutionTemplateLiteral, SyntaxKind.TemplateHead])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); + this.NoSpaceAfterTemplateHeadAndMiddle = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.TemplateHead, SyntaxKind.TemplateMiddle]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); + this.NoSpaceBeforeTemplateMiddleAndTail = new Rule(RuleDescriptor.create4(Shared.TokenRange.Any, Shared.TokenRange.FromTokens([SyntaxKind.TemplateMiddle, SyntaxKind.TemplateTail])), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete)); // These rules are higher in priority than user-configurable rules. this.HighPriorityCommonRules = @@ -399,7 +403,7 @@ namespace ts.formatting { this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, this.SpaceAfterVoidOperator, this.SpaceBetweenAsyncAndFunctionKeyword, - this.SpaceBetweenTagAndTemplateString, + this.SpaceBetweenTagAndTemplateString, this.NoSpaceAfterTemplateHeadAndMiddle, this.NoSpaceBeforeTemplateMiddleAndTail, // TypeScript-specific rules this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, diff --git a/tests/cases/fourslash/formatTemplateLiteral.ts b/tests/cases/fourslash/formatTemplateLiteral.ts index 6d1352fcf0d..68f2c8c9469 100644 --- a/tests/cases/fourslash/formatTemplateLiteral.ts +++ b/tests/cases/fourslash/formatTemplateLiteral.ts @@ -2,12 +2,16 @@ ////var x = `sadasdasdasdasfegsfd /////*1*/rasdesgeryt35t35y35 e4 ergt er 35t 3535 `; ////var y = `1${2}/*2*/3`; -////let z= `foo`/*3*/ -////let w= `bar${3}`/*4*/ +//// +/////*formatStart*/ +////let z= `foo`;/*3*/ +////let w= `bar${3}`;/*4*/ ////String.raw -//// `template`/*5*/ -////String.raw`foo`/*6*/ -////String.raw `bar${3}`/*7*/ +//// `template`;/*5*/ +////String.raw`foo`;/*6*/ +////String.raw `bar${3}`;/*7*/ +////`Write ${ JSON.stringify("") } and ${ (765) } and ${ 346 }`;/*spaceInside*/ +/////*formatEnd*/ goTo.marker("1"); @@ -18,19 +22,19 @@ edit.insert("\r\n"); verify.indentationIs(0); verify.currentLineContentIs("3`;") +format.selection("formatStart", "formatEnd"); + goTo.marker("3"); -edit.insert(";"); verify.currentLineContentIs("let z = `foo`;"); goTo.marker("4"); -edit.insert(";"); verify.currentLineContentIs("let w = `bar${3}`;"); goTo.marker("5"); -edit.insert(";"); verify.currentLineContentIs(" `template`;"); goTo.marker("6"); -edit.insert(";"); verify.currentLineContentIs("String.raw `foo`;"); goTo.marker("7"); -edit.insert(";"); -verify.currentLineContentIs("String.raw `bar${3}`;"); \ No newline at end of file +verify.currentLineContentIs("String.raw `bar${3}`;"); + +goTo.marker("spaceInside"); +verify.currentLineContentIs('`Write ${JSON.stringify("")} and ${(765)} and ${346}`;'); \ No newline at end of file From 7fa26adf28b2e628787b84484eead5f87c7db438 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Mon, 5 Oct 2015 02:58:40 -0700 Subject: [PATCH 035/121] Redesigned directory watchers --- src/compiler/core.ts | 36 +++++++ src/compiler/sys.ts | 19 +++- src/server/editorServices.ts | 186 ++++++++++++++++++++++++----------- 3 files changed, 182 insertions(+), 59 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index ce59c3b3bc6..a4c9a987267 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -700,6 +700,9 @@ namespace ts { } export function getBaseFileName(path: string) { + if (!path) { + return undefined; + } let i = path.lastIndexOf(directorySeparator); return i < 0 ? path : path.substring(i + 1); } @@ -723,6 +726,18 @@ namespace ts { */ export const supportedExtensions = [".ts", ".tsx", ".d.ts"]; + export function isSupportedSourceFileName(fileName: string) { + if (!fileName) { return false; } + + let dotIndex = fileName.lastIndexOf("."); + if (dotIndex < 0) { + return false; + } + + let extension = fileName.slice(dotIndex, fileName.length); + return supportedExtensions.indexOf(extension) >= 0; + } + const extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"]; export function removeFileExtension(path: string): string { for (let ext of extensionsToRemove) { @@ -817,4 +832,25 @@ namespace ts { Debug.assert(false, message); } } + + export function doTwoArraysHaveTheSameElements(array1: Array, array2: Array): Boolean { + if (!array1 || !array2) { + return false; + } + + if (array1.length != array2.length) { + return false; + } + + array1 = array1.sort(); + array2 = array2.sort(); + + for (let i = 0; i < array1.length; i++) { + if (array1[i] != array2[i]) { + return false; + } + } + + return true; + } } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 85c674ec904..02728dffaf4 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -398,7 +398,8 @@ namespace ts { // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. if (isNode4OrLater()) { - return _fs.watch(fileName, (eventName: string, path: string) => callback(path)); + // Note: in node the callback of fs.watch is given only the base file name as a parameter + return _fs.watch(fileName, (eventName: string, baseFileName: string) => callback(fileName)); } var watchedFile = watchedFileSet.addFile(fileName, callback); @@ -410,8 +411,22 @@ namespace ts { // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) // therefore if the current node.js version is newer than 4, use `fs.watch` instead. + + // In watchDirectory we only care about adding and removing files (when event name is + // "rename"); changes made within files are handled by corresponding fileWatchers (when + // event name is "change") + if (isNode4OrLater()) { - return _fs.watch(path, { persisten: true, recursive: !!recursive }, (eventName: string, modifiedPath: string) => callback(modifiedPath)); + return _fs.watch( + path, + { persisten: true, recursive: !!recursive }, + (eventName: string, relativeFileName: string) => { + if (eventName == "rename") { + // when deleting a file, the passed baseFileName is null + callback(relativeFileName == null ? null : ts.combinePaths(path, ts.normalizeSlashes(relativeFileName))) + }; + } + ); } // If Node version is older than 4.0, the "recursive" parameter will be ignored diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index dc6b8700a3d..80cebe665ae 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -354,11 +354,9 @@ namespace ts.server { compilerService: CompilerService; projectFilename: string; projectFileWatcher: FileWatcher; - // Inferred projects have a collection of non-recursive directory watchers starting - // from the root path (e.g. "C:\" or "/") to the current path; - // while configured projects whose tsconfig files don't have a "files" array have one - // recursive directory watcher starting from the current path - directoryWatchers: FileWatcher[] = []; + directoryWatcher: FileWatcher; + // Used to keep track of what directories are watched for this project + directoriesWatchedForTsconfig: string[] = []; program: ts.Program; filenameToSourceFile: ts.Map = {}; updateGraphSeq = 0; @@ -382,6 +380,10 @@ namespace ts.server { return this.projectService.openFile(filename, false); } + getRootFiles() { + return this.compilerService.host.roots.map(info => info.fileName); + } + getFileNames() { let sourceFiles = this.program.getSourceFiles(); return sourceFiles.map(sourceFile => sourceFile.fileName); @@ -434,13 +436,11 @@ namespace ts.server { // add a root file to project addRoot(info: ScriptInfo) { - info.defaultProject = this; this.compilerService.host.addRoot(info); } // remove a root file from project removeRoot(info: ScriptInfo) { - info.defaultProject = undefined; this.compilerService.host.removeRoot(info); } @@ -496,6 +496,11 @@ namespace ts.server { openFilesReferenced: ScriptInfo[] = []; // open files that are roots of a configured project openFileRootsConfigured: ScriptInfo[] = []; + // a path to directory watcher map that detects added tsconfig files + directoryWatchersForTsconfig: ts.Map = {}; + // count of how many projects are using the directory watcher. If the + // number becomes 0 for a watcher, then we should close it. + directoryWatchersRefCount: ts.Map = {}; hostConfiguration: HostConfiguration; constructor(public host: ServerHost, public psLogger: Logger, public eventHandler?: ProjectServiceEventHandler) { @@ -538,32 +543,53 @@ namespace ts.server { } /** - * This is the callback function when the directory that an inferred project belongs - * to changed. The function looks for newly added tsconfig.json files; if it found one, - * and the tsconfig.json file contains the root file of the current inferred project, - * it will update the project structure. + * This is the callback function when a watched directory has added or removed files. + * @param project the project that associates with this directory watcher + * @param fileName the absolute file name that changed in watched directory */ - watchedDirectoryChanged(project: Project, path: string) { - if (project.isConfiguredProject()) { + directoryWatchedForSourceFilesChanged(project: Project, fileName: string) { + // If a change was made inside "folder/file", node will trigger the callback twice: + // one with the fileName being "folder/file", and the other one with "folder". + // We don't respond to the second one. + if (fileName && !ts.isSupportedSourceFileName(fileName)) { return; } - let configFileName = ts.combinePaths(path, "tsconfig.json"); - if (sys.fileExists(configFileName)) { - let {succeeded, projectOptions, error} = this.configFileToProjectOptions(configFileName); - if (!succeeded) { + this.log("Detected source file changes: " + fileName); + + let { succeeded, projectOptions, error } = this.configFileToProjectOptions(project.projectFilename); + let newRootFiles = projectOptions.files.map(f => this.getCanonicalFileName(f)); + let currentRootFiles = project.getRootFiles().map(f => this.getCanonicalFileName(f)); + + if (!doTwoArraysHaveTheSameElements(currentRootFiles, newRootFiles)) { + // For configured projects, the change is made outside the tsconfig file, and + // it is not likely to affect the project for other files opened by the client. We can + // just update the current project. + this.updateConfiguredProject(project); + + // Call updateProjectStructure to clean up inferred projects we may have created for the + // new files + this.updateProjectStructure(); + } + } + + directoryWatchedForTsconfigChanged(fileName: string) { + if (ts.getBaseFileName(fileName) != "tsconfig.json") { + this.log(fileName + " is not tsconfig.json"); + return; + } + + this.log("Detected newly added tsconfig file: " + fileName); + + let { succeeded, projectOptions, error } = this.configFileToProjectOptions(fileName); + let rootFilesInTsconfig = projectOptions.files.map(f => this.getCanonicalFileName(f)); + let openFileRoots = this.openFileRoots.map(s => this.getCanonicalFileName(s.fileName)); + + for (let openFileRoot of openFileRoots) { + if (rootFilesInTsconfig.indexOf(openFileRoot) >= 0) { + this.reloadProjects(); return; } - - let newProjectFileNames = projectOptions.files.map(f => this.getCanonicalFileName(f)); - let rootFiles = project.getRootFiles().map(f => this.getCanonicalFileName(f)); - for (let rootFile of rootFiles) { - if (newProjectFileNames.indexOf(rootFile) >= 0) { - this.reloadProjects(); - return; - } - } - } } @@ -573,7 +599,7 @@ namespace ts.server { } watchedProjectConfigFileChanged(project: Project) { - this.log("Config File Changed: " + project.projectFilename); + this.log("Config file changed: " + project.projectFilename); this.updateConfiguredProject(project); this.updateProjectStructure(); } @@ -613,8 +639,18 @@ namespace ts.server { let currentPath = ts.getDirectoryPath(root.fileName); let parentPath = ts.getDirectoryPath(currentPath); while (currentPath != parentPath) { - // To finish - let directoryWatcher = this.host.watchDirectory(currentPath, p => this.);; + if (!project.projectService.directoryWatchersForTsconfig[currentPath]) { + this.log("Add watcher for: " + currentPath); + project.projectService.directoryWatchersForTsconfig[currentPath] = + this.host.watchDirectory(currentPath, fileName => this.directoryWatchedForTsconfigChanged(fileName)); + project.projectService.directoryWatchersRefCount[currentPath] = 1; + } + else { + project.projectService.directoryWatchersRefCount[currentPath] += 1; + } + project.directoriesWatchedForTsconfig.push(currentPath); + currentPath = parentPath; + parentPath = ts.getDirectoryPath(parentPath); } project.finishGraph(); @@ -663,9 +699,23 @@ namespace ts.server { this.configuredProjects = configuredProjects; } - removeConfiguredProject(project: Project) { - project.projectFileWatcher.close(); - this.configuredProjects = copyListRemovingItem(project, this.configuredProjects); + removeProject(project: Project) { + this.log("remove project: " + project.getRootFiles().toString()); + if (project.isConfiguredProject()) { + project.projectFileWatcher.close(); + project.directoryWatcher.close(); + this.configuredProjects = copyListRemovingItem(project, this.configuredProjects); + } + else { + for (let directory of project.directoriesWatchedForTsconfig) { + if (!(--project.projectService.directoryWatchersRefCount[directory])) { + this.log("Close directory watcher for: " + directory); + project.projectService.directoryWatchersForTsconfig[directory].close(); + project.projectService.directoryWatchersForTsconfig[directory] = undefined; + } + } + this.inferredProjects = copyListRemovingItem(project, this.inferredProjects); + } let fileNames = project.getFileNames(); for (let fileName of fileNames) { @@ -707,8 +757,7 @@ namespace ts.server { // if r referenced by the new project if (info.defaultProject.getSourceFile(r)) { // remove project rooted at r - this.inferredProjects = - copyListRemovingItem(r.defaultProject, this.inferredProjects); + this.removeProject(r.defaultProject); // put r in referenced open file list this.openFilesReferenced.push(r); // set default project of r to the new project @@ -761,19 +810,14 @@ namespace ts.server { this.openFileRootsConfigured = openFileRootsConfigured; } if (removedProject) { - if (removedProject.isConfiguredProject()) { - this.configuredProjects = copyListRemovingItem(removedProject, this.configuredProjects); - } - else { - this.inferredProjects = copyListRemovingItem(removedProject, this.inferredProjects); - } + this.removeProject(removedProject); var openFilesReferenced: ScriptInfo[] = []; var orphanFiles: ScriptInfo[] = []; // for all open, referenced files f for (var i = 0, len = this.openFilesReferenced.length; i < len; i++) { var f = this.openFilesReferenced[i]; // if f was referenced by the removed project, remember it - if (f.defaultProject === removedProject) { + if (f.defaultProject === removedProject || !f.defaultProject) { f.defaultProject = undefined; orphanFiles.push(f); } @@ -817,7 +861,11 @@ namespace ts.server { return referencingProjects; } + /** + * This function rebuilds the project for every file opened by the client + */ reloadProjects() { + this.log("reload projects."); // First check if there is new tsconfig file added for inferred project roots for (let info of this.openFileRoots) { this.openOrUpdateConfiguredProjectForFile(info.fileName); @@ -878,14 +926,25 @@ namespace ts.server { var rootFile = this.openFileRoots[i]; var rootedProject = rootFile.defaultProject; var referencingProjects = this.findReferencingProjects(rootFile, rootedProject); - if (referencingProjects.length === 0) { - rootFile.defaultProject = rootedProject; - openFileRoots.push(rootFile); + + if (rootFile.defaultProject.isConfiguredProject()) { + // If the root file has already been added into a configured project, + // meaning the original inferred project is gone already. + if (!rootedProject.isConfiguredProject()) { + this.removeProject(rootedProject); + } + this.openFileRootsConfigured.push(rootFile); } else { - // remove project from inferred projects list because root captured - this.inferredProjects = copyListRemovingItem(rootedProject, this.inferredProjects); - this.openFilesReferenced.push(rootFile); + if (referencingProjects.length === 0) { + rootFile.defaultProject = rootedProject; + openFileRoots.push(rootFile); + } + else { + // remove project from inferred projects list because root captured + this.removeProject(rootedProject); + this.openFilesReferenced.push(rootFile); + } } } this.openFileRoots = openFileRoots; @@ -897,6 +956,9 @@ namespace ts.server { this.addOpenFile(unattachedOpenFiles[i]); } this.printProjects(); + + this.log("Current openFileRoots: " + this.openFileRoots.map(s => s.fileName).toString()); + this.log("Current openFileRootsConfigured: " + this.openFileRootsConfigured.map(s => s.fileName).toString()); } getScriptInfo(filename: string) { @@ -970,6 +1032,11 @@ namespace ts.server { return info; } + /** + * This function tries to search for a tsconfig.json for the given file. If we found it, + * we first detect if there is already a configured project created for it: if so, we re-read + * the tsconfig file content and update the project; otherwise we create a new one. + */ openOrUpdateConfiguredProjectForFile(fileName: string) { let searchPath = ts.normalizePath(getDirectoryPath(fileName)); this.log("Search path: " + searchPath, "Info"); @@ -1099,7 +1166,7 @@ namespace ts.server { return { succeeded: false, error: { errorMsg: "tsconfig option errors" } }; } else if (parsedCommandLine.fileNames == null) { - return { succeeded: false, error: { errorMsg: "no files found" } } + return { succeeded: false, error: { errorMsg: "no files found" } }; } else { var projectOptions: ProjectOptions = { @@ -1118,27 +1185,32 @@ namespace ts.server { return error; } else { - let proj = this.createProject(configFilename, projectOptions); - for (let i = 0, len = projectOptions.files.length; i < len; i++) { - let rootFilename = projectOptions.files[i]; + let project = this.createProject(configFilename, projectOptions); + for (let rootFilename of projectOptions.files) { if (this.host.fileExists(rootFilename)) { let info = this.openFile(rootFilename, /*openedByClient*/ clientFileName == rootFilename); - proj.addRoot(info); + project.addRoot(info); } else { return { errorMsg: "specified file " + rootFilename + " not found" }; } } - proj.finishGraph(); - proj.projectFileWatcher = this.host.watchFile(configFilename, _ => this.watchedProjectConfigFileChanged(proj)); - return { success: true, project: proj }; + project.finishGraph(); + project.projectFileWatcher = this.host.watchFile(configFilename, _ => this.watchedProjectConfigFileChanged(project)); + this.log("Add recursive watcher for: " + ts.getDirectoryPath(configFilename)); + project.directoryWatcher = this.host.watchDirectory( + ts.getDirectoryPath(configFilename), + path => this.directoryWatchedForSourceFilesChanged(project, path), + /*recursive*/ true + ); + return { success: true, project: project }; } } updateConfiguredProject(project: Project) { if (!this.host.fileExists(project.projectFilename)) { this.log("Config file deleted"); - this.removeConfiguredProject(project); + this.removeProject(project); } else { let { succeeded, projectOptions, error } = this.configFileToProjectOptions(project.projectFilename); From ce7a05440731815721e3cff7e471bc7368d206d8 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 10:34:48 -0700 Subject: [PATCH 036/121] Update parser with new grammar --- .../diagnosticInformationMap.generated.ts | 1 + src/compiler/diagnosticMessages.json | 12 +++-- src/compiler/parser.ts | 46 ++++++++++--------- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 37989c3433a..5b12e5ac215 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -618,5 +618,6 @@ namespace ts { JSX_attribute_expected: { code: 17003, category: DiagnosticCategory.Error, key: "JSX attribute expected." }, Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: DiagnosticCategory.Error, key: "Cannot use JSX unless the '--jsx' flag is provided." }, A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: DiagnosticCategory.Error, key: "A constructor cannot contain a 'super' call when its class extends 'null'" }, + Left_hand_side_of_Asterisk_Asterisk_cannot_be_a_simple_unary_expression_Consider_parenthesize_the_expression: { code: 17006, category: DiagnosticCategory.Error, key: "Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression." }, }; } \ No newline at end of file diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index c1657a81bab..34dd1ffa227 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1700,11 +1700,11 @@ "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead.": { "category": "Error", "code": 2652 - }, + }, "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'.": { "category": "Error", "code": 2653 - }, + }, "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.": { "category": "Error", "code": 2654 @@ -1712,11 +1712,11 @@ "Exported external package typings can only be in '.d.ts' files. Please contact the package author to update the package definition.": { "category": "Error", "code": 2655 - }, + }, "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition.": { "category": "Error", "code": 2656 - }, + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 @@ -2466,5 +2466,9 @@ "A constructor cannot contain a 'super' call when its class extends 'null'": { "category": "Error", "code": 17005 + }, + "Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.": { + "category": "Error", + "code": 17006 } } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 147dbfce9ef..8cbe82c7c01 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3191,34 +3191,36 @@ namespace ts { * Comment * @param node */ - function isIncrementExpression(node: UnaryExpression): node is IncrementExpression { - if (node.kind === SyntaxKind.DeleteExpression || node.kind === SyntaxKind.TypeOfExpression || - node.kind === SyntaxKind.VoidExpression || node.kind === SyntaxKind.TypeAssertionExpression || - node.kind === SyntaxKind.JsxExpression) { - return false; + function isIncrementExpression(): boolean{ + // TODO(yuisu): Comment why we have to do what are we doing here + switch (token) { + case SyntaxKind.PlusToken: + case SyntaxKind.MinusToken: + case SyntaxKind.TildeToken: + case SyntaxKind.ExclamationToken: + case SyntaxKind.DeleteKeyword: + case SyntaxKind.TypeOfKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.LessThanToken: + return false; + default: + return true; } - else if (node.kind === SyntaxKind.PrefixUnaryExpression && ((node).operator === SyntaxKind.PlusToken || - (node).operator === SyntaxKind.MinusToken || (node).operator === SyntaxKind.TildeToken || - (node).operator === SyntaxKind.ExclamationToken)) { - return false; - } - return true; } function parseUnaryExpressionOrHigher(): UnaryExpression | BinaryExpression { - let tryParseIncrementExpression = parseSimpleUnaryExpression(); + if (isIncrementExpression()) { + let incrementExpression = parseIncrementExpression(); + return token === SyntaxKind.AsteriskAsteriskToken ? + parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : + incrementExpression; + } + + let simpleUnaryExpression = parseSimpleUnaryExpression(); if (token === SyntaxKind.AsteriskAsteriskToken) { - if (isIncrementExpression(tryParseIncrementExpression)) { - return parseBinaryExpressionRest(getBinaryOperatorPrecedence(), tryParseIncrementExpression); - } - else { - parseErrorAtCurrentToken(Diagnostics.Only_incrementExpression_is_allowed_as_left_operand_of_Asterisk_Asterisk); - return tryParseIncrementExpression; - } - } - else { - return tryParseIncrementExpression; + parseErrorAtCurrentToken(Diagnostics.Left_hand_side_of_Asterisk_Asterisk_cannot_be_a_simple_unary_expression_Consider_parenthesize_the_expression) } + return simpleUnaryExpression; } /** From 28475c345d50dd59bb3d385201d6dd74d4523ae7 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 5 Oct 2015 11:22:16 -0700 Subject: [PATCH 037/121] Change prologue emit location to inside module IIFEs --- src/compiler/emitter.ts | 24 +++++++++++-------- .../baselines/reference/modulePrologueAMD.js | 15 ++++++++++++ .../reference/modulePrologueAMD.symbols | 6 +++++ .../reference/modulePrologueAMD.types | 7 ++++++ .../reference/modulePrologueCommonjs.js | 13 ++++++++++ .../reference/modulePrologueCommonjs.symbols | 6 +++++ .../reference/modulePrologueCommonjs.types | 7 ++++++ .../baselines/reference/modulePrologueES6.js | 9 +++++++ .../reference/modulePrologueES6.symbols | 6 +++++ .../reference/modulePrologueES6.types | 7 ++++++ .../reference/modulePrologueSystem.js | 21 ++++++++++++++++ .../reference/modulePrologueSystem.symbols | 6 +++++ .../reference/modulePrologueSystem.types | 7 ++++++ .../baselines/reference/modulePrologueUmd.js | 22 +++++++++++++++++ .../reference/modulePrologueUmd.symbols | 6 +++++ .../reference/modulePrologueUmd.types | 7 ++++++ tests/cases/compiler/modulePrologueAMD.ts | 4 ++++ .../cases/compiler/modulePrologueCommonjs.ts | 4 ++++ tests/cases/compiler/modulePrologueES6.ts | 5 ++++ tests/cases/compiler/modulePrologueSystem.ts | 4 ++++ tests/cases/compiler/modulePrologueUmd.ts | 4 ++++ 21 files changed, 180 insertions(+), 10 deletions(-) create mode 100644 tests/baselines/reference/modulePrologueAMD.js create mode 100644 tests/baselines/reference/modulePrologueAMD.symbols create mode 100644 tests/baselines/reference/modulePrologueAMD.types create mode 100644 tests/baselines/reference/modulePrologueCommonjs.js create mode 100644 tests/baselines/reference/modulePrologueCommonjs.symbols create mode 100644 tests/baselines/reference/modulePrologueCommonjs.types create mode 100644 tests/baselines/reference/modulePrologueES6.js create mode 100644 tests/baselines/reference/modulePrologueES6.symbols create mode 100644 tests/baselines/reference/modulePrologueES6.types create mode 100644 tests/baselines/reference/modulePrologueSystem.js create mode 100644 tests/baselines/reference/modulePrologueSystem.symbols create mode 100644 tests/baselines/reference/modulePrologueSystem.types create mode 100644 tests/baselines/reference/modulePrologueUmd.js create mode 100644 tests/baselines/reference/modulePrologueUmd.symbols create mode 100644 tests/baselines/reference/modulePrologueUmd.types create mode 100644 tests/cases/compiler/modulePrologueAMD.ts create mode 100644 tests/cases/compiler/modulePrologueCommonjs.ts create mode 100644 tests/cases/compiler/modulePrologueES6.ts create mode 100644 tests/cases/compiler/modulePrologueSystem.ts create mode 100644 tests/cases/compiler/modulePrologueUmd.ts diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 11942562dcb..71187b20960 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -446,7 +446,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi /** If removeComments is true, no leading-comments needed to be emitted **/ let emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos: number) { } : emitLeadingCommentsOfPositionWorker; - let moduleEmitDelegates: Map<(node: SourceFile, startIndex: number) => void> = { + let moduleEmitDelegates: Map<(node: SourceFile) => void> = { [ModuleKind.ES6]: emitES6Module, [ModuleKind.AMD]: emitAMDModule, [ModuleKind.System]: emitSystemModule, @@ -6594,7 +6594,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write("}"); // execute } - function emitSystemModule(node: SourceFile, startIndex: number): void { + function emitSystemModule(node: SourceFile): void { collectExternalModuleInfo(node); // System modules has the following shape // System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */}) @@ -6639,6 +6639,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(`], function(${exportFunctionForFile}) {`); writeLine(); increaseIndent(); + let startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true); emitEmitHelpers(node); emitCaptureThisForNodeIfNecessary(node); emitSystemModuleBody(node, dependencyGroups, startIndex); @@ -6732,7 +6733,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(") {"); } - function emitAMDModule(node: SourceFile, startIndex: number) { + function emitAMDModule(node: SourceFile) { emitEmitHelpers(node); collectExternalModuleInfo(node); @@ -6743,6 +6744,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } emitAMDDependencies(node, /*includeNonAmdDependencies*/ true); increaseIndent(); + let startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true); emitExportStarHelper(); emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); @@ -6753,7 +6755,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write("});"); } - function emitCommonJSModule(node: SourceFile, startIndex: number) { + function emitCommonJSModule(node: SourceFile) { + let startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false); emitEmitHelpers(node); collectExternalModuleInfo(node); emitExportStarHelper(); @@ -6763,7 +6766,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitExportEquals(/*emitAsReturn*/ false); } - function emitUMDModule(node: SourceFile, startIndex: number) { + function emitUMDModule(node: SourceFile) { emitEmitHelpers(node); collectExternalModuleInfo(node); @@ -6782,6 +6785,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi })(`); emitAMDFactoryHeader(dependencyNames); increaseIndent(); + let startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true); emitExportStarHelper(); emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); @@ -6792,11 +6796,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write("});"); } - function emitES6Module(node: SourceFile, startIndex: number) { + function emitES6Module(node: SourceFile) { externalImports = undefined; exportSpecifiers = undefined; exportEquals = undefined; hasExportStars = false; + let startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false); emitEmitHelpers(node); emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); @@ -6985,14 +6990,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitShebang(); emitDetachedComments(node); - // emit prologue directives prior to __extends - let startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false); - if (isExternalModule(node) || compilerOptions.isolatedModules) { let emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[ModuleKind.CommonJS]; - emitModule(node, startIndex); + emitModule(node); } else { + // emit prologue directives prior to __extends + let startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false); externalImports = undefined; exportSpecifiers = undefined; exportEquals = undefined; diff --git a/tests/baselines/reference/modulePrologueAMD.js b/tests/baselines/reference/modulePrologueAMD.js new file mode 100644 index 00000000000..904808b9f6b --- /dev/null +++ b/tests/baselines/reference/modulePrologueAMD.js @@ -0,0 +1,15 @@ +//// [modulePrologueAMD.ts] +"use strict"; + +export class Foo {} + +//// [modulePrologueAMD.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + var Foo = (function () { + function Foo() { + } + return Foo; + })(); + exports.Foo = Foo; +}); diff --git a/tests/baselines/reference/modulePrologueAMD.symbols b/tests/baselines/reference/modulePrologueAMD.symbols new file mode 100644 index 00000000000..d6bb74d951a --- /dev/null +++ b/tests/baselines/reference/modulePrologueAMD.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/modulePrologueAMD.ts === +"use strict"; + +export class Foo {} +>Foo : Symbol(Foo, Decl(modulePrologueAMD.ts, 0, 13)) + diff --git a/tests/baselines/reference/modulePrologueAMD.types b/tests/baselines/reference/modulePrologueAMD.types new file mode 100644 index 00000000000..b57b5a8bf2f --- /dev/null +++ b/tests/baselines/reference/modulePrologueAMD.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/modulePrologueAMD.ts === +"use strict"; +>"use strict" : string + +export class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/modulePrologueCommonjs.js b/tests/baselines/reference/modulePrologueCommonjs.js new file mode 100644 index 00000000000..67b704a3650 --- /dev/null +++ b/tests/baselines/reference/modulePrologueCommonjs.js @@ -0,0 +1,13 @@ +//// [modulePrologueCommonjs.ts] +"use strict"; + +export class Foo {} + +//// [modulePrologueCommonjs.js] +"use strict"; +var Foo = (function () { + function Foo() { + } + return Foo; +})(); +exports.Foo = Foo; diff --git a/tests/baselines/reference/modulePrologueCommonjs.symbols b/tests/baselines/reference/modulePrologueCommonjs.symbols new file mode 100644 index 00000000000..01a2da349f2 --- /dev/null +++ b/tests/baselines/reference/modulePrologueCommonjs.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/modulePrologueCommonjs.ts === +"use strict"; + +export class Foo {} +>Foo : Symbol(Foo, Decl(modulePrologueCommonjs.ts, 0, 13)) + diff --git a/tests/baselines/reference/modulePrologueCommonjs.types b/tests/baselines/reference/modulePrologueCommonjs.types new file mode 100644 index 00000000000..5d76532b3e4 --- /dev/null +++ b/tests/baselines/reference/modulePrologueCommonjs.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/modulePrologueCommonjs.ts === +"use strict"; +>"use strict" : string + +export class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/modulePrologueES6.js b/tests/baselines/reference/modulePrologueES6.js new file mode 100644 index 00000000000..e34f85c9d8d --- /dev/null +++ b/tests/baselines/reference/modulePrologueES6.js @@ -0,0 +1,9 @@ +//// [modulePrologueES6.ts] +"use strict"; + +export class Foo {} + +//// [modulePrologueES6.js] +"use strict"; +export class Foo { +} diff --git a/tests/baselines/reference/modulePrologueES6.symbols b/tests/baselines/reference/modulePrologueES6.symbols new file mode 100644 index 00000000000..f45180a6998 --- /dev/null +++ b/tests/baselines/reference/modulePrologueES6.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/modulePrologueES6.ts === +"use strict"; + +export class Foo {} +>Foo : Symbol(Foo, Decl(modulePrologueES6.ts, 0, 13)) + diff --git a/tests/baselines/reference/modulePrologueES6.types b/tests/baselines/reference/modulePrologueES6.types new file mode 100644 index 00000000000..5f09a60ac6a --- /dev/null +++ b/tests/baselines/reference/modulePrologueES6.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/modulePrologueES6.ts === +"use strict"; +>"use strict" : string + +export class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/modulePrologueSystem.js b/tests/baselines/reference/modulePrologueSystem.js new file mode 100644 index 00000000000..91703d1c7fb --- /dev/null +++ b/tests/baselines/reference/modulePrologueSystem.js @@ -0,0 +1,21 @@ +//// [modulePrologueSystem.ts] +"use strict"; + +export class Foo {} + +//// [modulePrologueSystem.js] +System.register([], function(exports_1) { + "use strict"; + var Foo; + return { + setters:[], + execute: function() { + Foo = (function () { + function Foo() { + } + return Foo; + })(); + exports_1("Foo", Foo); + } + } +}); diff --git a/tests/baselines/reference/modulePrologueSystem.symbols b/tests/baselines/reference/modulePrologueSystem.symbols new file mode 100644 index 00000000000..9e5ed9d452a --- /dev/null +++ b/tests/baselines/reference/modulePrologueSystem.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/modulePrologueSystem.ts === +"use strict"; + +export class Foo {} +>Foo : Symbol(Foo, Decl(modulePrologueSystem.ts, 0, 13)) + diff --git a/tests/baselines/reference/modulePrologueSystem.types b/tests/baselines/reference/modulePrologueSystem.types new file mode 100644 index 00000000000..ac0d52e4a2b --- /dev/null +++ b/tests/baselines/reference/modulePrologueSystem.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/modulePrologueSystem.ts === +"use strict"; +>"use strict" : string + +export class Foo {} +>Foo : Foo + diff --git a/tests/baselines/reference/modulePrologueUmd.js b/tests/baselines/reference/modulePrologueUmd.js new file mode 100644 index 00000000000..65803af6cad --- /dev/null +++ b/tests/baselines/reference/modulePrologueUmd.js @@ -0,0 +1,22 @@ +//// [modulePrologueUmd.ts] +"use strict"; + +export class Foo {} + +//// [modulePrologueUmd.js] +(function (factory) { + if (typeof module === 'object' && typeof module.exports === 'object') { + var v = factory(require, exports); if (v !== undefined) module.exports = v; + } + else if (typeof define === 'function' && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + "use strict"; + var Foo = (function () { + function Foo() { + } + return Foo; + })(); + exports.Foo = Foo; +}); diff --git a/tests/baselines/reference/modulePrologueUmd.symbols b/tests/baselines/reference/modulePrologueUmd.symbols new file mode 100644 index 00000000000..3b015b2ea44 --- /dev/null +++ b/tests/baselines/reference/modulePrologueUmd.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/modulePrologueUmd.ts === +"use strict"; + +export class Foo {} +>Foo : Symbol(Foo, Decl(modulePrologueUmd.ts, 0, 13)) + diff --git a/tests/baselines/reference/modulePrologueUmd.types b/tests/baselines/reference/modulePrologueUmd.types new file mode 100644 index 00000000000..2a1064da8e2 --- /dev/null +++ b/tests/baselines/reference/modulePrologueUmd.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/modulePrologueUmd.ts === +"use strict"; +>"use strict" : string + +export class Foo {} +>Foo : Foo + diff --git a/tests/cases/compiler/modulePrologueAMD.ts b/tests/cases/compiler/modulePrologueAMD.ts new file mode 100644 index 00000000000..d5473798ee0 --- /dev/null +++ b/tests/cases/compiler/modulePrologueAMD.ts @@ -0,0 +1,4 @@ +// @module: amd +"use strict"; + +export class Foo {} \ No newline at end of file diff --git a/tests/cases/compiler/modulePrologueCommonjs.ts b/tests/cases/compiler/modulePrologueCommonjs.ts new file mode 100644 index 00000000000..d6ef5e820a3 --- /dev/null +++ b/tests/cases/compiler/modulePrologueCommonjs.ts @@ -0,0 +1,4 @@ +// @module: commonjs +"use strict"; + +export class Foo {} \ No newline at end of file diff --git a/tests/cases/compiler/modulePrologueES6.ts b/tests/cases/compiler/modulePrologueES6.ts new file mode 100644 index 00000000000..a0782891cba --- /dev/null +++ b/tests/cases/compiler/modulePrologueES6.ts @@ -0,0 +1,5 @@ +// @module: es6 +// @target: es6 +"use strict"; + +export class Foo {} \ No newline at end of file diff --git a/tests/cases/compiler/modulePrologueSystem.ts b/tests/cases/compiler/modulePrologueSystem.ts new file mode 100644 index 00000000000..d336bdb8950 --- /dev/null +++ b/tests/cases/compiler/modulePrologueSystem.ts @@ -0,0 +1,4 @@ +// @module: system +"use strict"; + +export class Foo {} \ No newline at end of file diff --git a/tests/cases/compiler/modulePrologueUmd.ts b/tests/cases/compiler/modulePrologueUmd.ts new file mode 100644 index 00000000000..2660ca75081 --- /dev/null +++ b/tests/cases/compiler/modulePrologueUmd.ts @@ -0,0 +1,4 @@ +// @module: umd +"use strict"; + +export class Foo {} \ No newline at end of file From 9db53f23cfffd88067ce241f0dc4841359c0a760 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Mon, 5 Oct 2015 13:12:13 -0700 Subject: [PATCH 038/121] Add directory watcher to tsc --- src/compiler/sys.ts | 2 +- src/compiler/tsc.ts | 57 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 14 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 02728dffaf4..840e8de8271 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -423,7 +423,7 @@ namespace ts { (eventName: string, relativeFileName: string) => { if (eventName == "rename") { // when deleting a file, the passed baseFileName is null - callback(relativeFileName == null ? null : ts.combinePaths(path, ts.normalizeSlashes(relativeFileName))) + callback(relativeFileName == null ? null : normalizePath(ts.combinePaths(path, relativeFileName))) }; } ); diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 02b8e636772..d5682d8860e 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -149,6 +149,7 @@ namespace ts { let commandLine = parseCommandLine(args); let configFileName: string; // Configuration file name (if any) let configFileWatcher: FileWatcher; // Configuration file watcher + let directoryWatcher: FileWatcher; // Directory watcher to monitor source file addition/removal let cachedProgram: Program; // Program cached from last compilation let rootFileNames: string[]; // Root fileNames for compilation let compilerOptions: CompilerOptions; // Compiler options for compilation @@ -218,28 +219,43 @@ namespace ts { if (configFileName) { configFileWatcher = sys.watchFile(configFileName, configFileChanged); } + if (sys.watchDirectory && configFileName) { + let directory = ts.getDirectoryPath(configFileName); + directoryWatcher = sys.watchDirectory( + // When the configFileName is just "tsconfig.json", the watched directory should be + // the current direcotry; if there is a given "project" parameter, then the configFileName + // is an absolute file name. + directory == "" ? "." : directory, + watchedDirectoryChanged, /*recursive*/ true); + } } performCompilation(); + function configFileToParsedCommandLine(configFilename: string): ParsedCommandLine { + let result = readConfigFile(configFileName, sys.readFile); + if (result.error) { + reportWatchDiagnostic(result.error); + sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + return; + } + + let configObject = result.config; + let configParseResult = parseConfigFile(configObject, sys, getDirectoryPath(configFileName)); + if (configParseResult.errors.length > 0) { + reportDiagnostics(configParseResult.errors); + sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + return; + } + return configParseResult; + } + // Invoked to perform initial compilation or re-compilation in watch mode function performCompilation() { if (!cachedProgram) { if (configFileName) { - - let result = readConfigFile(configFileName, sys.readFile); - if (result.error) { - reportWatchDiagnostic(result.error); - return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); - } - - let configObject = result.config; - let configParseResult = parseConfigFile(configObject, sys, getDirectoryPath(configFileName)); - if (configParseResult.errors.length > 0) { - reportDiagnostics(configParseResult.errors); - return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); - } + let configParseResult = configFileToParsedCommandLine(configFileName); rootFileNames = configParseResult.fileNames; compilerOptions = extend(commandLine.options, configParseResult.options); } @@ -309,6 +325,21 @@ namespace ts { startTimer(); } + function watchedDirectoryChanged(fileName: string) { + if (fileName && !ts.isSupportedSourceFileName(fileName)) { + return; + } + + let parsedCommandLine = configFileToParsedCommandLine(configFileName); + let newFileNames = parsedCommandLine.fileNames.map(compilerHost.getCanonicalFileName); + let canonicalRootFileNames = rootFileNames.map(compilerHost.getCanonicalFileName); + + if (!doTwoArraysHaveTheSameElements(newFileNames, canonicalRootFileNames)) { + setCachedProgram(undefined); + startTimer(); + } + } + // Upon detecting a file change, wait for 250ms and then perform a recompilation. This gives batch // operations (such as saving all modified files in an editor) a chance to complete before we kick // off a new compilation. From ab26b5950a0a87a8a314cf59eed18cca8683f14a Mon Sep 17 00:00:00 2001 From: Dick van den Brink Date: Mon, 5 Oct 2015 22:21:55 +0200 Subject: [PATCH 039/121] update npmignore file --- .npmignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 02270857e37..3b087449280 100644 --- a/.npmignore +++ b/.npmignore @@ -3,7 +3,10 @@ doc scripts src tests +tslint.json Jakefile.js -.travis.yml +.editorconfig +.gitattributes .settings/ +.travis.yml .vscode/ \ No newline at end of file From 3fd0930656f4f3ad195ffa7fe5774386ac7f73ec Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 5 Oct 2015 13:32:06 -0700 Subject: [PATCH 040/121] add internal to nmpignore --- .npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmignore b/.npmignore index 3b087449280..3af34bded4a 100644 --- a/.npmignore +++ b/.npmignore @@ -3,6 +3,7 @@ doc scripts src tests +internal tslint.json Jakefile.js .editorconfig From 7741ec09999af8c387116a80069f09766c28a240 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Mon, 5 Oct 2015 14:07:51 -0700 Subject: [PATCH 041/121] Use fs.watch for all directory watchers and some bug fixes --- src/compiler/sys.ts | 37 +++++++++++++----------------------- src/server/editorServices.ts | 2 +- src/server/session.ts | 1 + 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 840e8de8271..55235e3eda0 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -410,30 +410,19 @@ namespace ts { watchDirectory: (path, callback, recursive) => { // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) - // therefore if the current node.js version is newer than 4, use `fs.watch` instead. - - // In watchDirectory we only care about adding and removing files (when event name is - // "rename"); changes made within files are handled by corresponding fileWatchers (when - // event name is "change") - - if (isNode4OrLater()) { - return _fs.watch( - path, - { persisten: true, recursive: !!recursive }, - (eventName: string, relativeFileName: string) => { - if (eventName == "rename") { - // when deleting a file, the passed baseFileName is null - callback(relativeFileName == null ? null : normalizePath(ts.combinePaths(path, relativeFileName))) - }; - } - ); - } - - // If Node version is older than 4.0, the "recursive" parameter will be ignored - var watchedFile = watchedFileSet.addFile(path, callback); - return { - close: () => watchedFileSet.removeFile(watchedFile) - } + return _fs.watch( + path, + { persisten: true, recursive: !!recursive }, + (eventName: string, relativeFileName: string) => { + // In watchDirectory we only care about adding and removing files (when event name is + // "rename"); changes made within files are handled by corresponding fileWatchers (when + // event name is "change") + if (eventName == "rename") { + // When deleting a file, the passed baseFileName is null + callback(relativeFileName == null ? null : normalizePath(ts.combinePaths(path, relativeFileName))) + }; + } + ); }, resolvePath: function (path: string): string { return _path.resolve(path); diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 80cebe665ae..49ddd3a1a4c 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -927,7 +927,7 @@ namespace ts.server { var rootedProject = rootFile.defaultProject; var referencingProjects = this.findReferencingProjects(rootFile, rootedProject); - if (rootFile.defaultProject.isConfiguredProject()) { + if (rootFile.defaultProject && rootFile.defaultProject.isConfiguredProject()) { // If the root file has already been added into a configured project, // meaning the original inferred project is gone already. if (!rootedProject.isConfiguredProject()) { diff --git a/src/server/session.ts b/src/server/session.ts index da044e7b4c6..edc79838c92 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -779,6 +779,7 @@ namespace ts.server { } private closeClientFile(fileName: string) { + if (!fileName) { return; } var file = ts.normalizePath(fileName); this.projectService.closeClientFile(file); } From 17f0cce7724e52da55db0b5903c8dfc46d35fc84 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Mon, 5 Oct 2015 14:31:43 -0700 Subject: [PATCH 042/121] Update comments --- src/compiler/sys.ts | 4 ++-- src/server/editorServices.ts | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 55235e3eda0..1b16efe4a7a 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -398,8 +398,8 @@ namespace ts { // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. if (isNode4OrLater()) { - // Note: in node the callback of fs.watch is given only the base file name as a parameter - return _fs.watch(fileName, (eventName: string, baseFileName: string) => callback(fileName)); + // Note: in node the callback of fs.watch is given only the relative file name as a parameter + return _fs.watch(fileName, (eventName: string, relativeFileName: string) => callback(fileName)); } var watchedFile = watchedFileSet.addFile(fileName, callback); diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 49ddd3a1a4c..974f51906f6 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -543,7 +543,7 @@ namespace ts.server { } /** - * This is the callback function when a watched directory has added or removed files. + * This is the callback function when a watched directory has added or removed source code files. * @param project the project that associates with this directory watcher * @param fileName the absolute file name that changed in watched directory */ @@ -567,12 +567,15 @@ namespace ts.server { // just update the current project. this.updateConfiguredProject(project); - // Call updateProjectStructure to clean up inferred projects we may have created for the - // new files + // Call updateProjectStructure to clean up inferred projects we may have + // created for the new files this.updateProjectStructure(); } } + /** + * This is the callback function when a watched directory has an added tsconfig file. + */ directoryWatchedForTsconfigChanged(fileName: string) { if (ts.getBaseFileName(fileName) != "tsconfig.json") { this.log(fileName + " is not tsconfig.json"); @@ -585,6 +588,8 @@ namespace ts.server { let rootFilesInTsconfig = projectOptions.files.map(f => this.getCanonicalFileName(f)); let openFileRoots = this.openFileRoots.map(s => this.getCanonicalFileName(s.fileName)); + // We should only care about the new tsconfig file if it contains any + // opened root files of existing inferred projects for (let openFileRoot of openFileRoots) { if (rootFilesInTsconfig.indexOf(openFileRoot) >= 0) { this.reloadProjects(); @@ -708,6 +713,7 @@ namespace ts.server { } else { for (let directory of project.directoriesWatchedForTsconfig) { + // if the ref count for this directory watcher drops to 0, it's time to close it if (!(--project.projectService.directoryWatchersRefCount[directory])) { this.log("Close directory watcher for: " + directory); project.projectService.directoryWatchersForTsconfig[directory].close(); @@ -956,9 +962,6 @@ namespace ts.server { this.addOpenFile(unattachedOpenFiles[i]); } this.printProjects(); - - this.log("Current openFileRoots: " + this.openFileRoots.map(s => s.fileName).toString()); - this.log("Current openFileRootsConfigured: " + this.openFileRootsConfigured.map(s => s.fileName).toString()); } getScriptInfo(filename: string) { From a975895e4d3e71cca167f5b4a6353831e6defe73 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 5 Oct 2015 13:46:56 -0700 Subject: [PATCH 043/121] parse/check/emit shorthand property assignment in destructuring --- src/compiler/checker.ts | 86 +++++-- src/compiler/diagnosticMessages.json | 4 + src/compiler/emitter.ts | 18 +- src/compiler/parser.ts | 24 +- src/compiler/types.ts | 4 + tests/baselines/reference/for-of48.errors.txt | 6 +- tests/baselines/reference/for-of48.js | 2 +- ...pertyAssignmentsInDestructuring.errors.txt | 164 ++++++++++++ ...thandPropertyAssignmentsInDestructuring.js | 242 ++++++++++++++++++ ...yAssignmentsInDestructuring_ES6.errors.txt | 164 ++++++++++++ ...dPropertyAssignmentsInDestructuring_ES6.js | 213 +++++++++++++++ ...thandPropertyAssignmentsInDestructuring.ts | 118 +++++++++ ...dPropertyAssignmentsInDestructuring_ES6.ts | 118 +++++++++ 13 files changed, 1125 insertions(+), 38 deletions(-) create mode 100644 tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt create mode 100644 tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.js create mode 100644 tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt create mode 100644 tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.js create mode 100644 tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts create mode 100644 tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 40db300d310..ece6860e5b2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7313,15 +7313,15 @@ namespace ts { } function checkObjectLiteral(node: ObjectLiteralExpression, contextualMapper?: TypeMapper): Type { + let inDestructuringPattern = isAssignmentTarget(node); // Grammar checking - checkGrammarObjectLiteralExpression(node); + checkGrammarObjectLiteralExpression(node, inDestructuringPattern); let propertiesTable: SymbolTable = {}; let propertiesArray: Symbol[] = []; let contextualType = getContextualType(node); let contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === SyntaxKind.ObjectBindingPattern || contextualType.pattern.kind === SyntaxKind.ObjectLiteralExpression); - let inDestructuringPattern = isAssignmentTarget(node); let typeFlags: TypeFlags = 0; for (let memberDecl of node.properties) { @@ -7345,7 +7345,10 @@ namespace ts { if (inDestructuringPattern) { // If object literal is an assignment pattern and if the assignment pattern specifies a default value // for the property, make the property optional. - if (memberDecl.kind === SyntaxKind.PropertyAssignment && hasDefaultValue((memberDecl).initializer)) { + const isOptional = + (memberDecl.kind === SyntaxKind.PropertyAssignment && hasDefaultValue((memberDecl).initializer)) || + (memberDecl.kind === SyntaxKind.ShorthandPropertyAssignment && (memberDecl).objectAssignmentInitializer); + if (isOptional) { prop.flags |= SymbolFlags.Optional; } } @@ -9902,32 +9905,32 @@ namespace ts { return (symbol.flags & SymbolFlags.ConstEnum) !== 0; } - function checkInstanceOfExpression(node: BinaryExpression, leftType: Type, rightType: Type): Type { + function checkInstanceOfExpression(left: Expression, right: Expression, leftType: Type, rightType: Type): Type { // TypeScript 1.0 spec (April 2014): 4.15.4 // The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type, // and the right operand to be of type Any or a subtype of the 'Function' interface type. // The result is always of the Boolean primitive type. // NOTE: do not raise error if leftType is unknown as related error was already reported if (allConstituentTypesHaveKind(leftType, TypeFlags.Primitive)) { - error(node.left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); + error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } // NOTE: do not raise error if right is unknown as related error was already reported if (!(isTypeAny(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error(node.right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); + error(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); } return booleanType; } - function checkInExpression(node: BinaryExpression, leftType: Type, rightType: Type): Type { + function checkInExpression(left: Expression, right: Expression, leftType: Type, rightType: Type): Type { // TypeScript 1.0 spec (April 2014): 4.15.5 // The in operator requires the left operand to be of type Any, the String primitive type, or the Number primitive type, // and the right operand to be of type Any, an object type, or a type parameter type. // The result is always of the Boolean primitive type. if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, TypeFlags.StringLike | TypeFlags.NumberLike | TypeFlags.ESSymbol)) { - error(node.left, Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol); + error(left, Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol); } if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, TypeFlags.ObjectType | TypeFlags.TypeParameter)) { - error(node.right, Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); + error(right, Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } return booleanType; } @@ -9944,7 +9947,12 @@ namespace ts { isNumericLiteralName(name.text) && getIndexTypeOfType(sourceType, IndexKind.Number) || getIndexTypeOfType(sourceType, IndexKind.String); if (type) { - checkDestructuringAssignment((p).initializer || name, type); + if (p.kind === SyntaxKind.ShorthandPropertyAssignment) { + checkDestructuringAssignment(p, type); + } + else { + checkDestructuringAssignment((p).initializer || name, type); + } } else { error(name, Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), declarationNameToString(name)); @@ -10004,7 +10012,19 @@ namespace ts { return sourceType; } - function checkDestructuringAssignment(target: Expression, sourceType: Type, contextualMapper?: TypeMapper): Type { + function checkDestructuringAssignment(exprOrAssignment: Expression | ShorthandPropertyAssignment, sourceType: Type, contextualMapper?: TypeMapper): Type { + let target: Expression; + if (exprOrAssignment.kind === SyntaxKind.ShorthandPropertyAssignment) { + const prop = exprOrAssignment; + if (prop.objectAssignmentInitializer) { + checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper); + } + target = (exprOrAssignment).name; + } + else { + target = exprOrAssignment; + } + if (target.kind === SyntaxKind.BinaryExpression && (target).operatorToken.kind === SyntaxKind.EqualsToken) { checkBinaryExpression(target, contextualMapper); target = (target).left; @@ -10027,12 +10047,16 @@ namespace ts { } function checkBinaryExpression(node: BinaryExpression, contextualMapper?: TypeMapper) { - let operator = node.operatorToken.kind; - if (operator === SyntaxKind.EqualsToken && (node.left.kind === SyntaxKind.ObjectLiteralExpression || node.left.kind === SyntaxKind.ArrayLiteralExpression)) { - return checkDestructuringAssignment(node.left, checkExpression(node.right, contextualMapper), contextualMapper); + return checkBinaryLikeExpression(node.left, node.operatorToken, node.right, contextualMapper, node); + } + + function checkBinaryLikeExpression(left: Expression, operatorToken: Node, right: Expression, contextualMapper?: TypeMapper, errorNode?: Node) { + let operator = operatorToken.kind; + if (operator === SyntaxKind.EqualsToken && (left.kind === SyntaxKind.ObjectLiteralExpression || left.kind === SyntaxKind.ArrayLiteralExpression)) { + return checkDestructuringAssignment(left, checkExpression(right, contextualMapper), contextualMapper); } - let leftType = checkExpression(node.left, contextualMapper); - let rightType = checkExpression(node.right, contextualMapper); + let leftType = checkExpression(left, contextualMapper); + let rightType = checkExpression(right, contextualMapper); switch (operator) { case SyntaxKind.AsteriskToken: case SyntaxKind.AsteriskEqualsToken: @@ -10068,13 +10092,13 @@ namespace ts { // try and return them a helpful suggestion if ((leftType.flags & TypeFlags.Boolean) && (rightType.flags & TypeFlags.Boolean) && - (suggestedOperator = getSuggestedBooleanOperator(node.operatorToken.kind)) !== undefined) { - error(node, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(node.operatorToken.kind), tokenToString(suggestedOperator)); + (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== undefined) { + error(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator)); } else { // otherwise just check each operand separately and report errors as normal - let leftOk = checkArithmeticOperandType(node.left, leftType, Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); - let rightOk = checkArithmeticOperandType(node.right, rightType, Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); + let leftOk = checkArithmeticOperandType(left, leftType, Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); + let rightOk = checkArithmeticOperandType(right, rightType, Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); if (leftOk && rightOk) { checkAssignmentOperator(numberType); } @@ -10140,9 +10164,9 @@ namespace ts { } return booleanType; case SyntaxKind.InstanceOfKeyword: - return checkInstanceOfExpression(node, leftType, rightType); + return checkInstanceOfExpression(left, right, leftType, rightType); case SyntaxKind.InKeyword: - return checkInExpression(node, leftType, rightType); + return checkInExpression(left, right, leftType, rightType); case SyntaxKind.AmpersandAmpersandToken: return rightType; case SyntaxKind.BarBarToken: @@ -10157,8 +10181,8 @@ namespace ts { // Return true if there was no error, false if there was an error. function checkForDisallowedESSymbolOperand(operator: SyntaxKind): boolean { let offendingSymbolOperand = - someConstituentTypeHasKind(leftType, TypeFlags.ESSymbol) ? node.left : - someConstituentTypeHasKind(rightType, TypeFlags.ESSymbol) ? node.right : + someConstituentTypeHasKind(leftType, TypeFlags.ESSymbol) ? left : + someConstituentTypeHasKind(rightType, TypeFlags.ESSymbol) ? right : undefined; if (offendingSymbolOperand) { error(offendingSymbolOperand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(operator)); @@ -10192,17 +10216,17 @@ namespace ts { // requires VarExpr to be classified as a reference // A compound assignment furthermore requires VarExpr to be classified as a reference (section 4.1) // and the type of the non - compound operation to be assignable to the type of VarExpr. - let ok = checkReferenceExpression(node.left, Diagnostics.Invalid_left_hand_side_of_assignment_expression, Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); + let ok = checkReferenceExpression(left, Diagnostics.Invalid_left_hand_side_of_assignment_expression, Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); // Use default messages if (ok) { // to avoid cascading errors check assignability only if 'isReference' check succeeded and no errors were reported - checkTypeAssignableTo(valueType, leftType, node.left, /*headMessage*/ undefined); + checkTypeAssignableTo(valueType, leftType, left, /*headMessage*/ undefined); } } } function reportOperatorError() { - error(node, Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2, tokenToString(node.operatorToken.kind), typeToString(leftType), typeToString(rightType)); + error(errorNode || operatorToken, Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2, tokenToString(operatorToken.kind), typeToString(leftType), typeToString(rightType)); } } @@ -15434,7 +15458,7 @@ namespace ts { } } - function checkGrammarObjectLiteralExpression(node: ObjectLiteralExpression) { + function checkGrammarObjectLiteralExpression(node: ObjectLiteralExpression, inDestructuring: boolean) { let seen: Map = {}; let Property = 1; let GetAccessor = 2; @@ -15450,6 +15474,12 @@ namespace ts { continue; } + if (prop.kind === SyntaxKind.ShorthandPropertyAssignment && !inDestructuring && (prop).objectAssignmentInitializer) { + // having objectAssignmentInitializer is only valid in ObjectAssignmentPattern + // outside of destructuring it is a syntax error + return grammarErrorOnNode((prop).equalsToken, Diagnostics.can_only_be_used_in_object_literal_properties_inside_destructuring_assignment); + } + // ECMA-262 11.1.5 Object Initialiser // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true // a.This production is contained in strict code and IsDataDescriptor(previous) is true and diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index f6656edb250..a41d5d99005 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -800,6 +800,10 @@ "category": "Error", "code": 1311 }, + "'=' can only be used in object literal properties inside destructuring assignment.": { + "category": "Error", + "code": 1312 + }, "Duplicate identifier '{0}'.": { "category": "Error", "code": 2300 diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 71187b20960..2b422d6bfbf 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2311,6 +2311,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(": "); emit(node.name); } + + if (languageVersion >= ScriptTarget.ES6 && node.objectAssignmentInitializer) { + write(" = "); + emit(node.objectAssignmentInitializer); + } } function tryEmitConstantValue(node: PropertyAccessExpression | ElementAccessExpression): boolean { @@ -3574,7 +3579,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi for (let p of properties) { if (p.kind === SyntaxKind.PropertyAssignment || p.kind === SyntaxKind.ShorthandPropertyAssignment) { let propName = (p).name; - emitDestructuringAssignment((p).initializer || propName, createPropertyAccessForDestructuringProperty(value, propName)); + let target = p.kind === SyntaxKind.ShorthandPropertyAssignment ? p : (p).initializer || propName; + emitDestructuringAssignment(target, createPropertyAccessForDestructuringProperty(value, propName)); } } } @@ -3599,8 +3605,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } - function emitDestructuringAssignment(target: Expression, value: Expression) { - if (target.kind === SyntaxKind.BinaryExpression && (target).operatorToken.kind === SyntaxKind.EqualsToken) { + function emitDestructuringAssignment(target: Expression | ShorthandPropertyAssignment, value: Expression) { + if (target.kind === SyntaxKind.ShorthandPropertyAssignment) { + if ((target).objectAssignmentInitializer) { + value = createDefaultValueCheck(value, (target).objectAssignmentInitializer); + } + target = (target).name; + } + else if (target.kind === SyntaxKind.BinaryExpression && (target).operatorToken.kind === SyntaxKind.EqualsToken) { value = createDefaultValueCheck(value, (target).right); target = (target).left; } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index dcdaec98318..09fa2ba3b82 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -57,11 +57,17 @@ namespace ts { return visitNode(cbNode, (node).name) || visitNode(cbNode, (node).constraint) || visitNode(cbNode, (node).expression); + case SyntaxKind.ShorthandPropertyAssignment: + return visitNodes(cbNodes, node.decorators) || + visitNodes(cbNodes, node.modifiers) || + visitNode(cbNode, (node).name) || + visitNode(cbNode, (node).questionToken) || + visitNode(cbNode, (node).equalsToken) || + visitNode(cbNode, (node).objectAssignmentInitializer); case SyntaxKind.Parameter: case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: case SyntaxKind.PropertyAssignment: - case SyntaxKind.ShorthandPropertyAssignment: case SyntaxKind.VariableDeclaration: case SyntaxKind.BindingElement: return visitNodes(cbNodes, node.decorators) || @@ -3758,11 +3764,23 @@ namespace ts { return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); } - // Parse to check if it is short-hand property assignment or normal property assignment - if ((token === SyntaxKind.CommaToken || token === SyntaxKind.CloseBraceToken) && tokenIsIdentifier) { + // check if it is short-hand property assignment or normal property assignment + // NOTE: if token is EqualsToken it is interpreted as CoverInitializedName production + // CoverInitializedName[Yield] : + // IdentifierReference[?Yield] Initializer[In, ?Yield] + // this is necessary because ObjectLiteral productions are also used to cover grammar for ObjectAssignmentPattern + const isShorthandPropertyAssignment = + tokenIsIdentifier && (token === SyntaxKind.CommaToken || token === SyntaxKind.CloseBraceToken || token === SyntaxKind.EqualsToken); + + if (isShorthandPropertyAssignment) { let shorthandDeclaration = createNode(SyntaxKind.ShorthandPropertyAssignment, fullStart); shorthandDeclaration.name = propertyName; shorthandDeclaration.questionToken = questionToken; + const equalsToken = parseOptionalToken(SyntaxKind.EqualsToken); + if (equalsToken) { + shorthandDeclaration.equalsToken = equalsToken; + shorthandDeclaration.objectAssignmentInitializer = allowInAnd(parseAssignmentExpressionOrHigher); + } return finishNode(shorthandDeclaration); } else { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 17156aee0f1..c1199870c51 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -562,6 +562,10 @@ namespace ts { export interface ShorthandPropertyAssignment extends ObjectLiteralElement { name: Identifier; questionToken?: Node; + // used when ObjectLiteralExpression is used in ObjectAssignmentPattern + // it is grammar error to appear in actual object initializer + equalsToken?: Node; + objectAssignmentInitializer?: Expression; } // SyntaxKind.VariableDeclaration diff --git a/tests/baselines/reference/for-of48.errors.txt b/tests/baselines/reference/for-of48.errors.txt index f6826e14c61..8a8fd668714 100644 --- a/tests/baselines/reference/for-of48.errors.txt +++ b/tests/baselines/reference/for-of48.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/for-ofStatements/for-of48.ts(4,12): error TS1005: ':' expected. +tests/cases/conformance/es6/for-ofStatements/for-of48.ts(4,10): error TS2322: Type 'boolean' is not assignable to type 'number'. ==== tests/cases/conformance/es6/for-ofStatements/for-of48.ts (1 errors) ==== @@ -6,8 +6,8 @@ tests/cases/conformance/es6/for-ofStatements/for-of48.ts(4,12): error TS1005: ': var array = [{ x: "", y: true }] enum E { x } for ({x, y = E.x} of array) { - ~ -!!! error TS1005: ':' expected. + ~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. x; y; } \ No newline at end of file diff --git a/tests/baselines/reference/for-of48.js b/tests/baselines/reference/for-of48.js index 2a5e4e32b94..65e23076fd9 100644 --- a/tests/baselines/reference/for-of48.js +++ b/tests/baselines/reference/for-of48.js @@ -14,7 +14,7 @@ var E; (function (E) { E[E["x"] = 0] = "x"; })(E || (E = {})); -for ({ x, y: = E.x } of array) { +for ({ x, y = E.x } of array) { x; y; } diff --git a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt new file mode 100644 index 00000000000..844078cd8f1 --- /dev/null +++ b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt @@ -0,0 +1,164 @@ +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(16,9): error TS2459: Type '{}' has no property 's1' and no string index signature. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(22,9): error TS2459: Type '{}' has no property 's1' and no string index signature. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(40,9): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(46,12): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(72,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(77,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(82,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(82,13): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. + Types of property 'x' are incompatible. + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(87,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(87,19): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. + Types of property 'x' are incompatible. + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(113,12): error TS2304: Cannot find name 's'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(113,14): error TS1312: '=' can only be used in object literal properties inside destructuring assignment. + + +==== tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts (12 errors) ==== + + + (function() { + var s0; + for ({ s0 = 5 } of [{ s0: 1 }]) { + } + }); + (function() { + var s0; + for ({ s0:s0 = 5 } of [{ s0: 1 }]) { + } + }); + + (function() { + var s1; + for ({ s1 = 5 } of [{}]) { + ~~ +!!! error TS2459: Type '{}' has no property 's1' and no string index signature. + } + }); + + (function() { + var s1; + for ({ s1:s1 = 5 } of [{}]) { + ~~ +!!! error TS2459: Type '{}' has no property 's1' and no string index signature. + } + }); + + (function() { + var s2; + for ({ s2 = 5 } of [{ s2: "" }]) { + } + }); + + (function() { + var s2; + for ({ s2:s2 = 5 } of [{ s2: "" }]) { + } + }); + + (function() { + var s3: string; + for ({ s3 = 5 } of [{ s3: "" }]) { + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + } + }); + + (function() { + var s3: string; + for ({ s3:s3 = 5 } of [{ s3: "" }]) { + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + } + }); + + (function() { + let y; + ({ y = 5 } = { y: 1 }) + }); + + (function() { + let y; + ({ y:y = 5 } = { y: 1 }) + }); + + (function() { + let y0: number; + ({ y0 = 5 } = { y0: 1 }) + }); + + (function() { + let y0: number; + ({ y0:y0 = 5 } = { y0: 1 }) + }); + + (function() { + let y1: string; + ({ y1 = 5 } = {}) + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + }); + + (function() { + let y1: string; + ({ y1:y1 = 5 } = {}) + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + }); + + (function() { + let y2: string, y3: { x: string }; + ({ y2 = 5, y3 = { x: 1 } } = {}) + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + ~~ +!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. + }); + + (function() { + let y2: string, y3: { x: string }; + ({ y2:y2 = 5, y3:y3 = { x: 1 } } = {}) + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + ~~ +!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. + }); + + (function() { + let y4: number, y5: { x: number }; + ({ y4 = 5, y5 = { x: 1 } } = {}) + }); + + (function() { + let y4: number, y5: { x: number }; + ({ y4:y4 = 5, y5:y5 = { x: 1 } } = {}) + }); + + + (function() { + let z; + ({ z = { x: 5 } } = { z: { x: 1 } }); + }); + + + (function() { + let z; + ({ z:z = { x: 5 } } = { z: { x: 1 } }); + }); + + (function() { + let a = { s = 5 }; + ~ +!!! error TS2304: Cannot find name 's'. + ~ +!!! error TS1312: '=' can only be used in object literal properties inside destructuring assignment. + }); + + function foo({a = 4, b = { x: 5 }}) { + } \ No newline at end of file diff --git a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.js b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.js new file mode 100644 index 00000000000..981ee08e20c --- /dev/null +++ b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.js @@ -0,0 +1,242 @@ +//// [shorthandPropertyAssignmentsInDestructuring.ts] + + +(function() { + var s0; + for ({ s0 = 5 } of [{ s0: 1 }]) { + } +}); +(function() { + var s0; + for ({ s0:s0 = 5 } of [{ s0: 1 }]) { + } +}); + +(function() { + var s1; + for ({ s1 = 5 } of [{}]) { + } +}); + +(function() { + var s1; + for ({ s1:s1 = 5 } of [{}]) { + } +}); + +(function() { + var s2; + for ({ s2 = 5 } of [{ s2: "" }]) { + } +}); + +(function() { + var s2; + for ({ s2:s2 = 5 } of [{ s2: "" }]) { + } +}); + +(function() { + var s3: string; + for ({ s3 = 5 } of [{ s3: "" }]) { + } +}); + +(function() { + var s3: string; + for ({ s3:s3 = 5 } of [{ s3: "" }]) { + } +}); + +(function() { + let y; + ({ y = 5 } = { y: 1 }) +}); + +(function() { + let y; + ({ y:y = 5 } = { y: 1 }) +}); + +(function() { + let y0: number; + ({ y0 = 5 } = { y0: 1 }) +}); + +(function() { + let y0: number; + ({ y0:y0 = 5 } = { y0: 1 }) +}); + +(function() { + let y1: string; + ({ y1 = 5 } = {}) +}); + +(function() { + let y1: string; + ({ y1:y1 = 5 } = {}) +}); + +(function() { + let y2: string, y3: { x: string }; + ({ y2 = 5, y3 = { x: 1 } } = {}) +}); + +(function() { + let y2: string, y3: { x: string }; + ({ y2:y2 = 5, y3:y3 = { x: 1 } } = {}) +}); + +(function() { + let y4: number, y5: { x: number }; + ({ y4 = 5, y5 = { x: 1 } } = {}) +}); + +(function() { + let y4: number, y5: { x: number }; + ({ y4:y4 = 5, y5:y5 = { x: 1 } } = {}) +}); + + +(function() { + let z; + ({ z = { x: 5 } } = { z: { x: 1 } }); +}); + + +(function() { + let z; + ({ z:z = { x: 5 } } = { z: { x: 1 } }); +}); + +(function() { + let a = { s = 5 }; +}); + +function foo({a = 4, b = { x: 5 }}) { +} + +//// [shorthandPropertyAssignmentsInDestructuring.js] +(function () { + var s0; + for (var _i = 0, _a = [{ s0: 1 }]; _i < _a.length; _i++) { + _b = _a[_i].s0, s0 = _b === void 0 ? 5 : _b; + } + var _b; +}); +(function () { + var s0; + for (var _i = 0, _a = [{ s0: 1 }]; _i < _a.length; _i++) { + _b = _a[_i].s0, s0 = _b === void 0 ? 5 : _b; + } + var _b; +}); +(function () { + var s1; + for (var _i = 0, _a = [{}]; _i < _a.length; _i++) { + _b = _a[_i].s1, s1 = _b === void 0 ? 5 : _b; + } + var _b; +}); +(function () { + var s1; + for (var _i = 0, _a = [{}]; _i < _a.length; _i++) { + _b = _a[_i].s1, s1 = _b === void 0 ? 5 : _b; + } + var _b; +}); +(function () { + var s2; + for (var _i = 0, _a = [{ s2: "" }]; _i < _a.length; _i++) { + _b = _a[_i].s2, s2 = _b === void 0 ? 5 : _b; + } + var _b; +}); +(function () { + var s2; + for (var _i = 0, _a = [{ s2: "" }]; _i < _a.length; _i++) { + _b = _a[_i].s2, s2 = _b === void 0 ? 5 : _b; + } + var _b; +}); +(function () { + var s3; + for (var _i = 0, _a = [{ s3: "" }]; _i < _a.length; _i++) { + _b = _a[_i].s3, s3 = _b === void 0 ? 5 : _b; + } + var _b; +}); +(function () { + var s3; + for (var _i = 0, _a = [{ s3: "" }]; _i < _a.length; _i++) { + _b = _a[_i].s3, s3 = _b === void 0 ? 5 : _b; + } + var _b; +}); +(function () { + var y; + (_a = { y: 1 }, _b = _a.y, y = _b === void 0 ? 5 : _b, _a); + var _a, _b; +}); +(function () { + var y; + (_a = { y: 1 }, _b = _a.y, y = _b === void 0 ? 5 : _b, _a); + var _a, _b; +}); +(function () { + var y0; + (_a = { y0: 1 }, _b = _a.y0, y0 = _b === void 0 ? 5 : _b, _a); + var _a, _b; +}); +(function () { + var y0; + (_a = { y0: 1 }, _b = _a.y0, y0 = _b === void 0 ? 5 : _b, _a); + var _a, _b; +}); +(function () { + var y1; + (_a = {}, _b = _a.y1, y1 = _b === void 0 ? 5 : _b, _a); + var _a, _b; +}); +(function () { + var y1; + (_a = {}, _b = _a.y1, y1 = _b === void 0 ? 5 : _b, _a); + var _a, _b; +}); +(function () { + var y2, y3; + (_a = {}, _b = _a.y2, y2 = _b === void 0 ? 5 : _b, _c = _a.y3, y3 = _c === void 0 ? { x: 1 } : _c, _a); + var _a, _b, _c; +}); +(function () { + var y2, y3; + (_a = {}, _b = _a.y2, y2 = _b === void 0 ? 5 : _b, _c = _a.y3, y3 = _c === void 0 ? { x: 1 } : _c, _a); + var _a, _b, _c; +}); +(function () { + var y4, y5; + (_a = {}, _b = _a.y4, y4 = _b === void 0 ? 5 : _b, _c = _a.y5, y5 = _c === void 0 ? { x: 1 } : _c, _a); + var _a, _b, _c; +}); +(function () { + var y4, y5; + (_a = {}, _b = _a.y4, y4 = _b === void 0 ? 5 : _b, _c = _a.y5, y5 = _c === void 0 ? { x: 1 } : _c, _a); + var _a, _b, _c; +}); +(function () { + var z; + (_a = { z: { x: 1 } }, _b = _a.z, z = _b === void 0 ? { x: 5 } : _b, _a); + var _a, _b; +}); +(function () { + var z; + (_a = { z: { x: 1 } }, _b = _a.z, z = _b === void 0 ? { x: 5 } : _b, _a); + var _a, _b; +}); +(function () { + var a = { s: s }; +}); +function foo(_a) { + var _b = _a.a, a = _b === void 0 ? 4 : _b, _c = _a.b, b = _c === void 0 ? { x: 5 } : _c; +} diff --git a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt new file mode 100644 index 00000000000..208a8798c39 --- /dev/null +++ b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt @@ -0,0 +1,164 @@ +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(16,9): error TS2459: Type '{}' has no property 's1' and no string index signature. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(22,9): error TS2459: Type '{}' has no property 's1' and no string index signature. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(40,9): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(46,12): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(72,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(77,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(82,5): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(82,13): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. + Types of property 'x' are incompatible. + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(87,8): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(87,19): error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. + Types of property 'x' are incompatible. + Type 'number' is not assignable to type 'string'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(113,12): error TS2304: Cannot find name 's'. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(113,14): error TS1312: '=' can only be used in object literal properties inside destructuring assignment. + + +==== tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts (12 errors) ==== + + + (function() { + var s0; + for ({ s0 = 5 } of [{ s0: 1 }]) { + } + }); + (function() { + var s0; + for ({ s0:s0 = 5 } of [{ s0: 1 }]) { + } + }); + + (function() { + var s1; + for ({ s1 = 5 } of [{}]) { + ~~ +!!! error TS2459: Type '{}' has no property 's1' and no string index signature. + } + }); + + (function() { + var s1; + for ({ s1:s1 = 5 } of [{}]) { + ~~ +!!! error TS2459: Type '{}' has no property 's1' and no string index signature. + } + }); + + (function() { + var s2; + for ({ s2 = 5 } of [{ s2: "" }]) { + } + }); + + (function() { + var s2; + for ({ s2:s2 = 5 } of [{ s2: "" }]) { + } + }); + + (function() { + var s3: string; + for ({ s3 = 5 } of [{ s3: "" }]) { + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + } + }); + + (function() { + var s3: string; + for ({ s3:s3 = 5 } of [{ s3: "" }]) { + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + } + }); + + (function() { + let y; + ({ y = 5 } = { y: 1 }) + }); + + (function() { + let y; + ({ y:y = 5 } = { y: 1 }) + }); + + (function() { + let y0: number; + ({ y0 = 5 } = { y0: 1 }) + }); + + (function() { + let y0: number; + ({ y0:y0 = 5 } = { y0: 1 }) + }); + + (function() { + let y1: string; + ({ y1 = 5 } = {}) + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + }); + + (function() { + let y1: string; + ({ y1:y1 = 5 } = {}) + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + }); + + (function() { + let y2: string, y3: { x: string }; + ({ y2 = 5, y3 = { x: 1 } } = {}) + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + ~~ +!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. + }); + + (function() { + let y2: string, y3: { x: string }; + ({ y2:y2 = 5, y3:y3 = { x: 1 } } = {}) + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + ~~ +!!! error TS2322: Type '{ x: number; }' is not assignable to type '{ x: string; }'. +!!! error TS2322: Types of property 'x' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. + }); + + (function() { + let y4: number, y5: { x: number }; + ({ y4 = 5, y5 = { x: 1 } } = {}) + }); + + (function() { + let y4: number, y5: { x: number }; + ({ y4:y4 = 5, y5:y5 = { x: 1 } } = {}) + }); + + + (function() { + let z; + ({ z = { x: 5 } } = { z: { x: 1 } }); + }); + + + (function() { + let z; + ({ z:z = { x: 5 } } = { z: { x: 1 } }); + }); + + (function() { + let a = { s = 5 }; + ~ +!!! error TS2304: Cannot find name 's'. + ~ +!!! error TS1312: '=' can only be used in object literal properties inside destructuring assignment. + }); + + function foo({a = 4, b = { x: 5 }}) { + } \ No newline at end of file diff --git a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.js b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.js new file mode 100644 index 00000000000..11068708110 --- /dev/null +++ b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.js @@ -0,0 +1,213 @@ +//// [shorthandPropertyAssignmentsInDestructuring_ES6.ts] + + +(function() { + var s0; + for ({ s0 = 5 } of [{ s0: 1 }]) { + } +}); +(function() { + var s0; + for ({ s0:s0 = 5 } of [{ s0: 1 }]) { + } +}); + +(function() { + var s1; + for ({ s1 = 5 } of [{}]) { + } +}); + +(function() { + var s1; + for ({ s1:s1 = 5 } of [{}]) { + } +}); + +(function() { + var s2; + for ({ s2 = 5 } of [{ s2: "" }]) { + } +}); + +(function() { + var s2; + for ({ s2:s2 = 5 } of [{ s2: "" }]) { + } +}); + +(function() { + var s3: string; + for ({ s3 = 5 } of [{ s3: "" }]) { + } +}); + +(function() { + var s3: string; + for ({ s3:s3 = 5 } of [{ s3: "" }]) { + } +}); + +(function() { + let y; + ({ y = 5 } = { y: 1 }) +}); + +(function() { + let y; + ({ y:y = 5 } = { y: 1 }) +}); + +(function() { + let y0: number; + ({ y0 = 5 } = { y0: 1 }) +}); + +(function() { + let y0: number; + ({ y0:y0 = 5 } = { y0: 1 }) +}); + +(function() { + let y1: string; + ({ y1 = 5 } = {}) +}); + +(function() { + let y1: string; + ({ y1:y1 = 5 } = {}) +}); + +(function() { + let y2: string, y3: { x: string }; + ({ y2 = 5, y3 = { x: 1 } } = {}) +}); + +(function() { + let y2: string, y3: { x: string }; + ({ y2:y2 = 5, y3:y3 = { x: 1 } } = {}) +}); + +(function() { + let y4: number, y5: { x: number }; + ({ y4 = 5, y5 = { x: 1 } } = {}) +}); + +(function() { + let y4: number, y5: { x: number }; + ({ y4:y4 = 5, y5:y5 = { x: 1 } } = {}) +}); + + +(function() { + let z; + ({ z = { x: 5 } } = { z: { x: 1 } }); +}); + + +(function() { + let z; + ({ z:z = { x: 5 } } = { z: { x: 1 } }); +}); + +(function() { + let a = { s = 5 }; +}); + +function foo({a = 4, b = { x: 5 }}) { +} + +//// [shorthandPropertyAssignmentsInDestructuring_ES6.js] +(function () { + var s0; + for ({ s0 = 5 } of [{ s0: 1 }]) { + } +}); +(function () { + var s0; + for ({ s0: s0 = 5 } of [{ s0: 1 }]) { + } +}); +(function () { + var s1; + for ({ s1 = 5 } of [{}]) { + } +}); +(function () { + var s1; + for ({ s1: s1 = 5 } of [{}]) { + } +}); +(function () { + var s2; + for ({ s2 = 5 } of [{ s2: "" }]) { + } +}); +(function () { + var s2; + for ({ s2: s2 = 5 } of [{ s2: "" }]) { + } +}); +(function () { + var s3; + for ({ s3 = 5 } of [{ s3: "" }]) { + } +}); +(function () { + var s3; + for ({ s3: s3 = 5 } of [{ s3: "" }]) { + } +}); +(function () { + let y; + ({ y = 5 } = { y: 1 }); +}); +(function () { + let y; + ({ y: y = 5 } = { y: 1 }); +}); +(function () { + let y0; + ({ y0 = 5 } = { y0: 1 }); +}); +(function () { + let y0; + ({ y0: y0 = 5 } = { y0: 1 }); +}); +(function () { + let y1; + ({ y1 = 5 } = {}); +}); +(function () { + let y1; + ({ y1: y1 = 5 } = {}); +}); +(function () { + let y2, y3; + ({ y2 = 5, y3 = { x: 1 } } = {}); +}); +(function () { + let y2, y3; + ({ y2: y2 = 5, y3: y3 = { x: 1 } } = {}); +}); +(function () { + let y4, y5; + ({ y4 = 5, y5 = { x: 1 } } = {}); +}); +(function () { + let y4, y5; + ({ y4: y4 = 5, y5: y5 = { x: 1 } } = {}); +}); +(function () { + let z; + ({ z = { x: 5 } } = { z: { x: 1 } }); +}); +(function () { + let z; + ({ z: z = { x: 5 } } = { z: { x: 1 } }); +}); +(function () { + let a = { s = 5 }; +}); +function foo({ a = 4, b = { x: 5 } }) { +} diff --git a/tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts b/tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts new file mode 100644 index 00000000000..9750ea5d161 --- /dev/null +++ b/tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts @@ -0,0 +1,118 @@ +// @target: ES5 + + +(function() { + var s0; + for ({ s0 = 5 } of [{ s0: 1 }]) { + } +}); +(function() { + var s0; + for ({ s0:s0 = 5 } of [{ s0: 1 }]) { + } +}); + +(function() { + var s1; + for ({ s1 = 5 } of [{}]) { + } +}); + +(function() { + var s1; + for ({ s1:s1 = 5 } of [{}]) { + } +}); + +(function() { + var s2; + for ({ s2 = 5 } of [{ s2: "" }]) { + } +}); + +(function() { + var s2; + for ({ s2:s2 = 5 } of [{ s2: "" }]) { + } +}); + +(function() { + var s3: string; + for ({ s3 = 5 } of [{ s3: "" }]) { + } +}); + +(function() { + var s3: string; + for ({ s3:s3 = 5 } of [{ s3: "" }]) { + } +}); + +(function() { + let y; + ({ y = 5 } = { y: 1 }) +}); + +(function() { + let y; + ({ y:y = 5 } = { y: 1 }) +}); + +(function() { + let y0: number; + ({ y0 = 5 } = { y0: 1 }) +}); + +(function() { + let y0: number; + ({ y0:y0 = 5 } = { y0: 1 }) +}); + +(function() { + let y1: string; + ({ y1 = 5 } = {}) +}); + +(function() { + let y1: string; + ({ y1:y1 = 5 } = {}) +}); + +(function() { + let y2: string, y3: { x: string }; + ({ y2 = 5, y3 = { x: 1 } } = {}) +}); + +(function() { + let y2: string, y3: { x: string }; + ({ y2:y2 = 5, y3:y3 = { x: 1 } } = {}) +}); + +(function() { + let y4: number, y5: { x: number }; + ({ y4 = 5, y5 = { x: 1 } } = {}) +}); + +(function() { + let y4: number, y5: { x: number }; + ({ y4:y4 = 5, y5:y5 = { x: 1 } } = {}) +}); + + +(function() { + let z; + ({ z = { x: 5 } } = { z: { x: 1 } }); +}); + + +(function() { + let z; + ({ z:z = { x: 5 } } = { z: { x: 1 } }); +}); + +(function() { + let a = { s = 5 }; +}); + +function foo({a = 4, b = { x: 5 }}) { +} \ No newline at end of file diff --git a/tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts b/tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts new file mode 100644 index 00000000000..d479511b11d --- /dev/null +++ b/tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts @@ -0,0 +1,118 @@ +// @target: ES6 + + +(function() { + var s0; + for ({ s0 = 5 } of [{ s0: 1 }]) { + } +}); +(function() { + var s0; + for ({ s0:s0 = 5 } of [{ s0: 1 }]) { + } +}); + +(function() { + var s1; + for ({ s1 = 5 } of [{}]) { + } +}); + +(function() { + var s1; + for ({ s1:s1 = 5 } of [{}]) { + } +}); + +(function() { + var s2; + for ({ s2 = 5 } of [{ s2: "" }]) { + } +}); + +(function() { + var s2; + for ({ s2:s2 = 5 } of [{ s2: "" }]) { + } +}); + +(function() { + var s3: string; + for ({ s3 = 5 } of [{ s3: "" }]) { + } +}); + +(function() { + var s3: string; + for ({ s3:s3 = 5 } of [{ s3: "" }]) { + } +}); + +(function() { + let y; + ({ y = 5 } = { y: 1 }) +}); + +(function() { + let y; + ({ y:y = 5 } = { y: 1 }) +}); + +(function() { + let y0: number; + ({ y0 = 5 } = { y0: 1 }) +}); + +(function() { + let y0: number; + ({ y0:y0 = 5 } = { y0: 1 }) +}); + +(function() { + let y1: string; + ({ y1 = 5 } = {}) +}); + +(function() { + let y1: string; + ({ y1:y1 = 5 } = {}) +}); + +(function() { + let y2: string, y3: { x: string }; + ({ y2 = 5, y3 = { x: 1 } } = {}) +}); + +(function() { + let y2: string, y3: { x: string }; + ({ y2:y2 = 5, y3:y3 = { x: 1 } } = {}) +}); + +(function() { + let y4: number, y5: { x: number }; + ({ y4 = 5, y5 = { x: 1 } } = {}) +}); + +(function() { + let y4: number, y5: { x: number }; + ({ y4:y4 = 5, y5:y5 = { x: 1 } } = {}) +}); + + +(function() { + let z; + ({ z = { x: 5 } } = { z: { x: 1 } }); +}); + + +(function() { + let z; + ({ z:z = { x: 5 } } = { z: { x: 1 } }); +}); + +(function() { + let a = { s = 5 }; +}); + +function foo({a = 4, b = { x: 5 }}) { +} \ No newline at end of file From 7f3bfcf26aa6ba8b70b38990a3db9aefc772a38e Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 5 Oct 2015 15:48:03 -0700 Subject: [PATCH 044/121] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 954589f2eec..03e319f6b16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: - - '4.1' + - '4' - '0.10' sudo: false From f7e35d597589af03fcffdecb74061a27f3538bb5 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Mon, 5 Oct 2015 16:19:09 -0700 Subject: [PATCH 045/121] Incorporating changes from #3780 --- src/compiler/sys.ts | 8 ++++---- src/compiler/tsc.ts | 10 ++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 1b16efe4a7a..e8ad3c309fd 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -8,7 +8,7 @@ namespace ts { write(s: string): void; readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(path: string, callback: (path: string) => void): FileWatcher; + watchFile?(path: string, callback: (path: string, removed?: boolean) => void): FileWatcher; watchDirectory?(path: string, callback: (path: string) => void, recursive?: boolean): FileWatcher; resolvePath(path: string): string; fileExists(path: string): boolean; @@ -23,7 +23,7 @@ namespace ts { interface WatchedFile { fileName: string; - callback: (fileName: string) => void; + callback: (fileName: string, removed?: boolean) => void; mtime: Date; } @@ -235,7 +235,7 @@ namespace ts { } else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { watchedFile.mtime = WatchedFileSet.getModifiedTime(watchedFile.fileName); - watchedFile.callback(watchedFile.fileName); + watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0); } }); } @@ -263,7 +263,7 @@ namespace ts { }, this.interval); } - addFile(fileName: string, callback: (fileName: string) => void): WatchedFile { + addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile { var file: WatchedFile = { fileName, callback, diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index d5682d8860e..a6d51542989 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -291,7 +291,7 @@ namespace ts { let sourceFile = hostGetSourceFile(fileName, languageVersion, onError); if (sourceFile && compilerOptions.watch) { // Attach a file watcher - sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, () => sourceFileChanged(sourceFile)); + sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, (fileName: string, removed?: boolean) => sourceFileChanged(sourceFile, removed)); } return sourceFile; } @@ -313,9 +313,15 @@ namespace ts { } // If a source file changes, mark it as unwatched and start the recompilation timer - function sourceFileChanged(sourceFile: SourceFile) { + function sourceFileChanged(sourceFile: SourceFile, removed?: boolean) { sourceFile.fileWatcher.close(); sourceFile.fileWatcher = undefined; + if (removed) { + var index = rootFileNames.indexOf(sourceFile.fileName); + if (index !== -1) { + rootFileNames.splice(index, 1); + } + } startTimer(); } From 7280509058797926c4cc6a4bfc38f9d72f98ecf8 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 5 Oct 2015 16:37:45 -0700 Subject: [PATCH 046/121] Don't show lib.d.ts line numbers in symbol baselines --- src/harness/typeWriter.ts | 4 +- tests/baselines/reference/2dArrays.symbols | 4 +- .../reference/ES5SymbolType1.symbols | 4 +- ...WithInaccessibleTypeAsTypeArgument.symbols | 4 +- .../reference/TypeGuardWithArrayUnion.symbols | 6 +- ...dditionOperatorWithAnyAndEveryType.symbols | 2 +- ...tionOperatorWithStringAndEveryType.symbols | 2 +- .../anyAssignabilityInInheritance.symbols | 12 +- .../anyAssignableToEveryType.symbols | 12 +- .../anyInferenceAnonymousFunctions.symbols | 20 +- tests/baselines/reference/argsInScope.symbols | 4 +- .../argumentsObjectIterator01_ES6.symbols | 4 +- .../argumentsObjectIterator02_ES6.symbols | 10 +- ...gumentsUsedInObjectLiteralProperty.symbols | 4 +- .../baselines/reference/arrayAugment.symbols | 6 +- .../baselines/reference/arrayConcat2.symbols | 14 +- .../reference/arrayConcatMap.symbols | 8 +- .../reference/arrayConstructors1.symbols | 12 +- .../baselines/reference/arrayLiteral.symbols | 8 +- ...LiteralWithMultipleBestCommonTypes.symbols | 4 +- .../reference/arrayLiterals2ES5.symbols | 10 +- .../reference/arrayLiterals2ES6.symbols | 10 +- tests/baselines/reference/arrayconcat.symbols | 12 +- .../arrowFunctionExpressions.symbols | 24 +- ...rrowFunctionWithObjectLiteralBody5.symbols | 6 +- ...rrowFunctionWithObjectLiteralBody6.symbols | 6 +- tests/baselines/reference/asOperator1.symbols | 6 +- ...ssignmentCompatWithCallSignatures3.symbols | 28 +- ...mentCompatWithConstructSignatures3.symbols | 28 +- .../reference/asyncArrowFunction1_es6.symbols | 2 +- ...ArrowFunctionCapturesArguments_es6.symbols | 4 +- .../reference/asyncAwait_es6.symbols | 20 +- .../asyncFunctionDeclaration11_es6.symbols | 2 +- .../asyncFunctionDeclaration14_es6.symbols | 2 +- .../asyncFunctionDeclaration1_es6.symbols | 2 +- .../baselines/reference/augmentArray.symbols | 4 +- ...tedTypeBracketAccessIndexSignature.symbols | 4 +- ...ntedTypeBracketNamedPropertyAccess.symbols | 4 +- .../awaitBinaryExpression1_es6.symbols | 4 +- .../awaitBinaryExpression2_es6.symbols | 4 +- .../awaitBinaryExpression3_es6.symbols | 4 +- .../awaitBinaryExpression4_es6.symbols | 4 +- .../awaitBinaryExpression5_es6.symbols | 4 +- .../awaitCallExpression1_es6.symbols | 8 +- .../awaitCallExpression2_es6.symbols | 8 +- .../awaitCallExpression3_es6.symbols | 8 +- .../awaitCallExpression4_es6.symbols | 8 +- .../awaitCallExpression5_es6.symbols | 8 +- .../awaitCallExpression6_es6.symbols | 8 +- .../awaitCallExpression7_es6.symbols | 8 +- .../awaitCallExpression8_es6.symbols | 8 +- .../reference/awaitUnion_es6.symbols | 10 +- ...CommonTypeOfConditionalExpressions.symbols | 10 +- .../binopAssignmentShouldHaveType.symbols | 4 +- .../bitwiseNotOperatorWithStringType.symbols | 4 +- .../reference/booleanPropertyAccess.symbols | 6 +- ...gnatureAssignabilityInInheritance2.symbols | 28 +- ...gnatureAssignabilityInInheritance5.symbols | 24 +- ...gnaturesThatDifferOnlyByReturnType.symbols | 2 +- .../reference/callWithSpread.symbols | 2 +- .../reference/callWithSpreadES6.symbols | 2 +- .../reference/callbacksDontShareTypes.symbols | 12 +- .../reference/castNewObjectBug.symbols | 2 +- .../reference/chainedAssignment2.symbols | 4 +- ...dSpecializationToObjectTypeLiteral.symbols | 4 +- .../reference/checkForObjectTooStrict.symbols | 4 +- .../classAppearsToHaveMembersOfObject.symbols | 10 +- .../classExtendingBuiltinType.symbols | 20 +- ...PublicMembersEquivalentToInterface.symbols | 8 +- ...ublicMembersEquivalentToInterface2.symbols | 8 +- ...maOperatorWithSecondOperandAnyType.symbols | 10 +- ...eratorWithSecondOperandBooleanType.symbols | 2 +- ...peratorWithSecondOperandNumberType.symbols | 10 +- ...peratorWithSecondOperandObjectType.symbols | 14 +- ...peratorWithSecondOperandStringType.symbols | 18 +- .../commaOperatorsMultipleOperators.symbols | 14 +- .../reference/commentInMethodCall.symbols | 4 +- ...arisonOperatorWithIdenticalObjects.symbols | 4 +- ...edPropertyNamesContextualType1_ES5.symbols | 8 +- ...edPropertyNamesContextualType1_ES6.symbols | 8 +- ...edPropertyNamesContextualType2_ES5.symbols | 8 +- ...edPropertyNamesContextualType2_ES6.symbols | 8 +- ...edPropertyNamesContextualType3_ES5.symbols | 8 +- ...edPropertyNamesContextualType3_ES6.symbols | 8 +- tests/baselines/reference/concatError.symbols | 8 +- ...onalOperatorConditionIsBooleanType.symbols | 4 +- ...ionalOperatorConditionIsNumberType.symbols | 12 +- ...ionalOperatorConditionIsObjectType.symbols | 36 +- ...ditionalOperatorConditoinIsAnyType.symbols | 4 +- ...ionalOperatorConditoinIsStringType.symbols | 16 +- ...clarationShadowedByVarDeclaration3.symbols | 4 +- .../constEnumToStringNoComments.symbols | 48 +- .../constEnumToStringWithComments.symbols | 48 +- .../constraintSatisfactionWithAny.symbols | 4 +- ...straintSatisfactionWithEmptyObject.symbols | 6 +- ...gnatureAssignabilityInInheritance2.symbols | 28 +- ...gnatureAssignabilityInInheritance5.symbols | 24 +- ...FunctionTypeIsAssignableToBaseType.symbols | 2 +- ...unctionTypeIsAssignableToBaseType2.symbols | 4 +- ...torImplementationWithDefaultValues.symbols | 2 +- .../contextualSignatureInstantiation1.symbols | 8 +- .../contextualSignatureInstantiation3.symbols | 12 +- ...ualTypeWithUnionTypeCallSignatures.symbols | 12 +- ...alTypeWithUnionTypeIndexSignatures.symbols | 8 +- ...contextualTypeWithUnionTypeMembers.symbols | 20 +- ...xtualTypingOfConditionalExpression.symbols | 8 +- ...ionExpressionsAndReturnAnnotations.symbols | 8 +- .../contextuallyTypingOrOperator.symbols | 16 +- .../contextuallyTypingOrOperator2.symbols | 8 +- .../reference/declFileConstructors.symbols | 8 +- .../baselines/reference/declFileEnums.symbols | 6 +- .../reference/declFileFunctions.symbols | 12 +- .../reference/declFileGenericType.symbols | 2 +- .../reference/declFileMethods.symbols | 32 +- .../declFilePrivateMethodOverloads.symbols | 4 +- ...eclFileTypeAnnotationStringLiteral.symbols | 4 +- ...ray-types-from-generic-array-usage.symbols | 2 +- ...nalModuleWithExportAssignedFundule.symbols | 4 +- .../decoratorMetadataOnInferredType.symbols | 2 +- ...coratorMetadataWithConstructorType.symbols | 2 +- .../decoratorOnClassAccessor1.symbols | 4 +- .../decoratorOnClassAccessor2.symbols | 4 +- .../decoratorOnClassAccessor4.symbols | 4 +- .../decoratorOnClassAccessor5.symbols | 4 +- ...oratorOnClassConstructorParameter1.symbols | 2 +- .../reference/decoratorOnClassMethod1.symbols | 4 +- .../decoratorOnClassMethod13.symbols | 4 +- .../reference/decoratorOnClassMethod2.symbols | 4 +- .../reference/decoratorOnClassMethod4.symbols | 4 +- .../reference/decoratorOnClassMethod5.symbols | 4 +- .../reference/decoratorOnClassMethod7.symbols | 4 +- .../decoratorOnClassMethodParameter1.symbols | 2 +- .../deleteOperatorWithStringType.symbols | 4 +- ...ndexersWithAssignmentCompatibility.symbols | 4 +- ...vedClassOverridesProtectedMembers2.symbols | 2 +- ...tructuringParameterDeclaration3ES5.symbols | 20 +- ...tructuringParameterDeclaration3ES6.symbols | 20 +- .../destructuringWithGenericParameter.symbols | 4 +- ...plicateOverloadInTypeAugmentation1.symbols | 30 +- ...owFunctionWhenUsingArguments14_ES6.symbols | 6 +- ...owFunctionWhenUsingArguments15_ES6.symbols | 6 +- ...owFunctionWhenUsingArguments16_ES6.symbols | 6 +- ...owFunctionWhenUsingArguments17_ES6.symbols | 6 +- ...owFunctionWhenUsingArguments18_ES6.symbols | 6 +- tests/baselines/reference/enumBasics.symbols | 8 +- tests/baselines/reference/enumIndexer.symbols | 4 +- tests/baselines/reference/enumMerging.symbols | 24 +- .../reference/enumNumbering1.symbols | 12 +- .../reference/es3defaultAliasIsQuoted.symbols | 2 +- .../everyTypeAssignableToAny.symbols | 12 +- ...ryTypeWithAnnotationAndInitializer.symbols | 12 +- .../everyTypeWithInitializer.symbols | 8 +- .../exportAssignValueAndType.symbols | 4 +- ...exportAssignedTypeAsTypeAnnotation.symbols | 2 +- ...exportAssignmentWithoutIdentifier1.symbols | 4 +- .../reference/exportEqualNamespaces.symbols | 6 +- .../reference/exportedVariable1.symbols | 4 +- .../reference/extendBooleanInterface.symbols | 2 +- .../reference/extendNumberInterface.symbols | 2 +- .../reference/extendStringInterface.symbols | 2 +- tests/baselines/reference/externFunc.symbols | 4 +- ...nctionsInFunctionParameterDefaults.symbols | 4 +- ...lInMissingTypeArgsOnConstructCalls.symbols | 2 +- .../fixingTypeParametersRepeatedly1.symbols | 8 +- tests/baselines/reference/for-of13.symbols | 4 +- tests/baselines/reference/for-of18.symbols | 6 +- tests/baselines/reference/for-of19.symbols | 6 +- tests/baselines/reference/for-of20.symbols | 6 +- tests/baselines/reference/for-of21.symbols | 6 +- tests/baselines/reference/for-of22.symbols | 6 +- tests/baselines/reference/for-of23.symbols | 6 +- tests/baselines/reference/for-of25.symbols | 6 +- tests/baselines/reference/for-of26.symbols | 6 +- tests/baselines/reference/for-of27.symbols | 6 +- tests/baselines/reference/for-of28.symbols | 6 +- tests/baselines/reference/for-of37.symbols | 2 +- tests/baselines/reference/for-of38.symbols | 2 +- tests/baselines/reference/for-of40.symbols | 2 +- tests/baselines/reference/for-of44.symbols | 2 +- tests/baselines/reference/for-of45.symbols | 2 +- tests/baselines/reference/for-of50.symbols | 2 +- tests/baselines/reference/for-of57.symbols | 2 +- .../baselines/reference/forStatements.symbols | 12 +- .../forStatementsMultipleValidDecl.symbols | 2 +- tests/baselines/reference/funcdecl.symbols | 2 +- .../functionConstraintSatisfaction.symbols | 8 +- ...ithArgumentOfTypeFunctionTypeArray.symbols | 4 +- ...ExpressionAndLambdaMatchesFunction.symbols | 2 +- ...unctionExpressionContextualTyping1.symbols | 6 +- .../reference/functionImplementations.symbols | 4 +- .../reference/functionOnlyHasThrow.symbols | 2 +- .../functionOverloadsOnGenericArity2.symbols | 2 +- .../functionSubtypingOfVarArgs.symbols | 4 +- .../functionSubtypingOfVarArgs2.symbols | 4 +- .../baselines/reference/functionType.symbols | 6 +- .../generatedContextualTyping.symbols | 62 +-- .../reference/generatorES6_6.symbols | 6 +- .../reference/generatorOverloads4.symbols | 6 +- .../reference/generatorOverloads5.symbols | 6 +- .../reference/generatorTypeCheck1.symbols | 2 +- .../reference/generatorTypeCheck10.symbols | 2 +- .../reference/generatorTypeCheck11.symbols | 2 +- .../reference/generatorTypeCheck12.symbols | 2 +- .../reference/generatorTypeCheck13.symbols | 2 +- .../reference/generatorTypeCheck17.symbols | 2 +- .../reference/generatorTypeCheck19.symbols | 2 +- .../reference/generatorTypeCheck2.symbols | 2 +- .../reference/generatorTypeCheck26.symbols | 10 +- .../reference/generatorTypeCheck27.symbols | 2 +- .../reference/generatorTypeCheck28.symbols | 12 +- .../reference/generatorTypeCheck29.symbols | 4 +- .../reference/generatorTypeCheck3.symbols | 2 +- .../reference/generatorTypeCheck30.symbols | 4 +- .../reference/generatorTypeCheck45.symbols | 6 +- .../reference/generatorTypeCheck46.symbols | 12 +- .../baselines/reference/genericArray1.symbols | 8 +- .../genericCallWithArrayLiteralArgs.symbols | 2 +- ...cCallWithObjectTypeArgsAndIndexers.symbols | 8 +- ...ithObjectTypeArgsAndNumericIndexer.symbols | 8 +- ...WithObjectTypeArgsAndStringIndexer.symbols | 12 +- ...icConstraintOnExtendedBuiltinTypes.symbols | 2 +- ...cConstraintOnExtendedBuiltinTypes2.symbols | 4 +- ...ericContextualTypingSpecialization.symbols | 4 +- .../genericFunctionSpecializations1.symbols | 2 +- .../reference/genericFunctions2.symbols | 4 +- ...icFunctionsWithOptionalParameters1.symbols | 2 +- ...icFunctionsWithOptionalParameters3.symbols | 6 +- .../reference/genericInference1.symbols | 8 +- .../reference/genericInference2.symbols | 4 +- .../genericMethodOverspecialization.symbols | 12 +- .../genericTypeParameterEquivalence2.symbols | 16 +- .../reference/getterSetterNonAccessor.symbols | 8 +- tests/baselines/reference/globalThis.symbols | 6 +- .../heterogeneousArrayLiterals.symbols | 2 +- .../reference/ifDoWhileStatements.symbols | 8 +- .../reference/implementArrayInterface.symbols | 2 +- tests/baselines/reference/indexer3.symbols | 4 +- .../reference/indexersInClassType.symbols | 6 +- .../reference/inferSecondaryParameter.symbols | 4 +- .../inferenceFromParameterlessLambda.symbols | 4 +- ...erentialTypingObjectLiteralMethod1.symbols | 4 +- ...erentialTypingObjectLiteralMethod2.symbols | 4 +- ...nferentialTypingUsingApparentType1.symbols | 4 +- ...nferentialTypingUsingApparentType2.symbols | 4 +- ...inferentialTypingWithFunctionType2.symbols | 4 +- ...ritanceOfGenericConstructorMethod1.symbols | 8 +- ...tedFunctionAssignmentCompatibility.symbols | 2 +- .../inheritedGenericCallSignature.symbols | 8 +- ...tedOverloadedSpecializedSignatures.symbols | 4 +- .../reference/innerBoundLambdaEmit.symbols | 4 +- ...nnerTypeParameterShadowingOuterOne.symbols | 28 +- ...nerTypeParameterShadowingOuterOne2.symbols | 28 +- .../instanceAndStaticDeclarations1.symbols | 6 +- .../reference/instanceOfAssignability.symbols | 12 +- .../instanceofOperatorWithLHSIsObject.symbols | 4 +- ...OperatorWithRHSIsSubtypeOfFunction.symbols | 4 +- .../interfaceDoesNotDependOnBaseTypes.symbols | 10 +- ...erloadedCallAndConstructSignatures.symbols | 2 +- .../interfaceWithPropertyOfEveryType.symbols | 2 +- ...cializedCallAndConstructSignatures.symbols | 2 +- .../baselines/reference/invalidSplice.symbols | 4 +- tests/baselines/reference/isArray.symbols | 14 +- .../isDeclarationVisibleNodeKinds.symbols | 2 +- .../reference/iterableArrayPattern1.symbols | 8 +- .../reference/iterableArrayPattern11.symbols | 6 +- .../reference/iterableArrayPattern12.symbols | 6 +- .../reference/iterableArrayPattern13.symbols | 6 +- .../reference/iterableArrayPattern2.symbols | 8 +- .../reference/iterableArrayPattern3.symbols | 6 +- .../reference/iterableArrayPattern30.symbols | 2 +- .../reference/iterableArrayPattern4.symbols | 6 +- .../reference/iterableArrayPattern9.symbols | 6 +- .../iterableContextualTyping1.symbols | 6 +- .../reference/iteratorSpreadInArray.symbols | 8 +- .../reference/iteratorSpreadInArray11.symbols | 2 +- .../reference/iteratorSpreadInArray2.symbols | 14 +- .../reference/iteratorSpreadInArray3.symbols | 8 +- .../reference/iteratorSpreadInArray4.symbols | 8 +- .../reference/iteratorSpreadInArray7.symbols | 12 +- .../reference/iteratorSpreadInCall11.symbols | 8 +- .../reference/iteratorSpreadInCall12.symbols | 14 +- .../reference/iteratorSpreadInCall3.symbols | 8 +- .../reference/iteratorSpreadInCall5.symbols | 14 +- .../reference/letDeclarations-access.symbols | 4 +- .../reference/library_ArraySlice.symbols | 30 +- .../library_DatePrototypeProperties.symbols | 440 +++++++++--------- .../library_ObjectPrototypeProperties.symbols | 72 +-- .../library_RegExpExecArraySlice.symbols | 14 +- .../reference/library_StringSlice.symbols | 30 +- tests/baselines/reference/localTypes5.symbols | 2 +- .../logicalNotOperatorWithStringType.symbols | 4 +- ...OrExpressionIsNotContextuallyTyped.symbols | 4 +- .../memberAccessOnConstructorType.symbols | 4 +- .../mergedInterfaceFromMultipleFiles1.symbols | 4 +- ...mergedInterfacesWithMultipleBases3.symbols | 2 +- .../negateOperatorWithStringType.symbols | 4 +- tests/baselines/reference/nestedSelf.symbols | 4 +- tests/baselines/reference/newArrays.symbols | 2 +- ...nContextuallyTypesFunctionParamter.symbols | 8 +- .../noImplicitAnyIndexingSuppressed.symbols | 2 +- .../nullAssignableToEveryType.symbols | 12 +- ...lIsSubtypeOfEverythingButUndefined.symbols | 8 +- .../reference/numberPropertyAccess.symbols | 12 +- .../reference/objectLitGetterSetter.symbols | 10 +- .../reference/objectMembersOnTypes.symbols | 12 +- .../objectTypePropertyAccess.symbols | 18 +- ...llSignatureAppearsToBeFunctionType.symbols | 8 +- ...ureHidingMembersOfExtendedFunction.symbols | 12 +- ...llSignatureHidingMembersOfFunction.symbols | 8 +- ...ureHidingMembersOfExtendedFunction.symbols | 12 +- ...ctSignatureHidingMembersOfFunction.symbols | 8 +- ...TypeWithStringNamedNumericProperty.symbols | 30 +- .../reference/objectTypesIdentity2.symbols | 4 +- ...ctTypesIdentityWithCallSignatures2.symbols | 4 +- ...esIdentityWithConstructSignatures2.symbols | 4 +- ...llSignaturesDifferingByConstraints.symbols | 56 +-- ...allSignaturesDifferingByReturnType.symbols | 4 +- ...llSignaturesDifferingByReturnType2.symbols | 60 +-- ...aturesDifferingTypeParameterCounts.symbols | 18 +- ...turesDifferingTypeParameterCounts2.symbols | 6 +- ...ctSignaturesDifferingByConstraints.symbols | 46 +- ...uctSignaturesDifferingByReturnType.symbols | 4 +- ...ctSignaturesDifferingByReturnType2.symbols | 52 +-- ...aturesDifferingTypeParameterCounts.symbols | 16 +- .../reference/overloadOnGenericArity.symbols | 2 +- ...overloadResolutionOverNonCTLambdas.symbols | 4 +- ...erloadResolutionOverNonCTObjectLit.symbols | 8 +- .../overloadResolutionWithAny.symbols | 2 +- .../overloadsWithConstraints.symbols | 4 +- .../parenthesizedContexualTyping1.symbols | 24 +- .../parenthesizedContexualTyping2.symbols | 24 +- .../parenthesizedContexualTyping3.symbols | 6 +- .../reference/parenthesizedTypes.symbols | 6 +- .../baselines/reference/parser630933.symbols | 4 +- .../reference/parserSymbolProperty1.symbols | 6 +- .../reference/parserSymbolProperty2.symbols | 6 +- .../reference/parserSymbolProperty3.symbols | 6 +- .../reference/parserSymbolProperty4.symbols | 6 +- .../reference/parserSymbolProperty5.symbols | 6 +- .../reference/parserSymbolProperty6.symbols | 6 +- .../reference/parserSymbolProperty7.symbols | 6 +- .../reference/parserSymbolProperty8.symbols | 6 +- .../reference/parserSymbolProperty9.symbols | 6 +- .../plusOperatorWithStringType.symbols | 4 +- .../reference/promiseChaining.symbols | 4 +- .../promiseVoidErrorCallback.symbols | 18 +- ...propagationOfPromiseInitialization.symbols | 4 +- .../reference/propertyAccess7.symbols | 4 +- ...cessOnTypeParameterWithConstraints.symbols | 40 +- ...sOnTypeParameterWithoutConstraints.symbols | 24 +- .../prototypeOnConstructorFunctions.symbols | 4 +- .../regExpWithSlashInCharClass.symbols | 12 +- .../reference/returnStatements.symbols | 4 +- .../returnTypeParameterWithModules.symbols | 16 +- ...InferenceInContextualInstantiation.symbols | 4 +- .../scopeResolutionIdentifiers.symbols | 4 +- ...arameterReferencedInObjectLiteral1.symbols | 8 +- .../sourceMap-FileWithComments.symbols | 6 +- .../sourceMapValidationClasses.symbols | 12 +- .../sourceMapValidationDecorators.symbols | 16 +- ...sourceMapValidationTryCatchFinally.symbols | 2 +- ...alizationsShouldNotAffectEachOther.symbols | 8 +- ...IsSubtypeOfNonSpecializedSignature.symbols | 6 +- .../staticInstanceResolution2.symbols | 8 +- .../reference/stringIncludes.symbols | 8 +- .../reference/stringPropCodeGen.symbols | 4 +- .../reference/stringPropertyAccess.symbols | 12 +- .../baselines/reference/subtypesOfAny.symbols | 6 +- .../reference/subtypingTransitivity.symbols | 2 +- .../subtypingWithCallSignatures2.symbols | 42 +- .../subtypingWithCallSignatures3.symbols | 18 +- .../subtypingWithConstructSignatures2.symbols | 42 +- .../subtypingWithConstructSignatures3.symbols | 18 +- .../subtypingWithConstructSignatures5.symbols | 24 +- .../subtypingWithOptionalProperties.symbols | 6 +- ...uperCallParameterContextualTyping1.symbols | 6 +- ...uperCallParameterContextualTyping3.symbols | 8 +- .../superSymbolIndexedAccess1.symbols | 6 +- .../superSymbolIndexedAccess2.symbols | 18 +- .../reference/symbolDeclarationEmit1.symbols | 6 +- .../reference/symbolDeclarationEmit10.symbols | 12 +- .../reference/symbolDeclarationEmit11.symbols | 24 +- .../reference/symbolDeclarationEmit13.symbols | 12 +- .../reference/symbolDeclarationEmit14.symbols | 12 +- .../reference/symbolDeclarationEmit2.symbols | 6 +- .../reference/symbolDeclarationEmit3.symbols | 18 +- .../reference/symbolDeclarationEmit4.symbols | 12 +- .../reference/symbolDeclarationEmit5.symbols | 6 +- .../reference/symbolDeclarationEmit6.symbols | 6 +- .../reference/symbolDeclarationEmit7.symbols | 6 +- .../reference/symbolDeclarationEmit8.symbols | 6 +- .../reference/symbolDeclarationEmit9.symbols | 6 +- .../reference/symbolProperty11.symbols | 6 +- .../reference/symbolProperty13.symbols | 12 +- .../reference/symbolProperty14.symbols | 12 +- .../reference/symbolProperty15.symbols | 6 +- .../reference/symbolProperty16.symbols | 12 +- .../reference/symbolProperty18.symbols | 36 +- .../reference/symbolProperty19.symbols | 24 +- .../reference/symbolProperty2.symbols | 2 +- .../reference/symbolProperty20.symbols | 24 +- .../reference/symbolProperty22.symbols | 16 +- .../reference/symbolProperty23.symbols | 12 +- .../reference/symbolProperty26.symbols | 12 +- .../reference/symbolProperty27.symbols | 12 +- .../reference/symbolProperty28.symbols | 12 +- .../reference/symbolProperty4.symbols | 6 +- .../reference/symbolProperty40.symbols | 30 +- .../reference/symbolProperty41.symbols | 30 +- .../reference/symbolProperty45.symbols | 12 +- .../reference/symbolProperty5.symbols | 18 +- .../reference/symbolProperty50.symbols | 6 +- .../reference/symbolProperty51.symbols | 6 +- .../reference/symbolProperty55.symbols | 12 +- .../reference/symbolProperty56.symbols | 6 +- .../reference/symbolProperty57.symbols | 8 +- .../reference/symbolProperty6.symbols | 24 +- .../reference/symbolProperty8.symbols | 12 +- .../baselines/reference/symbolType11.symbols | 6 +- .../baselines/reference/symbolType16.symbols | 2 +- .../taggedTemplateContextualTyping1.symbols | 4 +- .../taggedTemplateContextualTyping2.symbols | 4 +- ...lateStringsWithOverloadResolution2.symbols | 4 +- ...StringsWithOverloadResolution2_ES6.symbols | 4 +- .../reference/targetTypeArgs.symbols | 24 +- .../targetTypeObjectLiteralToAny.symbols | 4 +- .../reference/targetTypingOnFunctions.symbols | 8 +- ...plateStringWithEmbeddedNewOperator.symbols | 2 +- ...teStringWithEmbeddedNewOperatorES6.symbols | 2 +- ...emplateStringWithEmbeddedUnaryPlus.symbols | 2 +- ...lateStringWithEmbeddedUnaryPlusES6.symbols | 2 +- .../templateStringWithPropertyAccess.symbols | 4 +- ...emplateStringWithPropertyAccessES6.symbols | 4 +- .../thisInPropertyBoundDeclarations.symbols | 2 +- .../reference/thisTypeInClasses.symbols | 4 +- .../reference/thisTypeInInterfaces.symbols | 4 +- .../reference/thisTypeInTuples.symbols | 18 +- .../reference/throwStatements.symbols | 12 +- .../reference/toStringOnPrimitives.symbols | 12 +- ...entsInGenericFunctionTypedArgument.symbols | 8 +- .../reference/topLevelExports.symbols | 4 +- ...edInterfacesWithDifferingOverloads.symbols | 12 +- ...eAliasDoesntMakeModuleInstantiated.symbols | 2 +- tests/baselines/reference/typeAliases.symbols | 8 +- ...typeArgumentInferenceApparentType1.symbols | 2 +- ...typeArgumentInferenceApparentType2.symbols | 4 +- ...umentInferenceWithClassExpression1.symbols | 4 +- ...umentInferenceWithClassExpression3.symbols | 4 +- ...ReferencedTypeAliasToTypeLiteral01.symbols | 4 +- ...ReferencedTypeAliasToTypeLiteral02.symbols | 4 +- .../reference/typeGuardsDefeat.symbols | 12 +- .../typeGuardsInClassAccessors.symbols | 80 ++-- .../typeGuardsInClassMethods.symbols | 60 +-- .../typeGuardsInConditionalExpression.symbols | 20 +- .../typeGuardsInExternalModule.symbols | 4 +- .../reference/typeGuardsInFunction.symbols | 72 +-- ...typeGuardsInFunctionAndModuleBlock.symbols | 48 +- .../reference/typeGuardsInGlobal.symbols | 4 +- .../reference/typeGuardsInIfStatement.symbols | 28 +- .../reference/typeGuardsInModule.symbols | 28 +- ...ardsInRightOperandOfAndAndOperator.symbols | 16 +- ...GuardsInRightOperandOfOrOrOperator.symbols | 16 +- .../reference/typeGuardsObjectMethods.symbols | 32 +- .../typeGuardsWithInstanceOf.symbols | 2 +- .../typeInferenceWithTupleType.symbols | 16 +- .../typeOfThisInMemberFunctions.symbols | 2 +- ...ypeParameterAndArgumentOfSameName1.symbols | 6 +- ...ParametersAreIdenticalToThemselves.symbols | 14 +- tests/baselines/reference/typedArrays.symbols | 330 ++++++------- .../typeofOperatorWithStringType.symbols | 4 +- .../undefinedAssignableToEveryType.symbols | 12 +- .../undefinedIsSubtypeOfEverything.symbols | 12 +- .../reference/underscoreTest1.symbols | 130 +++--- .../unionTypeCallSignatures2.symbols | 4 +- .../reference/unionTypeIndexSignature.symbols | 6 +- .../reference/validBooleanAssignments.symbols | 4 +- .../validMultipleVariableDeclarations.symbols | 2 +- .../reference/validNumberAssignments.symbols | 2 +- .../reference/validStringAssignments.symbols | 4 +- tests/baselines/reference/vardecl.symbols | 4 +- .../voidOperatorWithStringType.symbols | 4 +- .../wrappedAndRecursiveConstraints.symbols | 4 +- 482 files changed, 2720 insertions(+), 2718 deletions(-) diff --git a/src/harness/typeWriter.ts b/src/harness/typeWriter.ts index 0fef0779965..9db4fbcd41c 100644 --- a/src/harness/typeWriter.ts +++ b/src/harness/typeWriter.ts @@ -57,7 +57,9 @@ class TypeWriterWalker { symbolString += ", "; let declSourceFile = declaration.getSourceFile(); let declLineAndCharacter = declSourceFile.getLineAndCharacterOfPosition(declaration.pos); - symbolString += `Decl(${ ts.getBaseFileName(declSourceFile.fileName) }, ${ declLineAndCharacter.line }, ${ declLineAndCharacter.character })`; + let fileName = ts.getBaseFileName(declSourceFile.fileName); + let isLibFile = /lib(.*)\.d\.ts/i.test(fileName); + symbolString += `Decl(${ fileName }, ${ isLibFile ? "--" : declLineAndCharacter.line }, ${ isLibFile ? "--" : declLineAndCharacter.character })`; } } symbolString += ")"; diff --git a/tests/baselines/reference/2dArrays.symbols b/tests/baselines/reference/2dArrays.symbols index c069f2dae8c..a42a40e2b6b 100644 --- a/tests/baselines/reference/2dArrays.symbols +++ b/tests/baselines/reference/2dArrays.symbols @@ -25,11 +25,11 @@ class Board { >allShipsSunk : Symbol(allShipsSunk, Decl(2dArrays.ts, 9, 18)) return this.ships.every(function (val) { return val.isSunk; }); ->this.ships.every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) +>this.ships.every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >this.ships : Symbol(ships, Decl(2dArrays.ts, 7, 13)) >this : Symbol(Board, Decl(2dArrays.ts, 5, 1)) >ships : Symbol(ships, Decl(2dArrays.ts, 7, 13)) ->every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >val : Symbol(val, Decl(2dArrays.ts, 12, 42)) >val.isSunk : Symbol(Ship.isSunk, Decl(2dArrays.ts, 3, 12)) >val : Symbol(val, Decl(2dArrays.ts, 12, 42)) diff --git a/tests/baselines/reference/ES5SymbolType1.symbols b/tests/baselines/reference/ES5SymbolType1.symbols index ea6c9084046..be316276f52 100644 --- a/tests/baselines/reference/ES5SymbolType1.symbols +++ b/tests/baselines/reference/ES5SymbolType1.symbols @@ -3,7 +3,7 @@ var s: symbol; >s : Symbol(s, Decl(ES5SymbolType1.ts, 0, 3)) s.toString(); ->s.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>s.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(ES5SymbolType1.ts, 0, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.symbols b/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.symbols index f56b2f526d4..90f2701b534 100644 --- a/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.symbols +++ b/tests/baselines/reference/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.symbols @@ -11,11 +11,11 @@ module A { export var beez: Array; >beez : Symbol(beez, Decl(ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts, 5, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >B : Symbol(B, Decl(ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts, 0, 10)) export var beez2 = new Array(); >beez2 : Symbol(beez2, Decl(ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts, 6, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >B : Symbol(B, Decl(ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts, 0, 10)) } diff --git a/tests/baselines/reference/TypeGuardWithArrayUnion.symbols b/tests/baselines/reference/TypeGuardWithArrayUnion.symbols index 57bcdf70e79..2ff91774b83 100644 --- a/tests/baselines/reference/TypeGuardWithArrayUnion.symbols +++ b/tests/baselines/reference/TypeGuardWithArrayUnion.symbols @@ -14,12 +14,12 @@ function saySize(message: Message | Message[]) { if (message instanceof Array) { >message : Symbol(message, Decl(TypeGuardWithArrayUnion.ts, 4, 17)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) return message.length; // Should have type Message[] here ->message.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>message.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >message : Symbol(message, Decl(TypeGuardWithArrayUnion.ts, 4, 17)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.symbols b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.symbols index eff45630aae..bada6c561f1 100644 --- a/tests/baselines/reference/additionOperatorWithAnyAndEveryType.symbols +++ b/tests/baselines/reference/additionOperatorWithAnyAndEveryType.symbols @@ -35,7 +35,7 @@ var d: string; var e: Object; >e : Symbol(e, Decl(additionOperatorWithAnyAndEveryType.ts, 12, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) // any as left operand, result is type Any except plusing string var r1 = a + a; diff --git a/tests/baselines/reference/additionOperatorWithStringAndEveryType.symbols b/tests/baselines/reference/additionOperatorWithStringAndEveryType.symbols index 0fb0f428716..68fac31d4f8 100644 --- a/tests/baselines/reference/additionOperatorWithStringAndEveryType.symbols +++ b/tests/baselines/reference/additionOperatorWithStringAndEveryType.symbols @@ -19,7 +19,7 @@ var d: string; var e: Object; >e : Symbol(e, Decl(additionOperatorWithStringAndEveryType.ts, 6, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var f: void; >f : Symbol(f, Decl(additionOperatorWithStringAndEveryType.ts, 7, 3)) diff --git a/tests/baselines/reference/anyAssignabilityInInheritance.symbols b/tests/baselines/reference/anyAssignabilityInInheritance.symbols index 0f659dddd21..50148d7df99 100644 --- a/tests/baselines/reference/anyAssignabilityInInheritance.symbols +++ b/tests/baselines/reference/anyAssignabilityInInheritance.symbols @@ -56,8 +56,8 @@ var r3 = foo3(a); // any declare function foo5(x: Date): Date; >foo5 : Symbol(foo5, Decl(anyAssignabilityInInheritance.ts, 19, 17), Decl(anyAssignabilityInInheritance.ts, 21, 37)) >x : Symbol(x, Decl(anyAssignabilityInInheritance.ts, 21, 22)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function foo5(x: any): any; >foo5 : Symbol(foo5, Decl(anyAssignabilityInInheritance.ts, 19, 17), Decl(anyAssignabilityInInheritance.ts, 21, 37)) @@ -71,8 +71,8 @@ var r3 = foo3(a); // any declare function foo6(x: RegExp): RegExp; >foo6 : Symbol(foo6, Decl(anyAssignabilityInInheritance.ts, 23, 17), Decl(anyAssignabilityInInheritance.ts, 25, 41)) >x : Symbol(x, Decl(anyAssignabilityInInheritance.ts, 25, 22)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function foo6(x: any): any; >foo6 : Symbol(foo6, Decl(anyAssignabilityInInheritance.ts, 23, 17), Decl(anyAssignabilityInInheritance.ts, 25, 41)) @@ -277,8 +277,8 @@ var r3 = foo3(a); // any declare function foo17(x: Object): Object; >foo17 : Symbol(foo17, Decl(anyAssignabilityInInheritance.ts, 79, 17), Decl(anyAssignabilityInInheritance.ts, 81, 42)) >x : Symbol(x, Decl(anyAssignabilityInInheritance.ts, 81, 23)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function foo17(x: any): any; >foo17 : Symbol(foo17, Decl(anyAssignabilityInInheritance.ts, 79, 17), Decl(anyAssignabilityInInheritance.ts, 81, 42)) diff --git a/tests/baselines/reference/anyAssignableToEveryType.symbols b/tests/baselines/reference/anyAssignableToEveryType.symbols index 19dc94c7a43..b1b2f87c050 100644 --- a/tests/baselines/reference/anyAssignableToEveryType.symbols +++ b/tests/baselines/reference/anyAssignableToEveryType.symbols @@ -44,7 +44,7 @@ var d: boolean = a; var e: Date = a; >e : Symbol(e, Decl(anyAssignableToEveryType.ts, 17, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(anyAssignableToEveryType.ts, 0, 3)) var f: any = a; @@ -57,7 +57,7 @@ var g: void = a; var h: Object = a; >h : Symbol(h, Decl(anyAssignableToEveryType.ts, 20, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(anyAssignableToEveryType.ts, 0, 3)) var i: {} = a; @@ -70,7 +70,7 @@ var j: () => {} = a; var k: Function = a; >k : Symbol(k, Decl(anyAssignableToEveryType.ts, 23, 3)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(anyAssignableToEveryType.ts, 0, 3)) var l: (x: number) => string = a; @@ -109,12 +109,12 @@ var o: (x: T) => T = a; var p: Number = a; >p : Symbol(p, Decl(anyAssignableToEveryType.ts, 31, 3)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(anyAssignableToEveryType.ts, 0, 3)) var q: String = a; >q : Symbol(q, Decl(anyAssignableToEveryType.ts, 32, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(anyAssignableToEveryType.ts, 0, 3)) function foo(x: T, y: U, z: V) { @@ -122,7 +122,7 @@ function foo(x: T, y: U, z: V) { >T : Symbol(T, Decl(anyAssignableToEveryType.ts, 34, 13)) >U : Symbol(U, Decl(anyAssignableToEveryType.ts, 34, 15)) >V : Symbol(V, Decl(anyAssignableToEveryType.ts, 34, 32)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(anyAssignableToEveryType.ts, 34, 49)) >T : Symbol(T, Decl(anyAssignableToEveryType.ts, 34, 13)) >y : Symbol(y, Decl(anyAssignableToEveryType.ts, 34, 54)) diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols index daf7947e694..c1b5df88fb0 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols @@ -3,9 +3,9 @@ var paired: any[]; >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) paired.reduce(function (a1, a2) { ->paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) +>paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a1 : Symbol(a1, Decl(anyInferenceAnonymousFunctions.ts, 2, 24)) >a2 : Symbol(a2, Decl(anyInferenceAnonymousFunctions.ts, 2, 27)) @@ -15,9 +15,9 @@ paired.reduce(function (a1, a2) { } , []); paired.reduce((b1, b2) => { ->paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) +>paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b1 : Symbol(b1, Decl(anyInferenceAnonymousFunctions.ts, 8, 15)) >b2 : Symbol(b2, Decl(anyInferenceAnonymousFunctions.ts, 8, 18)) @@ -27,24 +27,24 @@ paired.reduce((b1, b2) => { } , []); paired.reduce((b3, b4) => b3.concat({}), []); ->paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) +>paired.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b3 : Symbol(b3, Decl(anyInferenceAnonymousFunctions.ts, 13, 15)) >b4 : Symbol(b4, Decl(anyInferenceAnonymousFunctions.ts, 13, 18)) >b3 : Symbol(b3, Decl(anyInferenceAnonymousFunctions.ts, 13, 15)) paired.map((c1) => c1.count); ->paired.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >c1 : Symbol(c1, Decl(anyInferenceAnonymousFunctions.ts, 15, 12)) >c1 : Symbol(c1, Decl(anyInferenceAnonymousFunctions.ts, 15, 12)) paired.map(function (c2) { return c2.count; }); ->paired.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >c2 : Symbol(c2, Decl(anyInferenceAnonymousFunctions.ts, 16, 21)) >c2 : Symbol(c2, Decl(anyInferenceAnonymousFunctions.ts, 16, 21)) diff --git a/tests/baselines/reference/argsInScope.symbols b/tests/baselines/reference/argsInScope.symbols index 7ea039819aa..6faf88facd9 100644 --- a/tests/baselines/reference/argsInScope.symbols +++ b/tests/baselines/reference/argsInScope.symbols @@ -11,9 +11,9 @@ class C { for (var i = 0; i < arguments.length; i++) { >i : Symbol(i, Decl(argsInScope.ts, 2, 15)) >i : Symbol(i, Decl(argsInScope.ts, 2, 15)) ->arguments.length : Symbol(IArguments.length, Decl(lib.d.ts, 272, 25)) +>arguments.length : Symbol(IArguments.length, Decl(lib.d.ts, --, --)) >arguments : Symbol(arguments) ->length : Symbol(IArguments.length, Decl(lib.d.ts, 272, 25)) +>length : Symbol(IArguments.length, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(argsInScope.ts, 2, 15)) // WScript.Echo("param: " + arguments[i]); diff --git a/tests/baselines/reference/argumentsObjectIterator01_ES6.symbols b/tests/baselines/reference/argumentsObjectIterator01_ES6.symbols index b4351e579f5..d2d05cf3132 100644 --- a/tests/baselines/reference/argumentsObjectIterator01_ES6.symbols +++ b/tests/baselines/reference/argumentsObjectIterator01_ES6.symbols @@ -14,9 +14,9 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe >arguments : Symbol(arguments) result.push(arg + arg); ->result.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>result.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >result : Symbol(result, Decl(argumentsObjectIterator01_ES6.ts, 2, 7)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >arg : Symbol(arg, Decl(argumentsObjectIterator01_ES6.ts, 3, 12)) >arg : Symbol(arg, Decl(argumentsObjectIterator01_ES6.ts, 3, 12)) } diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols b/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols index 2c5e611de68..7a4e75de66b 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols +++ b/tests/baselines/reference/argumentsObjectIterator02_ES6.symbols @@ -9,9 +9,9 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe let blah = arguments[Symbol.iterator]; >blah : Symbol(blah, Decl(argumentsObjectIterator02_ES6.ts, 2, 7)) >arguments : Symbol(arguments) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) let result = []; >result : Symbol(result, Decl(argumentsObjectIterator02_ES6.ts, 4, 7)) @@ -21,9 +21,9 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe >blah : Symbol(blah, Decl(argumentsObjectIterator02_ES6.ts, 2, 7)) result.push(arg + arg); ->result.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>result.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >result : Symbol(result, Decl(argumentsObjectIterator02_ES6.ts, 4, 7)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >arg : Symbol(arg, Decl(argumentsObjectIterator02_ES6.ts, 5, 12)) >arg : Symbol(arg, Decl(argumentsObjectIterator02_ES6.ts, 5, 12)) } diff --git a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.symbols b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.symbols index 1c3b54ef427..813f9e2f424 100644 --- a/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.symbols +++ b/tests/baselines/reference/argumentsUsedInObjectLiteralProperty.symbols @@ -10,9 +10,9 @@ class A { return { selectedValue: arguments.length >selectedValue : Symbol(selectedValue, Decl(argumentsUsedInObjectLiteralProperty.ts, 2, 16)) ->arguments.length : Symbol(IArguments.length, Decl(lib.d.ts, 272, 25)) +>arguments.length : Symbol(IArguments.length, Decl(lib.d.ts, --, --)) >arguments : Symbol(arguments) ->length : Symbol(IArguments.length, Decl(lib.d.ts, 272, 25)) +>length : Symbol(IArguments.length, Decl(lib.d.ts, --, --)) }; } diff --git a/tests/baselines/reference/arrayAugment.symbols b/tests/baselines/reference/arrayAugment.symbols index 8310729032f..90a506077ad 100644 --- a/tests/baselines/reference/arrayAugment.symbols +++ b/tests/baselines/reference/arrayAugment.symbols @@ -1,12 +1,12 @@ === tests/cases/compiler/arrayAugment.ts === interface Array { ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(arrayAugment.ts, 0, 0)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(arrayAugment.ts, 0, 16)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(arrayAugment.ts, 0, 0)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(arrayAugment.ts, 0, 16)) split: (parts: number) => T[][]; >split : Symbol(split, Decl(arrayAugment.ts, 0, 20)) >parts : Symbol(parts, Decl(arrayAugment.ts, 1, 12)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(arrayAugment.ts, 0, 16)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(arrayAugment.ts, 0, 16)) } var x = ['']; diff --git a/tests/baselines/reference/arrayConcat2.symbols b/tests/baselines/reference/arrayConcat2.symbols index 8c0af7be702..daedee6e9c8 100644 --- a/tests/baselines/reference/arrayConcat2.symbols +++ b/tests/baselines/reference/arrayConcat2.symbols @@ -3,21 +3,21 @@ var a: string[] = []; >a : Symbol(a, Decl(arrayConcat2.ts, 0, 3)) a.concat("hello", 'world'); ->a.concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>a.concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(arrayConcat2.ts, 0, 3)) ->concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) a.concat('Hello'); ->a.concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>a.concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(arrayConcat2.ts, 0, 3)) ->concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var b = new Array(); >b : Symbol(b, Decl(arrayConcat2.ts, 5, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) b.concat('hello'); ->b.concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>b.concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(arrayConcat2.ts, 5, 3)) ->concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/arrayConcatMap.symbols b/tests/baselines/reference/arrayConcatMap.symbols index 1ff4bc3bff5..5ef9d811723 100644 --- a/tests/baselines/reference/arrayConcatMap.symbols +++ b/tests/baselines/reference/arrayConcatMap.symbols @@ -1,14 +1,14 @@ === tests/cases/compiler/arrayConcatMap.ts === var x = [].concat([{ a: 1 }], [{ a: 2 }]) >x : Symbol(x, Decl(arrayConcatMap.ts, 0, 3)) ->[].concat([{ a: 1 }], [{ a: 2 }]) .map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) ->[].concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) ->concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>[].concat([{ a: 1 }], [{ a: 2 }]) .map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>[].concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(arrayConcatMap.ts, 0, 20)) >a : Symbol(a, Decl(arrayConcatMap.ts, 0, 32)) .map(b => b.a); ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(arrayConcatMap.ts, 1, 15)) >b : Symbol(b, Decl(arrayConcatMap.ts, 1, 15)) diff --git a/tests/baselines/reference/arrayConstructors1.symbols b/tests/baselines/reference/arrayConstructors1.symbols index cab2b0dc68a..1c69de79e00 100644 --- a/tests/baselines/reference/arrayConstructors1.symbols +++ b/tests/baselines/reference/arrayConstructors1.symbols @@ -4,28 +4,28 @@ var x: string[]; x = new Array(1); >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) x = new Array('hi', 'bye'); >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) x = new Array('hi', 'bye'); >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var y: number[]; >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3)) y = new Array(1); >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) y = new Array(1,2); >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) y = new Array(1, 2); >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/arrayLiteral.symbols b/tests/baselines/reference/arrayLiteral.symbols index 77673863b64..17c8ed019b5 100644 --- a/tests/baselines/reference/arrayLiteral.symbols +++ b/tests/baselines/reference/arrayLiteral.symbols @@ -6,7 +6,7 @@ var x = []; var x = new Array(1); >x : Symbol(x, Decl(arrayLiteral.ts, 2, 3), Decl(arrayLiteral.ts, 3, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var y = [1]; >y : Symbol(y, Decl(arrayLiteral.ts, 5, 3), Decl(arrayLiteral.ts, 6, 3), Decl(arrayLiteral.ts, 7, 3)) @@ -16,14 +16,14 @@ var y = [1, 2]; var y = new Array(); >y : Symbol(y, Decl(arrayLiteral.ts, 5, 3), Decl(arrayLiteral.ts, 6, 3), Decl(arrayLiteral.ts, 7, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var x2: number[] = []; >x2 : Symbol(x2, Decl(arrayLiteral.ts, 9, 3), Decl(arrayLiteral.ts, 10, 3)) var x2: number[] = new Array(1); >x2 : Symbol(x2, Decl(arrayLiteral.ts, 9, 3), Decl(arrayLiteral.ts, 10, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var y2: number[] = [1]; >y2 : Symbol(y2, Decl(arrayLiteral.ts, 12, 3), Decl(arrayLiteral.ts, 13, 3), Decl(arrayLiteral.ts, 14, 3)) @@ -33,5 +33,5 @@ var y2: number[] = [1, 2]; var y2: number[] = new Array(); >y2 : Symbol(y2, Decl(arrayLiteral.ts, 12, 3), Decl(arrayLiteral.ts, 13, 3), Decl(arrayLiteral.ts, 14, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.symbols b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.symbols index 071596c9af1..1d47bf26493 100644 --- a/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.symbols +++ b/tests/baselines/reference/arrayLiteralWithMultipleBestCommonTypes.symbols @@ -35,14 +35,14 @@ var cs = [a, b, c]; // { x: number; y?: number };[] var ds = [(x: Object) => 1, (x: string) => 2]; // { (x:Object) => number }[] >ds : Symbol(ds, Decl(arrayLiteralWithMultipleBestCommonTypes.ts, 10, 3)) >x : Symbol(x, Decl(arrayLiteralWithMultipleBestCommonTypes.ts, 10, 11)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(arrayLiteralWithMultipleBestCommonTypes.ts, 10, 29)) var es = [(x: string) => 2, (x: Object) => 1]; // { (x:string) => number }[] >es : Symbol(es, Decl(arrayLiteralWithMultipleBestCommonTypes.ts, 11, 3)) >x : Symbol(x, Decl(arrayLiteralWithMultipleBestCommonTypes.ts, 11, 11)) >x : Symbol(x, Decl(arrayLiteralWithMultipleBestCommonTypes.ts, 11, 29)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var fs = [(a: { x: number; y?: number }) => 1, (b: { x: number; z?: number }) => 2]; // (a: { x: number; y?: number }) => number[] >fs : Symbol(fs, Decl(arrayLiteralWithMultipleBestCommonTypes.ts, 12, 3)) diff --git a/tests/baselines/reference/arrayLiterals2ES5.symbols b/tests/baselines/reference/arrayLiterals2ES5.symbols index c69b79de272..4db8372a601 100644 --- a/tests/baselines/reference/arrayLiterals2ES5.symbols +++ b/tests/baselines/reference/arrayLiterals2ES5.symbols @@ -80,14 +80,14 @@ var temp4 = []; interface myArray extends Array { } >myArray : Symbol(myArray, Decl(arrayLiterals2ES5.ts, 42, 15)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) interface myArray2 extends Array { } >myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES5.ts, 44, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var d0 = [1, true, ...temp,]; // has type (string|number|boolean)[] >d0 : Symbol(d0, Decl(arrayLiterals2ES5.ts, 46, 3)) diff --git a/tests/baselines/reference/arrayLiterals2ES6.symbols b/tests/baselines/reference/arrayLiterals2ES6.symbols index 75202d69690..0c7dc1495df 100644 --- a/tests/baselines/reference/arrayLiterals2ES6.symbols +++ b/tests/baselines/reference/arrayLiterals2ES6.symbols @@ -72,14 +72,14 @@ var temp2: [number[], string[]] = [[1, 2, 3], ["hello", "string"]]; interface myArray extends Array { } >myArray : Symbol(myArray, Decl(arrayLiterals2ES6.ts, 40, 67)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) interface myArray2 extends Array { } >myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES6.ts, 42, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var d0 = [1, true, ...temp, ]; // has type (string|number|boolean)[] >d0 : Symbol(d0, Decl(arrayLiterals2ES6.ts, 44, 3)) diff --git a/tests/baselines/reference/arrayconcat.symbols b/tests/baselines/reference/arrayconcat.symbols index 64e63d7c2ec..4fee1860be6 100644 --- a/tests/baselines/reference/arrayconcat.symbols +++ b/tests/baselines/reference/arrayconcat.symbols @@ -39,29 +39,29 @@ class parser { >this.options : Symbol(options, Decl(arrayconcat.ts, 10, 14)) >this : Symbol(parser, Decl(arrayconcat.ts, 8, 1)) >options : Symbol(options, Decl(arrayconcat.ts, 10, 14)) ->this.options.sort : Symbol(Array.sort, Decl(lib.d.ts, 1054, 45)) +>this.options.sort : Symbol(Array.sort, Decl(lib.d.ts, --, --)) >this.options : Symbol(options, Decl(arrayconcat.ts, 10, 14)) >this : Symbol(parser, Decl(arrayconcat.ts, 8, 1)) >options : Symbol(options, Decl(arrayconcat.ts, 10, 14)) ->sort : Symbol(Array.sort, Decl(lib.d.ts, 1054, 45)) +>sort : Symbol(Array.sort, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(arrayconcat.ts, 14, 44)) >b : Symbol(b, Decl(arrayconcat.ts, 14, 46)) var aName = a.name.toLowerCase(); >aName : Symbol(aName, Decl(arrayconcat.ts, 15, 15)) ->a.name.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>a.name.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >a.name : Symbol(IOptions.name, Decl(arrayconcat.ts, 0, 20)) >a : Symbol(a, Decl(arrayconcat.ts, 14, 44)) >name : Symbol(IOptions.name, Decl(arrayconcat.ts, 0, 20)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) var bName = b.name.toLowerCase(); >bName : Symbol(bName, Decl(arrayconcat.ts, 16, 15)) ->b.name.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>b.name.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >b.name : Symbol(IOptions.name, Decl(arrayconcat.ts, 0, 20)) >b : Symbol(b, Decl(arrayconcat.ts, 14, 46)) >name : Symbol(IOptions.name, Decl(arrayconcat.ts, 0, 20)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) if (aName > bName) { >aName : Symbol(aName, Decl(arrayconcat.ts, 15, 15)) diff --git a/tests/baselines/reference/arrowFunctionExpressions.symbols b/tests/baselines/reference/arrowFunctionExpressions.symbols index 61c575933da..853c5074580 100644 --- a/tests/baselines/reference/arrowFunctionExpressions.symbols +++ b/tests/baselines/reference/arrowFunctionExpressions.symbols @@ -3,16 +3,16 @@ var a = (p: string) => p.length; >a : Symbol(a, Decl(arrowFunctionExpressions.ts, 1, 3), Decl(arrowFunctionExpressions.ts, 2, 3)) >p : Symbol(p, Decl(arrowFunctionExpressions.ts, 1, 9)) ->p.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>p.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(arrowFunctionExpressions.ts, 1, 9)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) var a = (p: string) => { return p.length; } >a : Symbol(a, Decl(arrowFunctionExpressions.ts, 1, 3), Decl(arrowFunctionExpressions.ts, 2, 3)) >p : Symbol(p, Decl(arrowFunctionExpressions.ts, 2, 9)) ->p.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>p.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(arrowFunctionExpressions.ts, 2, 9)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // Identifier => Block is equivalent to(Identifier) => Block var b = j => { return 0; } @@ -147,9 +147,9 @@ function someFn() { >n : Symbol(n, Decl(arrowFunctionExpressions.ts, 45, 15)) arr(3)(4).toExponential(); ->arr(3)(4).toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>arr(3)(4).toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) >arr : Symbol(arr, Decl(arrowFunctionExpressions.ts, 45, 7)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) } // Arrow function used in function @@ -162,9 +162,9 @@ function someOtherFn() { >n : Symbol(n, Decl(arrowFunctionExpressions.ts, 51, 15)) arr(4).charAt(0); ->arr(4).charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>arr(4).charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >arr : Symbol(arr, Decl(arrowFunctionExpressions.ts, 51, 7)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) } // Arrow function used in nested function in function @@ -222,9 +222,9 @@ function someOuterFn() { >innerFn : Symbol(innerFn, Decl(arrowFunctionExpressions.ts, 77, 30)) return () => n.length; ->n.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>n.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(arrowFunctionExpressions.ts, 77, 15)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } return innerFn; >innerFn : Symbol(innerFn, Decl(arrowFunctionExpressions.ts, 77, 30)) @@ -237,9 +237,9 @@ var h = someOuterFn()('')()(); >someOuterFn : Symbol(someOuterFn, Decl(arrowFunctionExpressions.ts, 72, 14)) h.toExponential(); ->h.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>h.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) >h : Symbol(h, Decl(arrowFunctionExpressions.ts, 85, 3)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) // Arrow function used in try/catch/finally in function function tryCatchFn() { diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.symbols b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.symbols index c1d1cf40d90..aa2f19c1f60 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.symbols +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody5.symbols @@ -1,13 +1,13 @@ === tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts === var a = () => { name: "foo", message: "bar" }; >a : Symbol(a, Decl(arrowFunctionWithObjectLiteralBody5.ts, 0, 3)) ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(arrowFunctionWithObjectLiteralBody5.ts, 0, 22)) >message : Symbol(message, Decl(arrowFunctionWithObjectLiteralBody5.ts, 0, 35)) var b = () => ({ name: "foo", message: "bar" }); >b : Symbol(b, Decl(arrowFunctionWithObjectLiteralBody5.ts, 2, 3)) ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(arrowFunctionWithObjectLiteralBody5.ts, 2, 23)) >message : Symbol(message, Decl(arrowFunctionWithObjectLiteralBody5.ts, 2, 36)) @@ -18,7 +18,7 @@ var c = () => ({ name: "foo", message: "bar" }); var d = () => ((({ name: "foo", message: "bar" }))); >d : Symbol(d, Decl(arrowFunctionWithObjectLiteralBody5.ts, 6, 3)) ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(arrowFunctionWithObjectLiteralBody5.ts, 6, 25)) >message : Symbol(message, Decl(arrowFunctionWithObjectLiteralBody5.ts, 6, 38)) diff --git a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.symbols b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.symbols index 80530cde016..141b0d49880 100644 --- a/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.symbols +++ b/tests/baselines/reference/arrowFunctionWithObjectLiteralBody6.symbols @@ -1,13 +1,13 @@ === tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.ts === var a = () => { name: "foo", message: "bar" }; >a : Symbol(a, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 3)) ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 22)) >message : Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 0, 35)) var b = () => ({ name: "foo", message: "bar" }); >b : Symbol(b, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 3)) ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 23)) >message : Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 2, 36)) @@ -18,7 +18,7 @@ var c = () => ({ name: "foo", message: "bar" }); var d = () => ((({ name: "foo", message: "bar" }))); >d : Symbol(d, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 3)) ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 25)) >message : Symbol(message, Decl(arrowFunctionWithObjectLiteralBody6.ts, 6, 38)) diff --git a/tests/baselines/reference/asOperator1.symbols b/tests/baselines/reference/asOperator1.symbols index 27353ec7b30..343d3422b5c 100644 --- a/tests/baselines/reference/asOperator1.symbols +++ b/tests/baselines/reference/asOperator1.symbols @@ -8,12 +8,12 @@ var x = undefined as number; var y = (null as string).length; >y : Symbol(y, Decl(asOperator1.ts, 2, 3)) ->(null as string).length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>(null as string).length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) var z = Date as any as string; >z : Symbol(z, Decl(asOperator1.ts, 3, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) // Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' var j = 32 as number|string; diff --git a/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols b/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols index 8218de9be79..ea9440cf1a9 100644 --- a/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols +++ b/tests/baselines/reference/assignmentCompatWithCallSignatures3.symbols @@ -106,23 +106,23 @@ var a11: (x: { foo: string }, y: { foo: string; bar: string }) => Base; var a12: (x: Array, y: Array) => Array; >a12 : Symbol(a12, Decl(assignmentCompatWithCallSignatures3.ts, 18, 3)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 18, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 18, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithCallSignatures3.ts, 3, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) var a13: (x: Array, y: Array) => Array; >a13 : Symbol(a13, Decl(assignmentCompatWithCallSignatures3.ts, 19, 3)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 19, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 19, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) var a14: (x: { a: string; b: number }) => Object; @@ -130,7 +130,7 @@ var a14: (x: { a: string; b: number }) => Object; >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 20, 10)) >a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 20, 14)) >b : Symbol(b, Decl(assignmentCompatWithCallSignatures3.ts, 20, 25)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var a15: { >a15 : Symbol(a15, Decl(assignmentCompatWithCallSignatures3.ts, 21, 3)) @@ -189,8 +189,8 @@ var a18: { (a: Date): Date; >a : Symbol(a, Decl(assignmentCompatWithCallSignatures3.ts, 40, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) }): any[]; } @@ -407,14 +407,14 @@ b11 = a11; // ok var b12: >(x: Array, y: T) => Array; >b12 : Symbol(b12, Decl(assignmentCompatWithCallSignatures3.ts, 77, 3)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 77, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 77, 33)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 77, 48)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 77, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) a12 = b12; // ok @@ -428,10 +428,10 @@ b12 = a12; // ok var b13: >(x: Array, y: T) => T; >b13 : Symbol(b13, Decl(assignmentCompatWithCallSignatures3.ts, 80, 3)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 80, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithCallSignatures3.ts, 2, 27)) >x : Symbol(x, Decl(assignmentCompatWithCallSignatures3.ts, 80, 36)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithCallSignatures3.ts, 0, 0)) >y : Symbol(y, Decl(assignmentCompatWithCallSignatures3.ts, 80, 51)) >T : Symbol(T, Decl(assignmentCompatWithCallSignatures3.ts, 80, 10)) diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols index ef02b7a08d3..4ef01deaea8 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures3.symbols @@ -106,23 +106,23 @@ var a11: new (x: { foo: string }, y: { foo: string; bar: string }) => Base; var a12: new (x: Array, y: Array) => Array; >a12 : Symbol(a12, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 3)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 18, 29)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(assignmentCompatWithConstructSignatures3.ts, 3, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) var a13: new (x: Array, y: Array) => Array; >a13 : Symbol(a13, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 3)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 19, 29)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) var a14: new (x: { a: string; b: number }) => Object; @@ -130,7 +130,7 @@ var a14: new (x: { a: string; b: number }) => Object; >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 14)) >a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 18)) >b : Symbol(b, Decl(assignmentCompatWithConstructSignatures3.ts, 20, 29)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var a15: { >a15 : Symbol(a15, Decl(assignmentCompatWithConstructSignatures3.ts, 21, 3)) @@ -189,8 +189,8 @@ var a18: { new (a: Date): Date; >a : Symbol(a, Decl(assignmentCompatWithConstructSignatures3.ts, 40, 13)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) }): any[]; } @@ -407,14 +407,14 @@ b11 = a11; // ok var b12: new >(x: Array, y: T) => Array; >b12 : Symbol(b12, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 3)) >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 37)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 52)) >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 77, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) a12 = b12; // ok @@ -428,10 +428,10 @@ b12 = a12; // ok var b13: new >(x: Array, y: T) => T; >b13 : Symbol(b13, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 3)) >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(assignmentCompatWithConstructSignatures3.ts, 2, 27)) >x : Symbol(x, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 40)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(assignmentCompatWithConstructSignatures3.ts, 0, 0)) >y : Symbol(y, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 55)) >T : Symbol(T, Decl(assignmentCompatWithConstructSignatures3.ts, 80, 14)) diff --git a/tests/baselines/reference/asyncArrowFunction1_es6.symbols b/tests/baselines/reference/asyncArrowFunction1_es6.symbols index 349a51c43ba..a8a5aef325a 100644 --- a/tests/baselines/reference/asyncArrowFunction1_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunction1_es6.symbols @@ -2,6 +2,6 @@ var foo = async (): Promise => { >foo : Symbol(foo, Decl(asyncArrowFunction1_es6.ts, 1, 3)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) }; diff --git a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.symbols b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.symbols index 5f820eec862..2f516d7d758 100644 --- a/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.symbols +++ b/tests/baselines/reference/asyncArrowFunctionCapturesArguments_es6.symbols @@ -10,9 +10,9 @@ class C { var fn = async () => await other.apply(this, arguments); >fn : Symbol(fn, Decl(asyncArrowFunctionCapturesArguments_es6.ts, 3, 9)) ->other.apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>other.apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) >other : Symbol(other, Decl(asyncArrowFunctionCapturesArguments_es6.ts, 1, 13)) ->apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) >this : Symbol(C, Decl(asyncArrowFunctionCapturesArguments_es6.ts, 0, 0)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/asyncAwait_es6.symbols b/tests/baselines/reference/asyncAwait_es6.symbols index 2eb28e12211..3c668b15b36 100644 --- a/tests/baselines/reference/asyncAwait_es6.symbols +++ b/tests/baselines/reference/asyncAwait_es6.symbols @@ -2,16 +2,16 @@ type MyPromise = Promise; >MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) >T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(asyncAwait_es6.ts, 0, 15)) declare var MyPromise: typeof Promise; >MyPromise : Symbol(MyPromise, Decl(asyncAwait_es6.ts, 0, 0), Decl(asyncAwait_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare var p: Promise; >p : Symbol(p, Decl(asyncAwait_es6.ts, 2, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare var mp: MyPromise; >mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11)) @@ -22,7 +22,7 @@ async function f0() { } async function f1(): Promise { } >f1 : Symbol(f1, Decl(asyncAwait_es6.ts, 5, 23)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) async function f3(): MyPromise { } >f3 : Symbol(f3, Decl(asyncAwait_es6.ts, 6, 38)) @@ -33,7 +33,7 @@ let f4 = async function() { } let f5 = async function(): Promise { } >f5 : Symbol(f5, Decl(asyncAwait_es6.ts, 10, 3)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) let f6 = async function(): MyPromise { } >f6 : Symbol(f6, Decl(asyncAwait_es6.ts, 11, 3)) @@ -44,7 +44,7 @@ let f7 = async () => { }; let f8 = async (): Promise => { }; >f8 : Symbol(f8, Decl(asyncAwait_es6.ts, 14, 3)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) let f9 = async (): MyPromise => { }; >f9 : Symbol(f9, Decl(asyncAwait_es6.ts, 15, 3)) @@ -60,7 +60,7 @@ let f11 = async () => mp; let f12 = async (): Promise => mp; >f12 : Symbol(f12, Decl(asyncAwait_es6.ts, 18, 3)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >mp : Symbol(mp, Decl(asyncAwait_es6.ts, 3, 11)) let f13 = async (): MyPromise => p; @@ -76,7 +76,7 @@ let o = { async m2(): Promise { }, >m2 : Symbol(m2, Decl(asyncAwait_es6.ts, 22, 16)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) async m3(): MyPromise { } >m3 : Symbol(m3, Decl(asyncAwait_es6.ts, 23, 31)) @@ -92,7 +92,7 @@ class C { async m2(): Promise { } >m2 : Symbol(m2, Decl(asyncAwait_es6.ts, 28, 15)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) async m3(): MyPromise { } >m3 : Symbol(m3, Decl(asyncAwait_es6.ts, 29, 30)) @@ -103,7 +103,7 @@ class C { static async m5(): Promise { } >m5 : Symbol(C.m5, Decl(asyncAwait_es6.ts, 31, 22)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) static async m6(): MyPromise { } >m6 : Symbol(C.m6, Decl(asyncAwait_es6.ts, 32, 37)) diff --git a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols index b970dbbf888..f1946aa712f 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration11_es6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts === async function await(): Promise { >await : Symbol(await, Decl(asyncFunctionDeclaration11_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols index d17f4bf899e..34623ded262 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration14_es6.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration14_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) return; } diff --git a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols index c99ae35266b..b1721789f5c 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols +++ b/tests/baselines/reference/asyncFunctionDeclaration1_es6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts === async function foo(): Promise { >foo : Symbol(foo, Decl(asyncFunctionDeclaration1_es6.ts, 0, 0)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/augmentArray.symbols b/tests/baselines/reference/augmentArray.symbols index 8c52363d601..ae0caddb1c6 100644 --- a/tests/baselines/reference/augmentArray.symbols +++ b/tests/baselines/reference/augmentArray.symbols @@ -1,7 +1,7 @@ === tests/cases/compiler/augmentArray.ts === interface Array { ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(augmentArray.ts, 0, 0)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(augmentArray.ts, 0, 16)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(augmentArray.ts, 0, 0)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(augmentArray.ts, 0, 16)) (): any[]; } diff --git a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.symbols b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.symbols index 81c8b13d207..c3dfe5996b9 100644 --- a/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.symbols +++ b/tests/baselines/reference/augmentedTypeBracketAccessIndexSignature.symbols @@ -8,7 +8,7 @@ interface Bar { b } >b : Symbol(b, Decl(augmentedTypeBracketAccessIndexSignature.ts, 1, 15)) interface Object { ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11), Decl(augmentedTypeBracketAccessIndexSignature.ts, 1, 19)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(augmentedTypeBracketAccessIndexSignature.ts, 1, 19)) [n: number]: Foo; >n : Symbol(n, Decl(augmentedTypeBracketAccessIndexSignature.ts, 4, 5)) @@ -16,7 +16,7 @@ interface Object { } interface Function { ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(augmentedTypeBracketAccessIndexSignature.ts, 5, 1)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(augmentedTypeBracketAccessIndexSignature.ts, 5, 1)) [n: number]: Bar; >n : Symbol(n, Decl(augmentedTypeBracketAccessIndexSignature.ts, 8, 5)) diff --git a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.symbols b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.symbols index cc9c2ba62ef..d12e8e13793 100644 --- a/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.symbols +++ b/tests/baselines/reference/augmentedTypeBracketNamedPropertyAccess.symbols @@ -1,12 +1,12 @@ === tests/cases/compiler/augmentedTypeBracketNamedPropertyAccess.ts === interface Object { ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11), Decl(augmentedTypeBracketNamedPropertyAccess.ts, 0, 0)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(augmentedTypeBracketNamedPropertyAccess.ts, 0, 0)) data: number; >data : Symbol(data, Decl(augmentedTypeBracketNamedPropertyAccess.ts, 0, 18)) } interface Function { ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(augmentedTypeBracketNamedPropertyAccess.ts, 2, 1)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(augmentedTypeBracketNamedPropertyAccess.ts, 2, 1)) functionData: string; >functionData : Symbol(functionData, Decl(augmentedTypeBracketNamedPropertyAccess.ts, 3, 20)) diff --git a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols index 6ee2b1de415..fd532aeca74 100644 --- a/tests/baselines/reference/awaitBinaryExpression1_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression1_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression1_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression1_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = await p || a; diff --git a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols index 9c65780cfad..3117f62da17 100644 --- a/tests/baselines/reference/awaitBinaryExpression2_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression2_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression2_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression2_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = await p && a; diff --git a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols index 69d02403e85..e50f194bbee 100644 --- a/tests/baselines/reference/awaitBinaryExpression3_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression3_es6.symbols @@ -4,11 +4,11 @@ declare var a: number; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression3_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression3_es6.ts, 1, 31)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = await p + a; diff --git a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols index c88e0f247a5..02e05faeab0 100644 --- a/tests/baselines/reference/awaitBinaryExpression4_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression4_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression4_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression4_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = await p, a; diff --git a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols index 0ee4a03f3c5..061364240f8 100644 --- a/tests/baselines/reference/awaitBinaryExpression5_es6.symbols +++ b/tests/baselines/reference/awaitBinaryExpression5_es6.symbols @@ -4,11 +4,11 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitBinaryExpression5_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) async function func(): Promise { >func : Symbol(func, Decl(awaitBinaryExpression5_es6.ts, 1, 32)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var o: { a: boolean; }; diff --git a/tests/baselines/reference/awaitCallExpression1_es6.symbols b/tests/baselines/reference/awaitCallExpression1_es6.symbols index d70728a5b2d..debe9180bcc 100644 --- a/tests/baselines/reference/awaitCallExpression1_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression1_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression1_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression1_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression1_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression1_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fn : Symbol(fn, Decl(awaitCallExpression1_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression1_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression1_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression1_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = fn(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression2_es6.symbols b/tests/baselines/reference/awaitCallExpression2_es6.symbols index a3fd474060a..be9a11410c2 100644 --- a/tests/baselines/reference/awaitCallExpression2_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression2_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression2_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression2_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression2_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression2_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fn : Symbol(fn, Decl(awaitCallExpression2_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression2_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression2_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression2_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = fn(await p, a, a); diff --git a/tests/baselines/reference/awaitCallExpression3_es6.symbols b/tests/baselines/reference/awaitCallExpression3_es6.symbols index 6dde8fc7f58..612e33c456c 100644 --- a/tests/baselines/reference/awaitCallExpression3_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression3_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression3_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression3_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression3_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression3_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fn : Symbol(fn, Decl(awaitCallExpression3_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression3_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression3_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression3_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = fn(a, await p, a); diff --git a/tests/baselines/reference/awaitCallExpression4_es6.symbols b/tests/baselines/reference/awaitCallExpression4_es6.symbols index ca563274b51..6925e5a44ea 100644 --- a/tests/baselines/reference/awaitCallExpression4_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression4_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression4_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression4_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression4_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression4_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fn : Symbol(fn, Decl(awaitCallExpression4_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression4_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression4_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression4_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = (await pfn)(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression5_es6.symbols b/tests/baselines/reference/awaitCallExpression5_es6.symbols index 4c75a6fec6d..8bdce5cd12c 100644 --- a/tests/baselines/reference/awaitCallExpression5_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression5_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression5_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression5_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression5_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression5_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fn : Symbol(fn, Decl(awaitCallExpression5_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression5_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression5_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression5_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = o.fn(a, a, a); diff --git a/tests/baselines/reference/awaitCallExpression6_es6.symbols b/tests/baselines/reference/awaitCallExpression6_es6.symbols index effed91ec06..ad79f75ab49 100644 --- a/tests/baselines/reference/awaitCallExpression6_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression6_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression6_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression6_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression6_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression6_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fn : Symbol(fn, Decl(awaitCallExpression6_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression6_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression6_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression6_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = o.fn(await p, a, a); diff --git a/tests/baselines/reference/awaitCallExpression7_es6.symbols b/tests/baselines/reference/awaitCallExpression7_es6.symbols index 3393d2a0759..0da1dd16016 100644 --- a/tests/baselines/reference/awaitCallExpression7_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression7_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression7_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression7_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression7_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression7_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fn : Symbol(fn, Decl(awaitCallExpression7_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression7_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression7_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression7_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = o.fn(a, await p, a); diff --git a/tests/baselines/reference/awaitCallExpression8_es6.symbols b/tests/baselines/reference/awaitCallExpression8_es6.symbols index 331ebbdb7e1..d2d4fa2264d 100644 --- a/tests/baselines/reference/awaitCallExpression8_es6.symbols +++ b/tests/baselines/reference/awaitCallExpression8_es6.symbols @@ -4,7 +4,7 @@ declare var a: boolean; declare var p: Promise; >p : Symbol(p, Decl(awaitCallExpression8_es6.ts, 1, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; >fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 1, 32)) @@ -21,14 +21,14 @@ declare var o: { fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }; declare var pfn: Promise<{ (arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >pfn : Symbol(pfn, Decl(awaitCallExpression8_es6.ts, 4, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 4, 28)) >arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 4, 42)) >arg2 : Symbol(arg2, Decl(awaitCallExpression8_es6.ts, 4, 57)) declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; }>; >po : Symbol(po, Decl(awaitCallExpression8_es6.ts, 5, 11)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fn : Symbol(fn, Decl(awaitCallExpression8_es6.ts, 5, 25)) >arg0 : Symbol(arg0, Decl(awaitCallExpression8_es6.ts, 5, 29)) >arg1 : Symbol(arg1, Decl(awaitCallExpression8_es6.ts, 5, 43)) @@ -36,7 +36,7 @@ declare var po: Promise<{ fn(arg0: boolean, arg1: boolean, arg2: boolean): void; async function func(): Promise { >func : Symbol(func, Decl(awaitCallExpression8_es6.ts, 5, 84)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "before"; var b = (await po).fn(a, a, a); diff --git a/tests/baselines/reference/awaitUnion_es6.symbols b/tests/baselines/reference/awaitUnion_es6.symbols index 2db3b1a2fdb..48524c4526d 100644 --- a/tests/baselines/reference/awaitUnion_es6.symbols +++ b/tests/baselines/reference/awaitUnion_es6.symbols @@ -4,20 +4,20 @@ declare let a: number | string; declare let b: PromiseLike | PromiseLike; >b : Symbol(b, Decl(awaitUnion_es6.ts, 1, 11)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, --, --)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, --, --)) declare let c: PromiseLike; >c : Symbol(c, Decl(awaitUnion_es6.ts, 2, 11)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, --, --)) declare let d: number | PromiseLike; >d : Symbol(d, Decl(awaitUnion_es6.ts, 3, 11)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, --, --)) declare let e: number | PromiseLike; >e : Symbol(e, Decl(awaitUnion_es6.ts, 4, 11)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, 1187, 163)) +>PromiseLike : Symbol(PromiseLike, Decl(lib.d.ts, --, --)) async function f() { >f : Symbol(f, Decl(awaitUnion_es6.ts, 4, 53)) diff --git a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.symbols b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.symbols index e6b6def0944..626777523ab 100644 --- a/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.symbols +++ b/tests/baselines/reference/bestCommonTypeOfConditionalExpressions.symbols @@ -58,20 +58,20 @@ var r6 = true ? (x: number) => { } : (x: Object) => { }; // returns number => vo >r6 : Symbol(r6, Decl(bestCommonTypeOfConditionalExpressions.ts, 17, 3)) >x : Symbol(x, Decl(bestCommonTypeOfConditionalExpressions.ts, 17, 17)) >x : Symbol(x, Decl(bestCommonTypeOfConditionalExpressions.ts, 17, 38)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r7: (x: Object) => void = true ? (x: number) => { } : (x: Object) => { }; >r7 : Symbol(r7, Decl(bestCommonTypeOfConditionalExpressions.ts, 18, 3)) >x : Symbol(x, Decl(bestCommonTypeOfConditionalExpressions.ts, 18, 9)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(bestCommonTypeOfConditionalExpressions.ts, 18, 38)) >x : Symbol(x, Decl(bestCommonTypeOfConditionalExpressions.ts, 18, 59)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r8 = true ? (x: Object) => { } : (x: number) => { }; // returns Object => void >r8 : Symbol(r8, Decl(bestCommonTypeOfConditionalExpressions.ts, 19, 3)) >x : Symbol(x, Decl(bestCommonTypeOfConditionalExpressions.ts, 19, 17)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(bestCommonTypeOfConditionalExpressions.ts, 19, 38)) var r10: Base = true ? derived : derived2; // no error since we use the contextual type in BCT @@ -93,7 +93,7 @@ function foo5(t: T, u: U): Object { >T : Symbol(T, Decl(bestCommonTypeOfConditionalExpressions.ts, 23, 14)) >u : Symbol(u, Decl(bestCommonTypeOfConditionalExpressions.ts, 23, 25)) >U : Symbol(U, Decl(bestCommonTypeOfConditionalExpressions.ts, 23, 16)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) return true ? t : u; // BCT is Object >t : Symbol(t, Decl(bestCommonTypeOfConditionalExpressions.ts, 23, 20)) diff --git a/tests/baselines/reference/binopAssignmentShouldHaveType.symbols b/tests/baselines/reference/binopAssignmentShouldHaveType.symbols index d984647149e..98f4ffee743 100644 --- a/tests/baselines/reference/binopAssignmentShouldHaveType.symbols +++ b/tests/baselines/reference/binopAssignmentShouldHaveType.symbols @@ -21,12 +21,12 @@ module Test { >name : Symbol(name, Decl(binopAssignmentShouldHaveType.ts, 8, 6)) if ((name= this.getName()).length > 0) { ->(name= this.getName()).length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>(name= this.getName()).length : Symbol(String.length, Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(binopAssignmentShouldHaveType.ts, 8, 6)) >this.getName : Symbol(getName, Decl(binopAssignmentShouldHaveType.ts, 3, 19)) >this : Symbol(Bug, Decl(binopAssignmentShouldHaveType.ts, 2, 13)) >getName : Symbol(getName, Decl(binopAssignmentShouldHaveType.ts, 3, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) console.log(name); >console : Symbol(console, Decl(binopAssignmentShouldHaveType.ts, 0, 11)) diff --git a/tests/baselines/reference/bitwiseNotOperatorWithStringType.symbols b/tests/baselines/reference/bitwiseNotOperatorWithStringType.symbols index 1e2d28f51c2..39c16a701b6 100644 --- a/tests/baselines/reference/bitwiseNotOperatorWithStringType.symbols +++ b/tests/baselines/reference/bitwiseNotOperatorWithStringType.symbols @@ -88,9 +88,9 @@ var ResultIsNumber11 = ~(STRING + STRING); var ResultIsNumber12 = ~STRING.charAt(0); >ResultIsNumber12 : Symbol(ResultIsNumber12, Decl(bitwiseNotOperatorWithStringType.ts, 32, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(bitwiseNotOperatorWithStringType.ts, 1, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) // multiple ~ operators var ResultIsNumber13 = ~~STRING; diff --git a/tests/baselines/reference/booleanPropertyAccess.symbols b/tests/baselines/reference/booleanPropertyAccess.symbols index c552f268d01..f69c3f6a789 100644 --- a/tests/baselines/reference/booleanPropertyAccess.symbols +++ b/tests/baselines/reference/booleanPropertyAccess.symbols @@ -4,12 +4,12 @@ var x = true; var a = x.toString(); >a : Symbol(a, Decl(booleanPropertyAccess.ts, 2, 3)) ->x.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(booleanPropertyAccess.ts, 0, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var b = x['toString'](); >b : Symbol(b, Decl(booleanPropertyAccess.ts, 3, 3)) >x : Symbol(x, Decl(booleanPropertyAccess.ts, 0, 3)) ->'toString' : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>'toString' : Symbol(Object.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.symbols b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.symbols index d0fe78cb178..12bc165575b 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance2.symbols +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance2.symbols @@ -110,23 +110,23 @@ interface A { // T a12: (x: Array, y: Array) => Array; >a12 : Symbol(a12, Decl(callSignatureAssignabilityInInheritance2.ts, 19, 71)) >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance2.ts, 20, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance2.ts, 0, 0)) >y : Symbol(y, Decl(callSignatureAssignabilityInInheritance2.ts, 20, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(callSignatureAssignabilityInInheritance2.ts, 3, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance2.ts, 2, 27)) a13: (x: Array, y: Array) => Array; >a13 : Symbol(a13, Decl(callSignatureAssignabilityInInheritance2.ts, 20, 64)) >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance2.ts, 21, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance2.ts, 0, 0)) >y : Symbol(y, Decl(callSignatureAssignabilityInInheritance2.ts, 21, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance2.ts, 2, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance2.ts, 2, 27)) a14: (x: { a: string; b: number }) => Object; @@ -134,7 +134,7 @@ interface A { // T >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance2.ts, 22, 10)) >a : Symbol(a, Decl(callSignatureAssignabilityInInheritance2.ts, 22, 14)) >b : Symbol(b, Decl(callSignatureAssignabilityInInheritance2.ts, 22, 25)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) a15: { >a15 : Symbol(a15, Decl(callSignatureAssignabilityInInheritance2.ts, 22, 49)) @@ -195,8 +195,8 @@ interface A { // T (a: Date): Date; >a : Symbol(a, Decl(callSignatureAssignabilityInInheritance2.ts, 42, 13)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) }): any[]; }; @@ -332,23 +332,23 @@ interface I extends A { a12: >(x: Array, y: T) => Array; // ok, less specific parameter type >a12 : Symbol(a12, Decl(callSignatureAssignabilityInInheritance2.ts, 60, 43)) >T : Symbol(T, Decl(callSignatureAssignabilityInInheritance2.ts, 61, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance2.ts, 0, 0)) >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance2.ts, 61, 33)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance2.ts, 0, 0)) >y : Symbol(y, Decl(callSignatureAssignabilityInInheritance2.ts, 61, 48)) >T : Symbol(T, Decl(callSignatureAssignabilityInInheritance2.ts, 61, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance2.ts, 2, 27)) a13: >(x: Array, y: T) => T; // ok, T = Array, satisfies constraint, contextual signature instantiation succeeds >a13 : Symbol(a13, Decl(callSignatureAssignabilityInInheritance2.ts, 61, 73)) >T : Symbol(T, Decl(callSignatureAssignabilityInInheritance2.ts, 62, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance2.ts, 2, 27)) >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance2.ts, 62, 36)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance2.ts, 0, 0)) >y : Symbol(y, Decl(callSignatureAssignabilityInInheritance2.ts, 62, 51)) >T : Symbol(T, Decl(callSignatureAssignabilityInInheritance2.ts, 62, 10)) diff --git a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.symbols b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.symbols index d5a68430887..89797dceb70 100644 --- a/tests/baselines/reference/callSignatureAssignabilityInInheritance5.symbols +++ b/tests/baselines/reference/callSignatureAssignabilityInInheritance5.symbols @@ -111,23 +111,23 @@ interface A { // T a12: (x: Array, y: Array) => Array; >a12 : Symbol(a12, Decl(callSignatureAssignabilityInInheritance5.ts, 20, 71)) >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance5.ts, 21, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance5.ts, 0, 0)) >y : Symbol(y, Decl(callSignatureAssignabilityInInheritance5.ts, 21, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(callSignatureAssignabilityInInheritance5.ts, 4, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance5.ts, 3, 27)) a13: (x: Array, y: Array) => Array; >a13 : Symbol(a13, Decl(callSignatureAssignabilityInInheritance5.ts, 21, 64)) >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance5.ts, 22, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance5.ts, 0, 0)) >y : Symbol(y, Decl(callSignatureAssignabilityInInheritance5.ts, 22, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance5.ts, 3, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance5.ts, 3, 27)) a14: (x: { a: string; b: number }) => Object; @@ -135,7 +135,7 @@ interface A { // T >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance5.ts, 23, 10)) >a : Symbol(a, Decl(callSignatureAssignabilityInInheritance5.ts, 23, 14)) >b : Symbol(b, Decl(callSignatureAssignabilityInInheritance5.ts, 23, 25)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface B extends A { @@ -280,23 +280,23 @@ interface I extends B { a12: >(x: Array, y: T) => Array; // ok, less specific parameter type >a12 : Symbol(a12, Decl(callSignatureAssignabilityInInheritance5.ts, 43, 43)) >T : Symbol(T, Decl(callSignatureAssignabilityInInheritance5.ts, 44, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance5.ts, 0, 0)) >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance5.ts, 44, 33)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance5.ts, 0, 0)) >y : Symbol(y, Decl(callSignatureAssignabilityInInheritance5.ts, 44, 48)) >T : Symbol(T, Decl(callSignatureAssignabilityInInheritance5.ts, 44, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance5.ts, 3, 27)) a13: >(x: Array, y: T) => T; // ok, T = Array, satisfies constraint, contextual signature instantiation succeeds >a13 : Symbol(a13, Decl(callSignatureAssignabilityInInheritance5.ts, 44, 73)) >T : Symbol(T, Decl(callSignatureAssignabilityInInheritance5.ts, 45, 10)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(callSignatureAssignabilityInInheritance5.ts, 3, 27)) >x : Symbol(x, Decl(callSignatureAssignabilityInInheritance5.ts, 45, 36)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(callSignatureAssignabilityInInheritance5.ts, 0, 0)) >y : Symbol(y, Decl(callSignatureAssignabilityInInheritance5.ts, 45, 51)) >T : Symbol(T, Decl(callSignatureAssignabilityInInheritance5.ts, 45, 10)) diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.symbols b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.symbols index f2b9de48425..414d9138f3c 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.symbols +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType.symbols @@ -54,7 +54,7 @@ var a: { (x, y): Object; >x : Symbol(x, Decl(callSignaturesThatDifferOnlyByReturnType.ts, 20, 5)) >y : Symbol(y, Decl(callSignaturesThatDifferOnlyByReturnType.ts, 20, 7)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) (x, y): any; // error >x : Symbol(x, Decl(callSignaturesThatDifferOnlyByReturnType.ts, 21, 5)) diff --git a/tests/baselines/reference/callWithSpread.symbols b/tests/baselines/reference/callWithSpread.symbols index c5ac7fe66b2..bc1dd7468c9 100644 --- a/tests/baselines/reference/callWithSpread.symbols +++ b/tests/baselines/reference/callWithSpread.symbols @@ -93,7 +93,7 @@ xa[1].foo(1, 2, ...a, "abc"); >a : Symbol(a, Decl(callWithSpread.ts, 7, 3)) (xa[1].foo)(...[1, 2, "abc"]); ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >xa[1].foo : Symbol(X.foo, Decl(callWithSpread.ts, 0, 13)) >xa : Symbol(xa, Decl(callWithSpread.ts, 10, 3)) >foo : Symbol(X.foo, Decl(callWithSpread.ts, 0, 13)) diff --git a/tests/baselines/reference/callWithSpreadES6.symbols b/tests/baselines/reference/callWithSpreadES6.symbols index d8604d8358a..26dd9b548d5 100644 --- a/tests/baselines/reference/callWithSpreadES6.symbols +++ b/tests/baselines/reference/callWithSpreadES6.symbols @@ -94,7 +94,7 @@ xa[1].foo(1, 2, ...a, "abc"); >a : Symbol(a, Decl(callWithSpreadES6.ts, 8, 3)) (xa[1].foo)(...[1, 2, "abc"]); ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(lib.d.ts, 4036, 1)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >xa[1].foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13)) >xa : Symbol(xa, Decl(callWithSpreadES6.ts, 11, 3)) >foo : Symbol(X.foo, Decl(callWithSpreadES6.ts, 1, 13)) diff --git a/tests/baselines/reference/callbacksDontShareTypes.symbols b/tests/baselines/reference/callbacksDontShareTypes.symbols index 80a5f234d38..1d7583cec2d 100644 --- a/tests/baselines/reference/callbacksDontShareTypes.symbols +++ b/tests/baselines/reference/callbacksDontShareTypes.symbols @@ -56,9 +56,9 @@ var c2: Collection; var rf1 = (x: number) => { return x.toFixed() }; >rf1 : Symbol(rf1, Decl(callbacksDontShareTypes.ts, 13, 3)) >x : Symbol(x, Decl(callbacksDontShareTypes.ts, 13, 11)) ->x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(callbacksDontShareTypes.ts, 13, 11)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) var r1a = _.map(c2, (x) => { return x.toFixed() }); >r1a : Symbol(r1a, Decl(callbacksDontShareTypes.ts, 14, 3)) @@ -67,9 +67,9 @@ var r1a = _.map(c2, (x) => { return x.toFixed() }); >map : Symbol(Combinators.map, Decl(callbacksDontShareTypes.ts, 5, 23), Decl(callbacksDontShareTypes.ts, 6, 63)) >c2 : Symbol(c2, Decl(callbacksDontShareTypes.ts, 11, 3)) >x : Symbol(x, Decl(callbacksDontShareTypes.ts, 14, 21)) ->x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(callbacksDontShareTypes.ts, 14, 21)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) var r1b = _.map(c2, rf1); // this line should not cause the following 2 to have errors >r1b : Symbol(r1b, Decl(callbacksDontShareTypes.ts, 15, 3)) @@ -86,9 +86,9 @@ var r5a = _.map(c2, (x) => { return x.toFixed() }); >map : Symbol(Combinators.map, Decl(callbacksDontShareTypes.ts, 5, 23), Decl(callbacksDontShareTypes.ts, 6, 63)) >c2 : Symbol(c2, Decl(callbacksDontShareTypes.ts, 11, 3)) >x : Symbol(x, Decl(callbacksDontShareTypes.ts, 16, 37)) ->x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(callbacksDontShareTypes.ts, 16, 37)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) var r5b = _.map(c2, rf1); >r5b : Symbol(r5b, Decl(callbacksDontShareTypes.ts, 17, 3)) diff --git a/tests/baselines/reference/castNewObjectBug.symbols b/tests/baselines/reference/castNewObjectBug.symbols index 3db7f7e065a..f9423710f4f 100644 --- a/tests/baselines/reference/castNewObjectBug.symbols +++ b/tests/baselines/reference/castNewObjectBug.symbols @@ -5,5 +5,5 @@ interface Foo { } var xx = new Object(); >xx : Symbol(xx, Decl(castNewObjectBug.ts, 1, 3)) >Foo : Symbol(Foo, Decl(castNewObjectBug.ts, 0, 0)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/chainedAssignment2.symbols b/tests/baselines/reference/chainedAssignment2.symbols index 84eb8428a64..3335c3cbb43 100644 --- a/tests/baselines/reference/chainedAssignment2.symbols +++ b/tests/baselines/reference/chainedAssignment2.symbols @@ -10,11 +10,11 @@ var c: boolean; var d: Date; >d : Symbol(d, Decl(chainedAssignment2.ts, 3, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var e: RegExp; >e : Symbol(e, Decl(chainedAssignment2.ts, 4, 3)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) a = b = c = d = e = null; >a : Symbol(a, Decl(chainedAssignment2.ts, 0, 3)) diff --git a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.symbols b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.symbols index 5eb563d3ef6..8232c44a620 100644 --- a/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.symbols +++ b/tests/baselines/reference/chainedSpecializationToObjectTypeLiteral.symbols @@ -51,9 +51,9 @@ var s2 = s.groupBy(s => s.length); >s : Symbol(s, Decl(chainedSpecializationToObjectTypeLiteral.ts, 7, 3)) >groupBy : Symbol(Sequence.groupBy, Decl(chainedSpecializationToObjectTypeLiteral.ts, 3, 57)) >s : Symbol(s, Decl(chainedSpecializationToObjectTypeLiteral.ts, 8, 19)) ->s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(chainedSpecializationToObjectTypeLiteral.ts, 8, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) var s3 = s2.each(x => { x.key /* Type is K, should be number */ }); >s3 : Symbol(s3, Decl(chainedSpecializationToObjectTypeLiteral.ts, 9, 3)) diff --git a/tests/baselines/reference/checkForObjectTooStrict.symbols b/tests/baselines/reference/checkForObjectTooStrict.symbols index 48e04392c3b..e47aa47c9d1 100644 --- a/tests/baselines/reference/checkForObjectTooStrict.symbols +++ b/tests/baselines/reference/checkForObjectTooStrict.symbols @@ -29,12 +29,12 @@ class Bar extends Foo.Object { // should work class Baz extends Object { >Baz : Symbol(Baz, Decl(checkForObjectTooStrict.ts, 18, 1)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) constructor () { // ERROR, as expected super(); ->super : Symbol(ObjectConstructor, Decl(lib.d.ts, 124, 1)) +>super : Symbol(ObjectConstructor, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/classAppearsToHaveMembersOfObject.symbols b/tests/baselines/reference/classAppearsToHaveMembersOfObject.symbols index c035b17bcc6..28c31e639a7 100644 --- a/tests/baselines/reference/classAppearsToHaveMembersOfObject.symbols +++ b/tests/baselines/reference/classAppearsToHaveMembersOfObject.symbols @@ -9,19 +9,19 @@ var c: C; var r = c.toString(); >r : Symbol(r, Decl(classAppearsToHaveMembersOfObject.ts, 3, 3)) ->c.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>c.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >c : Symbol(c, Decl(classAppearsToHaveMembersOfObject.ts, 2, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var r2 = c.hasOwnProperty(''); >r2 : Symbol(r2, Decl(classAppearsToHaveMembersOfObject.ts, 4, 3)) ->c.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>c.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) >c : Symbol(c, Decl(classAppearsToHaveMembersOfObject.ts, 2, 3)) ->hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) var o: Object = c; >o : Symbol(o, Decl(classAppearsToHaveMembersOfObject.ts, 5, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >c : Symbol(c, Decl(classAppearsToHaveMembersOfObject.ts, 2, 3)) var o2: {} = c; diff --git a/tests/baselines/reference/classExtendingBuiltinType.symbols b/tests/baselines/reference/classExtendingBuiltinType.symbols index 08e85be570e..78f2195c8db 100644 --- a/tests/baselines/reference/classExtendingBuiltinType.symbols +++ b/tests/baselines/reference/classExtendingBuiltinType.symbols @@ -1,41 +1,41 @@ === tests/cases/conformance/classes/classDeclarations/classExtendingBuiltinType.ts === class C1 extends Object { } >C1 : Symbol(C1, Decl(classExtendingBuiltinType.ts, 0, 0)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class C2 extends Function { } >C2 : Symbol(C2, Decl(classExtendingBuiltinType.ts, 0, 27)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class C3 extends String { } >C3 : Symbol(C3, Decl(classExtendingBuiltinType.ts, 1, 29)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class C4 extends Boolean { } >C4 : Symbol(C4, Decl(classExtendingBuiltinType.ts, 2, 27)) ->Boolean : Symbol(Boolean, Decl(lib.d.ts, 443, 38), Decl(lib.d.ts, 456, 11)) +>Boolean : Symbol(Boolean, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class C5 extends Number { } >C5 : Symbol(C5, Decl(classExtendingBuiltinType.ts, 3, 28)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class C6 extends Date { } >C6 : Symbol(C6, Decl(classExtendingBuiltinType.ts, 4, 27)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class C7 extends RegExp { } >C7 : Symbol(C7, Decl(classExtendingBuiltinType.ts, 5, 25)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class C8 extends Error { } >C8 : Symbol(C8, Decl(classExtendingBuiltinType.ts, 6, 27)) ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class C9 extends Array { } >C9 : Symbol(C9, Decl(classExtendingBuiltinType.ts, 7, 26)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class C10 extends Array { } >C10 : Symbol(C10, Decl(classExtendingBuiltinType.ts, 8, 26)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.symbols b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.symbols index 7239eac77e6..e30810f5cf9 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.symbols +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface.symbols @@ -20,11 +20,11 @@ class C { [x: string]: Object; >x : Symbol(x, Decl(classWithOnlyPublicMembersEquivalentToInterface.ts, 7, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) [x: number]: Object; >x : Symbol(x, Decl(classWithOnlyPublicMembersEquivalentToInterface.ts, 8, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: number; } @@ -44,11 +44,11 @@ interface I { [x: string]: Object; >x : Symbol(x, Decl(classWithOnlyPublicMembersEquivalentToInterface.ts, 16, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) [x: number]: Object; >x : Symbol(x, Decl(classWithOnlyPublicMembersEquivalentToInterface.ts, 17, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: number; } diff --git a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.symbols b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.symbols index 48bcbfa5149..13a716f9e8c 100644 --- a/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.symbols +++ b/tests/baselines/reference/classWithOnlyPublicMembersEquivalentToInterface2.symbols @@ -20,11 +20,11 @@ class C { [x: string]: Object; >x : Symbol(x, Decl(classWithOnlyPublicMembersEquivalentToInterface2.ts, 7, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) [x: number]: Object; >x : Symbol(x, Decl(classWithOnlyPublicMembersEquivalentToInterface2.ts, 8, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: number; @@ -47,11 +47,11 @@ interface I { [x: string]: Object; >x : Symbol(x, Decl(classWithOnlyPublicMembersEquivalentToInterface2.ts, 18, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) [x: number]: Object; >x : Symbol(x, Decl(classWithOnlyPublicMembersEquivalentToInterface2.ts, 19, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: number; } diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.symbols b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.symbols index 4b7f24a9048..ba9618a5ecf 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.symbols +++ b/tests/baselines/reference/commaOperatorWithSecondOperandAnyType.symbols @@ -13,7 +13,7 @@ var STRING: string; var OBJECT: Object; >OBJECT : Symbol(OBJECT, Decl(commaOperatorWithSecondOperandAnyType.ts, 4, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) //The second operand type is any ANY, ANY; @@ -75,8 +75,8 @@ var x: any; "string", [null, 1]; "string".charAt(0), [null, 1]; ->"string".charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>"string".charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) true, x("any"); >x : Symbol(x, Decl(commaOperatorWithSecondOperandAnyType.ts, 21, 3)) @@ -99,8 +99,8 @@ var resultIsAny8 = ("string", null); var resultIsAny9 = ("string".charAt(0), undefined); >resultIsAny9 : Symbol(resultIsAny9, Decl(commaOperatorWithSecondOperandAnyType.ts, 33, 3)) ->"string".charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>"string".charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >undefined : Symbol(undefined) var resultIsAny10 = (true, x("any")); diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.symbols b/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.symbols index bd520c1876d..9be885bf41c 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.symbols +++ b/tests/baselines/reference/commaOperatorWithSecondOperandBooleanType.symbols @@ -13,7 +13,7 @@ var STRING: string; var OBJECT: Object; >OBJECT : Symbol(OBJECT, Decl(commaOperatorWithSecondOperandBooleanType.ts, 4, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) //The second operand type is boolean ANY, BOOLEAN; diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandNumberType.symbols b/tests/baselines/reference/commaOperatorWithSecondOperandNumberType.symbols index 3da456eaa5f..bf5ff9437a3 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandNumberType.symbols +++ b/tests/baselines/reference/commaOperatorWithSecondOperandNumberType.symbols @@ -13,7 +13,7 @@ var STRING: string; var OBJECT: Object; >OBJECT : Symbol(OBJECT, Decl(commaOperatorWithSecondOperandNumberType.ts, 4, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) //The second operand type is number ANY, NUMBER; @@ -79,9 +79,9 @@ BOOLEAN = false, 1; >NUMBER : Symbol(NUMBER, Decl(commaOperatorWithSecondOperandNumberType.ts, 2, 3)) STRING.trim(), NUMBER = 1; ->STRING.trim : Symbol(String.trim, Decl(lib.d.ts, 411, 32)) +>STRING.trim : Symbol(String.trim, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorWithSecondOperandNumberType.ts, 3, 3)) ->trim : Symbol(String.trim, Decl(lib.d.ts, 411, 32)) +>trim : Symbol(String.trim, Decl(lib.d.ts, --, --)) >NUMBER : Symbol(NUMBER, Decl(commaOperatorWithSecondOperandNumberType.ts, 2, 3)) var resultIsNumber6 = (null, NUMBER); @@ -107,8 +107,8 @@ var resultIsNumber10 = ("", NUMBER = 1); var resultIsNumber11 = (STRING.trim(), NUMBER = 1); >resultIsNumber11 : Symbol(resultIsNumber11, Decl(commaOperatorWithSecondOperandNumberType.ts, 33, 3)) ->STRING.trim : Symbol(String.trim, Decl(lib.d.ts, 411, 32)) +>STRING.trim : Symbol(String.trim, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorWithSecondOperandNumberType.ts, 3, 3)) ->trim : Symbol(String.trim, Decl(lib.d.ts, 411, 32)) +>trim : Symbol(String.trim, Decl(lib.d.ts, --, --)) >NUMBER : Symbol(NUMBER, Decl(commaOperatorWithSecondOperandNumberType.ts, 2, 3)) diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.symbols b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.symbols index 42f24f77d50..3b8473318c0 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.symbols +++ b/tests/baselines/reference/commaOperatorWithSecondOperandObjectType.symbols @@ -13,7 +13,7 @@ var STRING: string; var OBJECT: Object; >OBJECT : Symbol(OBJECT, Decl(commaOperatorWithSecondOperandObjectType.ts, 4, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) class CLASS { >CLASS : Symbol(CLASS, Decl(commaOperatorWithSecondOperandObjectType.ts, 4, 19)) @@ -82,12 +82,12 @@ true, {} >BOOLEAN : Symbol(BOOLEAN, Decl(commaOperatorWithSecondOperandObjectType.ts, 1, 3)) "string", new Date() ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) STRING.toLowerCase(), new CLASS() ->STRING.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>STRING.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorWithSecondOperandObjectType.ts, 3, 3)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >CLASS : Symbol(CLASS, Decl(commaOperatorWithSecondOperandObjectType.ts, 4, 19)) var resultIsObject6 = (null, OBJECT); @@ -110,12 +110,12 @@ var resultIsObject9 = (!BOOLEAN, { a: 1, b: "s" }); var resultIsObject10 = ("string", new Date()); >resultIsObject10 : Symbol(resultIsObject10, Decl(commaOperatorWithSecondOperandObjectType.ts, 36, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var resultIsObject11 = (STRING.toLowerCase(), new CLASS()); >resultIsObject11 : Symbol(resultIsObject11, Decl(commaOperatorWithSecondOperandObjectType.ts, 37, 3)) ->STRING.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>STRING.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorWithSecondOperandObjectType.ts, 3, 3)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >CLASS : Symbol(CLASS, Decl(commaOperatorWithSecondOperandObjectType.ts, 4, 19)) diff --git a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.symbols b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.symbols index d0c800858f7..3c674237a21 100644 --- a/tests/baselines/reference/commaOperatorWithSecondOperandStringType.symbols +++ b/tests/baselines/reference/commaOperatorWithSecondOperandStringType.symbols @@ -13,7 +13,7 @@ var STRING: string; var OBJECT: Object; >OBJECT : Symbol(OBJECT, Decl(commaOperatorWithSecondOperandStringType.ts, 4, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var resultIsString: string; >resultIsString : Symbol(resultIsString, Decl(commaOperatorWithSecondOperandStringType.ts, 6, 3)) @@ -71,7 +71,7 @@ null, STRING; ANY = new Date(), STRING; >ANY : Symbol(ANY, Decl(commaOperatorWithSecondOperandStringType.ts, 0, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorWithSecondOperandStringType.ts, 3, 3)) true, ""; @@ -80,13 +80,13 @@ BOOLEAN == undefined, ""; >undefined : Symbol(undefined) ["a", "b"], NUMBER.toString(); ->NUMBER.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>NUMBER.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >NUMBER : Symbol(NUMBER, Decl(commaOperatorWithSecondOperandStringType.ts, 2, 3)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) OBJECT = new Object, STRING + "string"; >OBJECT : Symbol(OBJECT, Decl(commaOperatorWithSecondOperandStringType.ts, 4, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorWithSecondOperandStringType.ts, 3, 3)) var resultIsString6 = (null, STRING); @@ -96,7 +96,7 @@ var resultIsString6 = (null, STRING); var resultIsString7 = (ANY = new Date(), STRING); >resultIsString7 : Symbol(resultIsString7, Decl(commaOperatorWithSecondOperandStringType.ts, 31, 3)) >ANY : Symbol(ANY, Decl(commaOperatorWithSecondOperandStringType.ts, 0, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorWithSecondOperandStringType.ts, 3, 3)) var resultIsString8 = (true, ""); @@ -109,12 +109,12 @@ var resultIsString9 = (BOOLEAN == undefined, ""); var resultIsString10 = (["a", "b"], NUMBER.toString()); >resultIsString10 : Symbol(resultIsString10, Decl(commaOperatorWithSecondOperandStringType.ts, 34, 3)) ->NUMBER.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>NUMBER.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >NUMBER : Symbol(NUMBER, Decl(commaOperatorWithSecondOperandStringType.ts, 2, 3)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) var resultIsString11 = (new Object, STRING + "string"); >resultIsString11 : Symbol(resultIsString11, Decl(commaOperatorWithSecondOperandStringType.ts, 35, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorWithSecondOperandStringType.ts, 3, 3)) diff --git a/tests/baselines/reference/commaOperatorsMultipleOperators.symbols b/tests/baselines/reference/commaOperatorsMultipleOperators.symbols index bd39a21519f..3a580bc49e9 100644 --- a/tests/baselines/reference/commaOperatorsMultipleOperators.symbols +++ b/tests/baselines/reference/commaOperatorsMultipleOperators.symbols @@ -13,7 +13,7 @@ var STRING: string; var OBJECT: Object; >OBJECT : Symbol(OBJECT, Decl(commaOperatorsMultipleOperators.ts, 4, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) //Expected: work well ANY, BOOLEAN, NUMBER; @@ -76,10 +76,10 @@ var resultIsObject1 = (NUMBER, STRING, OBJECT); null, true, 1; ++NUMBER, STRING.charAt(0), new Object(); >NUMBER : Symbol(NUMBER, Decl(commaOperatorsMultipleOperators.ts, 2, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorsMultipleOperators.ts, 3, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var resultIsNumber2 = (null, true, 1); >resultIsNumber2 : Symbol(resultIsNumber2, Decl(commaOperatorsMultipleOperators.ts, 24, 3)) @@ -87,8 +87,8 @@ var resultIsNumber2 = (null, true, 1); var resultIsObject2 = (++NUMBER, STRING.charAt(0), new Object()); >resultIsObject2 : Symbol(resultIsObject2, Decl(commaOperatorsMultipleOperators.ts, 25, 3)) >NUMBER : Symbol(NUMBER, Decl(commaOperatorsMultipleOperators.ts, 2, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(commaOperatorsMultipleOperators.ts, 3, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/commentInMethodCall.symbols b/tests/baselines/reference/commentInMethodCall.symbols index ff286983e23..9db0719cf89 100644 --- a/tests/baselines/reference/commentInMethodCall.symbols +++ b/tests/baselines/reference/commentInMethodCall.symbols @@ -4,9 +4,9 @@ var s: string[]; >s : Symbol(s, Decl(commentInMethodCall.ts, 1, 3)) s.map(// do something ->s.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>s.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(commentInMethodCall.ts, 1, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) function () { }); diff --git a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.symbols b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.symbols index c6586cc3068..a5acf69be2f 100644 --- a/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.symbols +++ b/tests/baselines/reference/comparisonOperatorWithIdenticalObjects.symbols @@ -16,7 +16,7 @@ class A1 { public e: Object; >e : Symbol(e, Decl(comparisonOperatorWithIdenticalObjects.ts, 4, 18)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) public fn(a: string): string { >fn : Symbol(fn, Decl(comparisonOperatorWithIdenticalObjects.ts, 5, 21)) @@ -42,7 +42,7 @@ class B1 { public e: Object; >e : Symbol(e, Decl(comparisonOperatorWithIdenticalObjects.ts, 14, 18)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) public fn(b: string): string { >fn : Symbol(fn, Decl(comparisonOperatorWithIdenticalObjects.ts, 15, 21)) diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.symbols b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.symbols index a99a3899725..3fd0843a727 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES5.symbols @@ -17,13 +17,13 @@ var o: I = { ["" + 0](y) { return y.length; }, >y : Symbol(y, Decl(computedPropertyNamesContextualType1_ES5.ts, 6, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType1_ES5.ts, 6, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) ["" + 1]: y => y.length >y : Symbol(y, Decl(computedPropertyNamesContextualType1_ES5.ts, 7, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType1_ES5.ts, 7, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.symbols b/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.symbols index e386b8e9efa..56da1f91a5e 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType1_ES6.symbols @@ -17,13 +17,13 @@ var o: I = { ["" + 0](y) { return y.length; }, >y : Symbol(y, Decl(computedPropertyNamesContextualType1_ES6.ts, 6, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType1_ES6.ts, 6, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) ["" + 1]: y => y.length >y : Symbol(y, Decl(computedPropertyNamesContextualType1_ES6.ts, 7, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType1_ES6.ts, 7, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.symbols b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.symbols index fcd89e032e6..20b344adfd6 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES5.symbols @@ -17,13 +17,13 @@ var o: I = { [+"foo"](y) { return y.length; }, >y : Symbol(y, Decl(computedPropertyNamesContextualType2_ES5.ts, 6, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType2_ES5.ts, 6, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) [+"bar"]: y => y.length >y : Symbol(y, Decl(computedPropertyNamesContextualType2_ES5.ts, 7, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType2_ES5.ts, 7, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.symbols b/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.symbols index ce6be5194c0..9412a9c8c34 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType2_ES6.symbols @@ -17,13 +17,13 @@ var o: I = { [+"foo"](y) { return y.length; }, >y : Symbol(y, Decl(computedPropertyNamesContextualType2_ES6.ts, 6, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType2_ES6.ts, 6, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) [+"bar"]: y => y.length >y : Symbol(y, Decl(computedPropertyNamesContextualType2_ES6.ts, 7, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType2_ES6.ts, 7, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.symbols b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.symbols index d73c9c186d4..acc3b848ce4 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES5.symbols @@ -13,13 +13,13 @@ var o: I = { [+"foo"](y) { return y.length; }, >y : Symbol(y, Decl(computedPropertyNamesContextualType3_ES5.ts, 5, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType3_ES5.ts, 5, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) [+"bar"]: y => y.length >y : Symbol(y, Decl(computedPropertyNamesContextualType3_ES5.ts, 6, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType3_ES5.ts, 6, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.symbols b/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.symbols index 48e93ee62f9..0b53cf3bfe4 100644 --- a/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.symbols +++ b/tests/baselines/reference/computedPropertyNamesContextualType3_ES6.symbols @@ -13,13 +13,13 @@ var o: I = { [+"foo"](y) { return y.length; }, >y : Symbol(y, Decl(computedPropertyNamesContextualType3_ES6.ts, 5, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType3_ES6.ts, 5, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) [+"bar"]: y => y.length >y : Symbol(y, Decl(computedPropertyNamesContextualType3_ES6.ts, 6, 13)) ->y.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>y.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(computedPropertyNamesContextualType3_ES6.ts, 6, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/concatError.symbols b/tests/baselines/reference/concatError.symbols index 6ed5ffd468f..d4f04531fc7 100644 --- a/tests/baselines/reference/concatError.symbols +++ b/tests/baselines/reference/concatError.symbols @@ -14,15 +14,15 @@ var fa: number[]; fa = fa.concat([0]); >fa : Symbol(fa, Decl(concatError.ts, 8, 3)) ->fa.concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>fa.concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fa : Symbol(fa, Decl(concatError.ts, 8, 3)) ->concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) fa = fa.concat(0); >fa : Symbol(fa, Decl(concatError.ts, 8, 3)) ->fa.concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>fa.concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >fa : Symbol(fa, Decl(concatError.ts, 8, 3)) ->concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.symbols b/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.symbols index eade67512ad..a7124d58305 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.symbols +++ b/tests/baselines/reference/conditionalOperatorConditionIsBooleanType.symbols @@ -17,7 +17,7 @@ var exprString1: string; var exprIsObject1: Object; >exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditionIsBooleanType.ts, 7, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var exprAny2: any; >exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditionIsBooleanType.ts, 9, 3)) @@ -33,7 +33,7 @@ var exprString2: string; var exprIsObject2: Object; >exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditionIsBooleanType.ts, 13, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) //Cond is a boolean type variable condBoolean ? exprAny1 : exprAny2; diff --git a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.symbols b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.symbols index 8ece5961636..f3816b6238e 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsNumberType.symbols +++ b/tests/baselines/reference/conditionalOperatorConditionIsNumberType.symbols @@ -17,7 +17,7 @@ var exprString1: string; var exprIsObject1: Object; >exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditionIsNumberType.ts, 7, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var exprAny2: any; >exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditionIsNumberType.ts, 9, 3)) @@ -33,7 +33,7 @@ var exprString2: string; var exprIsObject2: Object; >exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditionIsNumberType.ts, 13, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) //Cond is a number type variable condNumber ? exprAny1 : exprAny2; @@ -107,8 +107,8 @@ var array = [1, 2, 3]; >exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditionIsNumberType.ts, 10, 3)) "string".length ? exprNumber1 : exprNumber2; ->"string".length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>"string".length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >exprNumber1 : Symbol(exprNumber1, Decl(conditionalOperatorConditionIsNumberType.ts, 5, 3)) >exprNumber2 : Symbol(exprNumber2, Decl(conditionalOperatorConditionIsNumberType.ts, 11, 3)) @@ -207,8 +207,8 @@ var resultIsBoolean3 = 1 + 1 ? exprBoolean1 : exprBoolean2; var resultIsNumber3 = "string".length ? exprNumber1 : exprNumber2; >resultIsNumber3 : Symbol(resultIsNumber3, Decl(conditionalOperatorConditionIsNumberType.ts, 59, 3)) ->"string".length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>"string".length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >exprNumber1 : Symbol(exprNumber1, Decl(conditionalOperatorConditionIsNumberType.ts, 5, 3)) >exprNumber2 : Symbol(exprNumber2, Decl(conditionalOperatorConditionIsNumberType.ts, 11, 3)) diff --git a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.symbols b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.symbols index 41f00e53b26..0867a708770 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.symbols +++ b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.symbols @@ -2,7 +2,7 @@ //Cond ? Expr1 : Expr2, Cond is of object type, Expr1 and Expr2 have the same type var condObject: Object; >condObject : Symbol(condObject, Decl(conditionalOperatorConditionIsObjectType.ts, 1, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var exprAny1: any; >exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditionIsObjectType.ts, 3, 3)) @@ -18,7 +18,7 @@ var exprString1: string; var exprIsObject1: Object; >exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditionIsObjectType.ts, 7, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var exprAny2: any; >exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditionIsObjectType.ts, 9, 3)) @@ -34,7 +34,7 @@ var exprString2: string; var exprIsObject2: Object; >exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditionIsObjectType.ts, 13, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo() { }; >foo : Symbol(foo, Decl(conditionalOperatorConditionIsObjectType.ts, 13, 26)) @@ -77,17 +77,17 @@ condObject ? exprString1 : exprBoolean1; // union //Cond is an object type literal ((a: string) => a.length) ? exprAny1 : exprAny2; >a : Symbol(a, Decl(conditionalOperatorConditionIsObjectType.ts, 27, 2)) ->a.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>a.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(conditionalOperatorConditionIsObjectType.ts, 27, 2)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditionIsObjectType.ts, 3, 3)) >exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditionIsObjectType.ts, 9, 3)) ((a: string) => a.length) ? exprBoolean1 : exprBoolean2; >a : Symbol(a, Decl(conditionalOperatorConditionIsObjectType.ts, 28, 2)) ->a.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>a.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(conditionalOperatorConditionIsObjectType.ts, 28, 2)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditionIsObjectType.ts, 4, 3)) >exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditionIsObjectType.ts, 10, 3)) @@ -120,7 +120,7 @@ foo() ? exprAny1 : exprAny2; >exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditionIsObjectType.ts, 9, 3)) new Date() ? exprBoolean1 : exprBoolean2; ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditionIsObjectType.ts, 4, 3)) >exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditionIsObjectType.ts, 10, 3)) @@ -137,14 +137,14 @@ C.doIt() ? exprString1 : exprString2; >exprString2 : Symbol(exprString2, Decl(conditionalOperatorConditionIsObjectType.ts, 12, 3)) condObject.valueOf() ? exprIsObject1 : exprIsObject2; ->condObject.valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, 102, 29)) +>condObject.valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, --, --)) >condObject : Symbol(condObject, Decl(conditionalOperatorConditionIsObjectType.ts, 1, 3)) ->valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, 102, 29)) +>valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, --, --)) >exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditionIsObjectType.ts, 7, 3)) >exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditionIsObjectType.ts, 13, 3)) new Date() ? exprString1 : exprBoolean1; // union ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditionIsObjectType.ts, 6, 3)) >exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditionIsObjectType.ts, 4, 3)) @@ -188,18 +188,18 @@ var resultIsStringOrBoolean1 = condObject ? exprString1 : exprBoolean1; // union var resultIsAny2 = ((a: string) => a.length) ? exprAny1 : exprAny2; >resultIsAny2 : Symbol(resultIsAny2, Decl(conditionalOperatorConditionIsObjectType.ts, 50, 3)) >a : Symbol(a, Decl(conditionalOperatorConditionIsObjectType.ts, 50, 21)) ->a.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>a.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(conditionalOperatorConditionIsObjectType.ts, 50, 21)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >exprAny1 : Symbol(exprAny1, Decl(conditionalOperatorConditionIsObjectType.ts, 3, 3)) >exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditionIsObjectType.ts, 9, 3)) var resultIsBoolean2 = ((a: string) => a.length) ? exprBoolean1 : exprBoolean2; >resultIsBoolean2 : Symbol(resultIsBoolean2, Decl(conditionalOperatorConditionIsObjectType.ts, 51, 3)) >a : Symbol(a, Decl(conditionalOperatorConditionIsObjectType.ts, 51, 25)) ->a.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>a.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(conditionalOperatorConditionIsObjectType.ts, 51, 25)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditionIsObjectType.ts, 4, 3)) >exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditionIsObjectType.ts, 10, 3)) @@ -237,7 +237,7 @@ var resultIsAny3 = foo() ? exprAny1 : exprAny2; var resultIsBoolean3 = new Date() ? exprBoolean1 : exprBoolean2; >resultIsBoolean3 : Symbol(resultIsBoolean3, Decl(conditionalOperatorConditionIsObjectType.ts, 58, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditionIsObjectType.ts, 4, 3)) >exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditionIsObjectType.ts, 10, 3)) @@ -257,9 +257,9 @@ var resultIsString3 = C.doIt() ? exprString1 : exprString2; var resultIsObject3 = condObject.valueOf() ? exprIsObject1 : exprIsObject2; >resultIsObject3 : Symbol(resultIsObject3, Decl(conditionalOperatorConditionIsObjectType.ts, 61, 3)) ->condObject.valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, 102, 29)) +>condObject.valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, --, --)) >condObject : Symbol(condObject, Decl(conditionalOperatorConditionIsObjectType.ts, 1, 3)) ->valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, 102, 29)) +>valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, --, --)) >exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditionIsObjectType.ts, 7, 3)) >exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditionIsObjectType.ts, 13, 3)) diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.symbols b/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.symbols index aaaf4124eb6..c31f367b7d4 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.symbols +++ b/tests/baselines/reference/conditionalOperatorConditoinIsAnyType.symbols @@ -20,7 +20,7 @@ var exprString1: string; var exprIsObject1: Object; >exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditoinIsAnyType.ts, 8, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var exprAny2: any; >exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsAnyType.ts, 10, 3)) @@ -36,7 +36,7 @@ var exprString2: string; var exprIsObject2: Object; >exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditoinIsAnyType.ts, 14, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) //Cond is an any type variable condAny ? exprAny1 : exprAny2; diff --git a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.symbols b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.symbols index 76845a80ce6..9de27f5a96b 100644 --- a/tests/baselines/reference/conditionalOperatorConditoinIsStringType.symbols +++ b/tests/baselines/reference/conditionalOperatorConditoinIsStringType.symbols @@ -17,7 +17,7 @@ var exprString1: string; var exprIsObject1: Object; >exprIsObject1 : Symbol(exprIsObject1, Decl(conditionalOperatorConditoinIsStringType.ts, 7, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var exprAny2: any; >exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 9, 3)) @@ -33,7 +33,7 @@ var exprString2: string; var exprIsObject2: Object; >exprIsObject2 : Symbol(exprIsObject2, Decl(conditionalOperatorConditoinIsStringType.ts, 13, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) //Cond is a string type variable condString ? exprAny1 : exprAny2; @@ -104,9 +104,9 @@ typeof condString ? exprAny1 : exprAny2; >exprAny2 : Symbol(exprAny2, Decl(conditionalOperatorConditoinIsStringType.ts, 9, 3)) condString.toUpperCase ? exprBoolean1 : exprBoolean2; ->condString.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>condString.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) >condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 3)) ->toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) >exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 3)) >exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 10, 3)) @@ -205,9 +205,9 @@ var resultIsAny3 = typeof condString ? exprAny1 : exprAny2; var resultIsBoolean3 = condString.toUpperCase ? exprBoolean1 : exprBoolean2; >resultIsBoolean3 : Symbol(resultIsBoolean3, Decl(conditionalOperatorConditoinIsStringType.ts, 58, 3)) ->condString.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>condString.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) >condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 3)) ->toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) >exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 3)) >exprBoolean2 : Symbol(exprBoolean2, Decl(conditionalOperatorConditoinIsStringType.ts, 10, 3)) @@ -237,9 +237,9 @@ var resultIsStringOrBoolean3 = typeof condString ? exprString1 : exprBoolean1; / var resultIsStringOrBoolean4 = condString.toUpperCase ? exprString1 : exprBoolean1; // union >resultIsStringOrBoolean4 : Symbol(resultIsStringOrBoolean4, Decl(conditionalOperatorConditoinIsStringType.ts, 63, 3)) ->condString.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>condString.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) >condString : Symbol(condString, Decl(conditionalOperatorConditoinIsStringType.ts, 1, 3)) ->toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) >exprString1 : Symbol(exprString1, Decl(conditionalOperatorConditoinIsStringType.ts, 6, 3)) >exprBoolean1 : Symbol(exprBoolean1, Decl(conditionalOperatorConditoinIsStringType.ts, 4, 3)) diff --git a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.symbols b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.symbols index 99e11e12967..cca4cb6e12c 100644 --- a/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.symbols +++ b/tests/baselines/reference/constDeclarationShadowedByVarDeclaration3.symbols @@ -5,8 +5,8 @@ class Rule { public regex: RegExp = new RegExp(''); >regex : Symbol(regex, Decl(constDeclarationShadowedByVarDeclaration3.ts, 1, 12)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) public name: string = ''; >name : Symbol(name, Decl(constDeclarationShadowedByVarDeclaration3.ts, 2, 42)) diff --git a/tests/baselines/reference/constEnumToStringNoComments.symbols b/tests/baselines/reference/constEnumToStringNoComments.symbols index 0206e6a5d90..3f48b060f35 100644 --- a/tests/baselines/reference/constEnumToStringNoComments.symbols +++ b/tests/baselines/reference/constEnumToStringNoComments.symbols @@ -23,91 +23,91 @@ const enum Foo { let x0 = Foo.X.toString(); >x0 : Symbol(x0, Decl(constEnumToStringNoComments.ts, 9, 3)) ->Foo.X.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.X.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.X : Symbol(Foo.X, Decl(constEnumToStringNoComments.ts, 0, 16)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >X : Symbol(Foo.X, Decl(constEnumToStringNoComments.ts, 0, 16)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let x1 = Foo["X"].toString(); >x1 : Symbol(x1, Decl(constEnumToStringNoComments.ts, 10, 3)) ->Foo["X"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["X"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >"X" : Symbol(Foo.X, Decl(constEnumToStringNoComments.ts, 0, 16)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let y0 = Foo.Y.toString(); >y0 : Symbol(y0, Decl(constEnumToStringNoComments.ts, 11, 3)) ->Foo.Y.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.Y.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.Y : Symbol(Foo.Y, Decl(constEnumToStringNoComments.ts, 1, 12)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >Y : Symbol(Foo.Y, Decl(constEnumToStringNoComments.ts, 1, 12)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let y1 = Foo["Y"].toString(); >y1 : Symbol(y1, Decl(constEnumToStringNoComments.ts, 12, 3)) ->Foo["Y"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["Y"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >"Y" : Symbol(Foo.Y, Decl(constEnumToStringNoComments.ts, 1, 12)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let z0 = Foo.Z.toString(); >z0 : Symbol(z0, Decl(constEnumToStringNoComments.ts, 13, 3)) ->Foo.Z.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.Z.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.Z : Symbol(Foo.Z, Decl(constEnumToStringNoComments.ts, 2, 12)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >Z : Symbol(Foo.Z, Decl(constEnumToStringNoComments.ts, 2, 12)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let z1 = Foo["Z"].toString(); >z1 : Symbol(z1, Decl(constEnumToStringNoComments.ts, 14, 3)) ->Foo["Z"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["Z"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >"Z" : Symbol(Foo.Z, Decl(constEnumToStringNoComments.ts, 2, 12)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let a0 = Foo.A.toString(); >a0 : Symbol(a0, Decl(constEnumToStringNoComments.ts, 15, 3)) ->Foo.A.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.A.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.A : Symbol(Foo.A, Decl(constEnumToStringNoComments.ts, 3, 11)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >A : Symbol(Foo.A, Decl(constEnumToStringNoComments.ts, 3, 11)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let a1 = Foo["A"].toString(); >a1 : Symbol(a1, Decl(constEnumToStringNoComments.ts, 16, 3)) ->Foo["A"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["A"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >"A" : Symbol(Foo.A, Decl(constEnumToStringNoComments.ts, 3, 11)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let b0 = Foo.B.toString(); >b0 : Symbol(b0, Decl(constEnumToStringNoComments.ts, 17, 3)) ->Foo.B.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.B.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.B : Symbol(Foo.B, Decl(constEnumToStringNoComments.ts, 4, 11)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >B : Symbol(Foo.B, Decl(constEnumToStringNoComments.ts, 4, 11)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let b1 = Foo["B"].toString(); >b1 : Symbol(b1, Decl(constEnumToStringNoComments.ts, 18, 3)) ->Foo["B"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["B"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >"B" : Symbol(Foo.B, Decl(constEnumToStringNoComments.ts, 4, 11)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let c0 = Foo.C.toString(); >c0 : Symbol(c0, Decl(constEnumToStringNoComments.ts, 19, 3)) ->Foo.C.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.C.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.C : Symbol(Foo.C, Decl(constEnumToStringNoComments.ts, 5, 13)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >C : Symbol(Foo.C, Decl(constEnumToStringNoComments.ts, 5, 13)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let c1 = Foo["C"].toString(); >c1 : Symbol(c1, Decl(constEnumToStringNoComments.ts, 20, 3)) ->Foo["C"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["C"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringNoComments.ts, 0, 0)) >"C" : Symbol(Foo.C, Decl(constEnumToStringNoComments.ts, 5, 13)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/constEnumToStringWithComments.symbols b/tests/baselines/reference/constEnumToStringWithComments.symbols index fafb7ab4611..028731a4540 100644 --- a/tests/baselines/reference/constEnumToStringWithComments.symbols +++ b/tests/baselines/reference/constEnumToStringWithComments.symbols @@ -23,91 +23,91 @@ const enum Foo { let x0 = Foo.X.toString(); >x0 : Symbol(x0, Decl(constEnumToStringWithComments.ts, 9, 3)) ->Foo.X.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.X.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.X : Symbol(Foo.X, Decl(constEnumToStringWithComments.ts, 0, 16)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >X : Symbol(Foo.X, Decl(constEnumToStringWithComments.ts, 0, 16)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let x1 = Foo["X"].toString(); >x1 : Symbol(x1, Decl(constEnumToStringWithComments.ts, 10, 3)) ->Foo["X"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["X"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >"X" : Symbol(Foo.X, Decl(constEnumToStringWithComments.ts, 0, 16)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let y0 = Foo.Y.toString(); >y0 : Symbol(y0, Decl(constEnumToStringWithComments.ts, 11, 3)) ->Foo.Y.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.Y.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.Y : Symbol(Foo.Y, Decl(constEnumToStringWithComments.ts, 1, 12)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >Y : Symbol(Foo.Y, Decl(constEnumToStringWithComments.ts, 1, 12)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let y1 = Foo["Y"].toString(); >y1 : Symbol(y1, Decl(constEnumToStringWithComments.ts, 12, 3)) ->Foo["Y"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["Y"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >"Y" : Symbol(Foo.Y, Decl(constEnumToStringWithComments.ts, 1, 12)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let z0 = Foo.Z.toString(); >z0 : Symbol(z0, Decl(constEnumToStringWithComments.ts, 13, 3)) ->Foo.Z.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.Z.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.Z : Symbol(Foo.Z, Decl(constEnumToStringWithComments.ts, 2, 12)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >Z : Symbol(Foo.Z, Decl(constEnumToStringWithComments.ts, 2, 12)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let z1 = Foo["Z"].toString(); >z1 : Symbol(z1, Decl(constEnumToStringWithComments.ts, 14, 3)) ->Foo["Z"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["Z"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >"Z" : Symbol(Foo.Z, Decl(constEnumToStringWithComments.ts, 2, 12)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let a0 = Foo.A.toString(); >a0 : Symbol(a0, Decl(constEnumToStringWithComments.ts, 15, 3)) ->Foo.A.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.A.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.A : Symbol(Foo.A, Decl(constEnumToStringWithComments.ts, 3, 11)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >A : Symbol(Foo.A, Decl(constEnumToStringWithComments.ts, 3, 11)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let a1 = Foo["A"].toString(); >a1 : Symbol(a1, Decl(constEnumToStringWithComments.ts, 16, 3)) ->Foo["A"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["A"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >"A" : Symbol(Foo.A, Decl(constEnumToStringWithComments.ts, 3, 11)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let b0 = Foo.B.toString(); >b0 : Symbol(b0, Decl(constEnumToStringWithComments.ts, 17, 3)) ->Foo.B.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.B.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.B : Symbol(Foo.B, Decl(constEnumToStringWithComments.ts, 4, 11)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >B : Symbol(Foo.B, Decl(constEnumToStringWithComments.ts, 4, 11)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let b1 = Foo["B"].toString(); >b1 : Symbol(b1, Decl(constEnumToStringWithComments.ts, 18, 3)) ->Foo["B"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["B"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >"B" : Symbol(Foo.B, Decl(constEnumToStringWithComments.ts, 4, 11)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let c0 = Foo.C.toString(); >c0 : Symbol(c0, Decl(constEnumToStringWithComments.ts, 19, 3)) ->Foo.C.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo.C.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo.C : Symbol(Foo.C, Decl(constEnumToStringWithComments.ts, 5, 13)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >C : Symbol(Foo.C, Decl(constEnumToStringWithComments.ts, 5, 13)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) let c1 = Foo["C"].toString(); >c1 : Symbol(c1, Decl(constEnumToStringWithComments.ts, 20, 3)) ->Foo["C"].toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>Foo["C"].toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(constEnumToStringWithComments.ts, 0, 0)) >"C" : Symbol(Foo.C, Decl(constEnumToStringWithComments.ts, 5, 13)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/constraintSatisfactionWithAny.symbols b/tests/baselines/reference/constraintSatisfactionWithAny.symbols index fdf1bdce7e8..52cfe211cff 100644 --- a/tests/baselines/reference/constraintSatisfactionWithAny.symbols +++ b/tests/baselines/reference/constraintSatisfactionWithAny.symbols @@ -4,7 +4,7 @@ function foo(x: T): T { return null; } >foo : Symbol(foo, Decl(constraintSatisfactionWithAny.ts, 0, 0)) >T : Symbol(T, Decl(constraintSatisfactionWithAny.ts, 2, 13)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(constraintSatisfactionWithAny.ts, 2, 31)) >T : Symbol(T, Decl(constraintSatisfactionWithAny.ts, 2, 13)) >T : Symbol(T, Decl(constraintSatisfactionWithAny.ts, 2, 13)) @@ -67,7 +67,7 @@ foo4(b); class C { >C : Symbol(C, Decl(constraintSatisfactionWithAny.ts, 16, 13)) >T : Symbol(T, Decl(constraintSatisfactionWithAny.ts, 22, 8)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) constructor(public x: T) { } >x : Symbol(x, Decl(constraintSatisfactionWithAny.ts, 23, 16)) diff --git a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.symbols b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.symbols index fd5aae69b86..d53e51b6623 100644 --- a/tests/baselines/reference/constraintSatisfactionWithEmptyObject.symbols +++ b/tests/baselines/reference/constraintSatisfactionWithEmptyObject.symbols @@ -5,7 +5,7 @@ function foo(x: T) { } >foo : Symbol(foo, Decl(constraintSatisfactionWithEmptyObject.ts, 0, 0)) >T : Symbol(T, Decl(constraintSatisfactionWithEmptyObject.ts, 3, 13)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(constraintSatisfactionWithEmptyObject.ts, 3, 31)) >T : Symbol(T, Decl(constraintSatisfactionWithEmptyObject.ts, 3, 13)) @@ -23,7 +23,7 @@ var r = foo({}); class C { >C : Symbol(C, Decl(constraintSatisfactionWithEmptyObject.ts, 6, 16)) >T : Symbol(T, Decl(constraintSatisfactionWithEmptyObject.ts, 8, 8)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) constructor(public x: T) { } >x : Symbol(x, Decl(constraintSatisfactionWithEmptyObject.ts, 9, 16)) @@ -37,7 +37,7 @@ var r2 = new C({}); interface I { >I : Symbol(I, Decl(constraintSatisfactionWithEmptyObject.ts, 12, 19)) >T : Symbol(T, Decl(constraintSatisfactionWithEmptyObject.ts, 14, 12)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) x: T; >x : Symbol(x, Decl(constraintSatisfactionWithEmptyObject.ts, 14, 31)) diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.symbols b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.symbols index b85ae3e90d8..8a6ec113423 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.symbols +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance2.symbols @@ -110,23 +110,23 @@ interface A { // T a12: new (x: Array, y: Array) => Array; >a12 : Symbol(a12, Decl(constructSignatureAssignabilityInInheritance2.ts, 19, 75)) >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance2.ts, 20, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance2.ts, 0, 0)) >y : Symbol(y, Decl(constructSignatureAssignabilityInInheritance2.ts, 20, 29)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(constructSignatureAssignabilityInInheritance2.ts, 3, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance2.ts, 2, 27)) a13: new (x: Array, y: Array) => Array; >a13 : Symbol(a13, Decl(constructSignatureAssignabilityInInheritance2.ts, 20, 68)) >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance2.ts, 21, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance2.ts, 0, 0)) >y : Symbol(y, Decl(constructSignatureAssignabilityInInheritance2.ts, 21, 29)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance2.ts, 2, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance2.ts, 2, 27)) a14: new (x: { a: string; b: number }) => Object; @@ -134,7 +134,7 @@ interface A { // T >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance2.ts, 22, 14)) >a : Symbol(a, Decl(constructSignatureAssignabilityInInheritance2.ts, 22, 18)) >b : Symbol(b, Decl(constructSignatureAssignabilityInInheritance2.ts, 22, 29)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) a15: { >a15 : Symbol(a15, Decl(constructSignatureAssignabilityInInheritance2.ts, 22, 53)) @@ -195,8 +195,8 @@ interface A { // T new (a: Date): Date; >a : Symbol(a, Decl(constructSignatureAssignabilityInInheritance2.ts, 42, 17)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) }): any[]; }; @@ -332,23 +332,23 @@ interface I extends A { a12: new >(x: Array, y: T) => Array; // ok, less specific parameter type >a12 : Symbol(a12, Decl(constructSignatureAssignabilityInInheritance2.ts, 60, 47)) >T : Symbol(T, Decl(constructSignatureAssignabilityInInheritance2.ts, 61, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance2.ts, 0, 0)) >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance2.ts, 61, 37)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance2.ts, 0, 0)) >y : Symbol(y, Decl(constructSignatureAssignabilityInInheritance2.ts, 61, 52)) >T : Symbol(T, Decl(constructSignatureAssignabilityInInheritance2.ts, 61, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance2.ts, 2, 27)) a13: new >(x: Array, y: T) => T; // ok, T = Array, satisfies constraint, contextual signature instantiation succeeds >a13 : Symbol(a13, Decl(constructSignatureAssignabilityInInheritance2.ts, 61, 77)) >T : Symbol(T, Decl(constructSignatureAssignabilityInInheritance2.ts, 62, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance2.ts, 2, 27)) >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance2.ts, 62, 40)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance2.ts, 0, 0)) >y : Symbol(y, Decl(constructSignatureAssignabilityInInheritance2.ts, 62, 55)) >T : Symbol(T, Decl(constructSignatureAssignabilityInInheritance2.ts, 62, 14)) diff --git a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.symbols b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.symbols index 2be72546bee..1b35cd0c896 100644 --- a/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.symbols +++ b/tests/baselines/reference/constructSignatureAssignabilityInInheritance5.symbols @@ -111,23 +111,23 @@ interface A { // T a12: new (x: Array, y: Array) => Array; >a12 : Symbol(a12, Decl(constructSignatureAssignabilityInInheritance5.ts, 20, 75)) >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance5.ts, 21, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance5.ts, 0, 0)) >y : Symbol(y, Decl(constructSignatureAssignabilityInInheritance5.ts, 21, 29)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(constructSignatureAssignabilityInInheritance5.ts, 4, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance5.ts, 3, 27)) a13: new (x: Array, y: Array) => Array; >a13 : Symbol(a13, Decl(constructSignatureAssignabilityInInheritance5.ts, 21, 68)) >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance5.ts, 22, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance5.ts, 0, 0)) >y : Symbol(y, Decl(constructSignatureAssignabilityInInheritance5.ts, 22, 29)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance5.ts, 3, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance5.ts, 3, 27)) a14: new (x: { a: string; b: number }) => Object; @@ -135,7 +135,7 @@ interface A { // T >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance5.ts, 23, 14)) >a : Symbol(a, Decl(constructSignatureAssignabilityInInheritance5.ts, 23, 18)) >b : Symbol(b, Decl(constructSignatureAssignabilityInInheritance5.ts, 23, 29)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface B extends A { @@ -280,23 +280,23 @@ interface I extends B { a12: new >(x: Array, y: T) => Array; // ok, less specific parameter type >a12 : Symbol(a12, Decl(constructSignatureAssignabilityInInheritance5.ts, 43, 47)) >T : Symbol(T, Decl(constructSignatureAssignabilityInInheritance5.ts, 44, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance5.ts, 0, 0)) >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance5.ts, 44, 37)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance5.ts, 0, 0)) >y : Symbol(y, Decl(constructSignatureAssignabilityInInheritance5.ts, 44, 52)) >T : Symbol(T, Decl(constructSignatureAssignabilityInInheritance5.ts, 44, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance5.ts, 3, 27)) a13: new >(x: Array, y: T) => T; // ok, T = Array, satisfies constraint, contextual signature instantiation succeeds >a13 : Symbol(a13, Decl(constructSignatureAssignabilityInInheritance5.ts, 44, 77)) >T : Symbol(T, Decl(constructSignatureAssignabilityInInheritance5.ts, 45, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(constructSignatureAssignabilityInInheritance5.ts, 3, 27)) >x : Symbol(x, Decl(constructSignatureAssignabilityInInheritance5.ts, 45, 40)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(constructSignatureAssignabilityInInheritance5.ts, 0, 0)) >y : Symbol(y, Decl(constructSignatureAssignabilityInInheritance5.ts, 45, 55)) >T : Symbol(T, Decl(constructSignatureAssignabilityInInheritance5.ts, 45, 14)) diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.symbols b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.symbols index 8ca8fb6a5d8..f0ee9f0d32e 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.symbols +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType.symbols @@ -7,7 +7,7 @@ class Base { bar: Object; >bar : Symbol(bar, Decl(constructorFunctionTypeIsAssignableToBaseType.ts, 1, 17)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.symbols b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.symbols index e915b6e705d..39e415e8a5d 100644 --- a/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.symbols +++ b/tests/baselines/reference/constructorFunctionTypeIsAssignableToBaseType2.symbols @@ -9,11 +9,11 @@ class Base { bar: Object; >bar : Symbol(bar, Decl(constructorFunctionTypeIsAssignableToBaseType2.ts, 3, 17)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } constructor(x: Object) { >x : Symbol(x, Decl(constructorFunctionTypeIsAssignableToBaseType2.ts, 6, 16)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/constructorImplementationWithDefaultValues.symbols b/tests/baselines/reference/constructorImplementationWithDefaultValues.symbols index 384aa692da6..a96e053132e 100644 --- a/tests/baselines/reference/constructorImplementationWithDefaultValues.symbols +++ b/tests/baselines/reference/constructorImplementationWithDefaultValues.symbols @@ -34,7 +34,7 @@ class D { class E { >E : Symbol(E, Decl(constructorImplementationWithDefaultValues.ts, 12, 1)) >T : Symbol(T, Decl(constructorImplementationWithDefaultValues.ts, 14, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) constructor(x); >x : Symbol(x, Decl(constructorImplementationWithDefaultValues.ts, 15, 16)) diff --git a/tests/baselines/reference/contextualSignatureInstantiation1.symbols b/tests/baselines/reference/contextualSignatureInstantiation1.symbols index e56e997cffc..80c53b07075 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation1.symbols +++ b/tests/baselines/reference/contextualSignatureInstantiation1.symbols @@ -17,9 +17,9 @@ var e = (x: string, y?: K) => x.length; >x : Symbol(x, Decl(contextualSignatureInstantiation1.ts, 1, 12)) >y : Symbol(y, Decl(contextualSignatureInstantiation1.ts, 1, 22)) >K : Symbol(K, Decl(contextualSignatureInstantiation1.ts, 1, 9)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(contextualSignatureInstantiation1.ts, 1, 12)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) var r99 = map(e); // should be {}[] for S since a generic lambda is not inferentially typed >r99 : Symbol(r99, Decl(contextualSignatureInstantiation1.ts, 2, 3)) @@ -45,9 +45,9 @@ var e2 = (x: string, y?: K) => x.length; >x : Symbol(x, Decl(contextualSignatureInstantiation1.ts, 5, 13)) >y : Symbol(y, Decl(contextualSignatureInstantiation1.ts, 5, 23)) >K : Symbol(K, Decl(contextualSignatureInstantiation1.ts, 5, 10)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(contextualSignatureInstantiation1.ts, 5, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } >r100 : Symbol(r100, Decl(contextualSignatureInstantiation1.ts, 6, 3)) diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.symbols b/tests/baselines/reference/contextualSignatureInstantiation3.symbols index 7e90c6390ca..6d480a7aef4 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.symbols +++ b/tests/baselines/reference/contextualSignatureInstantiation3.symbols @@ -12,9 +12,9 @@ function map(items: T[], f: (x: T) => U): U[]{ >U : Symbol(U, Decl(contextualSignatureInstantiation3.ts, 0, 15)) return items.map(f); ->items.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>items.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >items : Symbol(items, Decl(contextualSignatureInstantiation3.ts, 0, 19)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >f : Symbol(f, Decl(contextualSignatureInstantiation3.ts, 0, 30)) } @@ -47,9 +47,9 @@ var v1: number[]; var v1 = xs.map(identity); // Error if not number[] >v1 : Symbol(v1, Decl(contextualSignatureInstantiation3.ts, 15, 3), Decl(contextualSignatureInstantiation3.ts, 16, 3), Decl(contextualSignatureInstantiation3.ts, 17, 3)) ->xs.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >xs : Symbol(xs, Decl(contextualSignatureInstantiation3.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >identity : Symbol(identity, Decl(contextualSignatureInstantiation3.ts, 2, 1)) var v1 = map(xs, identity); // Error if not number[] @@ -63,9 +63,9 @@ var v2: number[][]; var v2 = xs.map(singleton); // Error if not number[][] >v2 : Symbol(v2, Decl(contextualSignatureInstantiation3.ts, 19, 3), Decl(contextualSignatureInstantiation3.ts, 20, 3), Decl(contextualSignatureInstantiation3.ts, 21, 3)) ->xs.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >xs : Symbol(xs, Decl(contextualSignatureInstantiation3.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >singleton : Symbol(singleton, Decl(contextualSignatureInstantiation3.ts, 6, 1)) var v2 = map(xs, singleton); // Error if not number[][] diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.symbols b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.symbols index 3e23a7812f5..13f95623fd5 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.symbols +++ b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.symbols @@ -47,9 +47,9 @@ var x: IWithNoCallSignatures | IWithCallSignatures = a => a.toString(); >IWithNoCallSignatures : Symbol(IWithNoCallSignatures, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 0, 0)) >IWithCallSignatures : Symbol(IWithCallSignatures, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 9, 1)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 25, 52)) ->a.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>a.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 25, 52)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) // With call signatures with different return type var x2: IWithCallSignatures | IWithCallSignatures2 = a => a.toString(); // Like iWithCallSignatures @@ -57,9 +57,9 @@ var x2: IWithCallSignatures | IWithCallSignatures2 = a => a.toString(); // Like >IWithCallSignatures : Symbol(IWithCallSignatures, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 9, 1)) >IWithCallSignatures2 : Symbol(IWithCallSignatures2, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 12, 1)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 28, 52)) ->a.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>a.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 28, 52)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) var x2: IWithCallSignatures | IWithCallSignatures2 = a => a; // Like iWithCallSignatures2 >x2 : Symbol(x2, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 28, 3), Decl(contextualTypeWithUnionTypeCallSignatures.ts, 29, 3)) @@ -82,7 +82,7 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any >IWithCallSignatures : Symbol(IWithCallSignatures, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 9, 1)) >IWithCallSignatures4 : Symbol(IWithCallSignatures4, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 18, 1)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52)) ->a.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>a.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.symbols b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.symbols index c381377e523..14b595f8b33 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.symbols +++ b/tests/baselines/reference/contextualTypeWithUnionTypeIndexSignatures.symbols @@ -93,9 +93,9 @@ var x2: IWithStringIndexSignature1 | IWithStringIndexSignature2 = { z: a => a.to >IWithStringIndexSignature2 : Symbol(IWithStringIndexSignature2, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 17, 1)) >z : Symbol(z, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 42, 67)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 42, 70)) ->a.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>a.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 42, 70)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) var x2: IWithStringIndexSignature1 | IWithStringIndexSignature2 = { z: a => a }; // a should be number >x2 : Symbol(x2, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 42, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 43, 3)) @@ -133,9 +133,9 @@ var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a.to >IWithNumberIndexSignature1 : Symbol(IWithNumberIndexSignature1, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 20, 1)) >IWithNumberIndexSignature2 : Symbol(IWithNumberIndexSignature2, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 23, 1)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 52, 70)) ->a.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>a.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 52, 70)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) var x4: IWithNumberIndexSignature1 | IWithNumberIndexSignature2 = { 1: a => a }; // a should be number >x4 : Symbol(x4, Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 52, 3), Decl(contextualTypeWithUnionTypeIndexSignatures.ts, 53, 3)) diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeMembers.symbols b/tests/baselines/reference/contextualTypeWithUnionTypeMembers.symbols index 3d7b8bf5a18..5a0891c3b88 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeMembers.symbols +++ b/tests/baselines/reference/contextualTypeWithUnionTypeMembers.symbols @@ -164,7 +164,7 @@ var i1Ori2: I1 | I2 = { // Like i1 and i2 both var arrayI1OrI2: Array | I2> = [i1, i2, { // Like i1 >arrayI1OrI2 : Symbol(arrayI1OrI2, Decl(contextualTypeWithUnionTypeMembers.ts, 51, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >I1 : Symbol(I1, Decl(contextualTypeWithUnionTypeMembers.ts, 0, 0)) >I2 : Symbol(I2, Decl(contextualTypeWithUnionTypeMembers.ts, 9, 1)) >i1 : Symbol(i1, Decl(contextualTypeWithUnionTypeMembers.ts, 21, 3)) @@ -301,9 +301,9 @@ var i11Ori21: I11 | I21 = { var z = a.charAt(b); >z : Symbol(z, Decl(contextualTypeWithUnionTypeMembers.ts, 91, 11)) ->a.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>a.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeMembers.ts, 90, 38)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(contextualTypeWithUnionTypeMembers.ts, 90, 40)) return z; @@ -327,9 +327,9 @@ var i11Ori21: I11 | I21 = { var z = a.charCodeAt(b); >z : Symbol(z, Decl(contextualTypeWithUnionTypeMembers.ts, 99, 11)) ->a.charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, 285, 32)) +>a.charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeMembers.ts, 98, 38)) ->charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, 285, 32)) +>charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(contextualTypeWithUnionTypeMembers.ts, 98, 40)) return z; @@ -342,7 +342,7 @@ var i11Ori21: I11 | I21 = { }; var arrayOrI11OrI21: Array = [i11, i21, i11 || i21, { >arrayOrI11OrI21 : Symbol(arrayOrI11OrI21, Decl(contextualTypeWithUnionTypeMembers.ts, 104, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >I11 : Symbol(I11, Decl(contextualTypeWithUnionTypeMembers.ts, 74, 7)) >I21 : Symbol(I21, Decl(contextualTypeWithUnionTypeMembers.ts, 79, 1)) >i11 : Symbol(i11, Decl(contextualTypeWithUnionTypeMembers.ts, 84, 3)) @@ -358,9 +358,9 @@ var arrayOrI11OrI21: Array = [i11, i21, i11 || i21, { var z = a.charAt(b); >z : Symbol(z, Decl(contextualTypeWithUnionTypeMembers.ts, 107, 15)) ->a.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>a.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeMembers.ts, 106, 42)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(contextualTypeWithUnionTypeMembers.ts, 106, 44)) return z; @@ -379,9 +379,9 @@ var arrayOrI11OrI21: Array = [i11, i21, i11 || i21, { var z = a.charCodeAt(b); >z : Symbol(z, Decl(contextualTypeWithUnionTypeMembers.ts, 114, 15)) ->a.charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, 285, 32)) +>a.charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeMembers.ts, 113, 42)) ->charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, 285, 32)) +>charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(contextualTypeWithUnionTypeMembers.ts, 113, 44)) return z; diff --git a/tests/baselines/reference/contextualTypingOfConditionalExpression.symbols b/tests/baselines/reference/contextualTypingOfConditionalExpression.symbols index 56c3abe0627..1f8ad9f9c68 100644 --- a/tests/baselines/reference/contextualTypingOfConditionalExpression.symbols +++ b/tests/baselines/reference/contextualTypingOfConditionalExpression.symbols @@ -3,13 +3,13 @@ var x: (a: number) => void = true ? (a) => a.toExponential() : (b) => b.toFixed( >x : Symbol(x, Decl(contextualTypingOfConditionalExpression.ts, 0, 3)) >a : Symbol(a, Decl(contextualTypingOfConditionalExpression.ts, 0, 8)) >a : Symbol(a, Decl(contextualTypingOfConditionalExpression.ts, 0, 37)) ->a.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>a.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypingOfConditionalExpression.ts, 0, 37)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(contextualTypingOfConditionalExpression.ts, 0, 64)) ->b.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>b.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(contextualTypingOfConditionalExpression.ts, 0, 64)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) class A { >A : Symbol(A, Decl(contextualTypingOfConditionalExpression.ts, 0, 82)) diff --git a/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.symbols b/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.symbols index 810f407e1b2..e6719960b31 100644 --- a/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.symbols +++ b/tests/baselines/reference/contextuallyTypedFunctionExpressionsAndReturnAnnotations.symbols @@ -13,9 +13,9 @@ foo((y): (y2: number) => void => { var z = y.charAt(0); // Should be string >z : Symbol(z, Decl(contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts, 4, 7)) ->y.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>y.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts, 3, 5)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) return null; }); @@ -29,9 +29,9 @@ foo((y: string) => { var z = y2.toFixed(); // Should be string >z : Symbol(z, Decl(contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts, 10, 11)) ->y2.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>y2.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >y2 : Symbol(y2, Decl(contextuallyTypedFunctionExpressionsAndReturnAnnotations.ts, 9, 10)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) return 0; }; diff --git a/tests/baselines/reference/contextuallyTypingOrOperator.symbols b/tests/baselines/reference/contextuallyTypingOrOperator.symbols index 18019aea7cb..1ceb9b76ad3 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator.symbols +++ b/tests/baselines/reference/contextuallyTypingOrOperator.symbols @@ -5,34 +5,34 @@ var v: { a: (_: string) => number } = { a: s => s.length } || { a: s => 1 }; >_ : Symbol(_, Decl(contextuallyTypingOrOperator.ts, 0, 13)) >a : Symbol(a, Decl(contextuallyTypingOrOperator.ts, 0, 39)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 0, 42)) ->s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 0, 42)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextuallyTypingOrOperator.ts, 0, 63)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 0, 66)) var v2 = (s: string) => s.length || function (s) { s.length }; >v2 : Symbol(v2, Decl(contextuallyTypingOrOperator.ts, 2, 3)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 2, 10)) ->s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 2, 10)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 2, 46)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 2, 46)) var v3 = (s: string) => s.length || function (s: number) { return 1 }; >v3 : Symbol(v3, Decl(contextuallyTypingOrOperator.ts, 4, 3)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 4, 10)) ->s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 4, 10)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 4, 46)) var v4 = (s: number) => 1 || function (s: string) { return s.length }; >v4 : Symbol(v4, Decl(contextuallyTypingOrOperator.ts, 5, 3)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 5, 10)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 5, 39)) ->s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(contextuallyTypingOrOperator.ts, 5, 39)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/contextuallyTypingOrOperator2.symbols b/tests/baselines/reference/contextuallyTypingOrOperator2.symbols index 99e328fd64a..40dc6190b04 100644 --- a/tests/baselines/reference/contextuallyTypingOrOperator2.symbols +++ b/tests/baselines/reference/contextuallyTypingOrOperator2.symbols @@ -5,18 +5,18 @@ var v: { a: (_: string) => number } = { a: s => s.length } || { a: s => 1 }; >_ : Symbol(_, Decl(contextuallyTypingOrOperator2.ts, 0, 13)) >a : Symbol(a, Decl(contextuallyTypingOrOperator2.ts, 0, 39)) >s : Symbol(s, Decl(contextuallyTypingOrOperator2.ts, 0, 42)) ->s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(contextuallyTypingOrOperator2.ts, 0, 42)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(contextuallyTypingOrOperator2.ts, 0, 63)) >s : Symbol(s, Decl(contextuallyTypingOrOperator2.ts, 0, 66)) var v2 = (s: string) => s.length || function (s) { s.aaa }; >v2 : Symbol(v2, Decl(contextuallyTypingOrOperator2.ts, 2, 3)) >s : Symbol(s, Decl(contextuallyTypingOrOperator2.ts, 2, 10)) ->s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(contextuallyTypingOrOperator2.ts, 2, 10)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(contextuallyTypingOrOperator2.ts, 2, 46)) >s : Symbol(s, Decl(contextuallyTypingOrOperator2.ts, 2, 46)) diff --git a/tests/baselines/reference/declFileConstructors.symbols b/tests/baselines/reference/declFileConstructors.symbols index bc8f349bb82..1190c889dbf 100644 --- a/tests/baselines/reference/declFileConstructors.symbols +++ b/tests/baselines/reference/declFileConstructors.symbols @@ -33,9 +33,9 @@ export class ConstructorWithRestParamters { return a + rests.join(""); >a : Symbol(a, Decl(declFileConstructors_0.ts, 16, 16)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileConstructors_0.ts, 16, 26)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } } @@ -119,9 +119,9 @@ class GlobalConstructorWithRestParamters { return a + rests.join(""); >a : Symbol(a, Decl(declFileConstructors_1.ts, 15, 16)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileConstructors_1.ts, 15, 26)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/declFileEnums.symbols b/tests/baselines/reference/declFileEnums.symbols index 22d5ee6bb63..bea118ea967 100644 --- a/tests/baselines/reference/declFileEnums.symbols +++ b/tests/baselines/reference/declFileEnums.symbols @@ -35,9 +35,9 @@ enum e3 { b = Math.PI, >b : Symbol(e3.b, Decl(declFileEnums.ts, 14, 11)) ->Math.PI : Symbol(Math.PI, Decl(lib.d.ts, 534, 19)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->PI : Symbol(Math.PI, Decl(lib.d.ts, 534, 19)) +>Math.PI : Symbol(Math.PI, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>PI : Symbol(Math.PI, Decl(lib.d.ts, --, --)) c = a + 3 >c : Symbol(e3.c, Decl(declFileEnums.ts, 15, 16)) diff --git a/tests/baselines/reference/declFileFunctions.symbols b/tests/baselines/reference/declFileFunctions.symbols index 1853da94a46..9ee1a3603bd 100644 --- a/tests/baselines/reference/declFileFunctions.symbols +++ b/tests/baselines/reference/declFileFunctions.symbols @@ -24,9 +24,9 @@ export function fooWithRestParameters(a: string, ...rests: string[]) { return a + rests.join(""); >a : Symbol(a, Decl(declFileFunctions_0.ts, 10, 38)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileFunctions_0.ts, 10, 48)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } export function fooWithOverloads(a: string): string; @@ -115,9 +115,9 @@ function nonExportedFooWithRestParameters(a: string, ...rests: string[]) { return a + rests.join(""); >a : Symbol(a, Decl(declFileFunctions_0.ts, 47, 42)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileFunctions_0.ts, 47, 52)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } function nonExportedFooWithOverloads(a: string): string; @@ -161,9 +161,9 @@ function globalfooWithRestParameters(a: string, ...rests: string[]) { return a + rests.join(""); >a : Symbol(a, Decl(declFileFunctions_1.ts, 9, 37)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileFunctions_1.ts, 9, 47)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } function globalfooWithOverloads(a: string): string; >globalfooWithOverloads : Symbol(globalfooWithOverloads, Decl(declFileFunctions_1.ts, 11, 1), Decl(declFileFunctions_1.ts, 12, 51), Decl(declFileFunctions_1.ts, 13, 51)) diff --git a/tests/baselines/reference/declFileGenericType.symbols b/tests/baselines/reference/declFileGenericType.symbols index 38460fcb143..b98e0df59ac 100644 --- a/tests/baselines/reference/declFileGenericType.symbols +++ b/tests/baselines/reference/declFileGenericType.symbols @@ -44,7 +44,7 @@ export module C { >B : Symbol(B, Decl(declFileGenericType.ts, 1, 24)) >x : Symbol(x, Decl(declFileGenericType.ts, 7, 39)) >T : Symbol(T, Decl(declFileGenericType.ts, 7, 23)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0)) >A : Symbol(A, Decl(declFileGenericType.ts, 0, 17)) >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0)) diff --git a/tests/baselines/reference/declFileMethods.symbols b/tests/baselines/reference/declFileMethods.symbols index f0426e46026..845f3044dae 100644 --- a/tests/baselines/reference/declFileMethods.symbols +++ b/tests/baselines/reference/declFileMethods.symbols @@ -27,9 +27,9 @@ export class c1 { return a + rests.join(""); >a : Symbol(a, Decl(declFileMethods_0.ts, 11, 33)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileMethods_0.ts, 11, 43)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } public fooWithOverloads(a: string): string; @@ -73,9 +73,9 @@ export class c1 { return a + rests.join(""); >a : Symbol(a, Decl(declFileMethods_0.ts, 31, 41)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileMethods_0.ts, 31, 51)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } private privateFooWithOverloads(a: string): string; >privateFooWithOverloads : Symbol(privateFooWithOverloads, Decl(declFileMethods_0.ts, 33, 5), Decl(declFileMethods_0.ts, 34, 55), Decl(declFileMethods_0.ts, 35, 55)) @@ -118,9 +118,9 @@ export class c1 { return a + rests.join(""); >a : Symbol(a, Decl(declFileMethods_0.ts, 50, 39)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileMethods_0.ts, 50, 49)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } static staticFooWithOverloads(a: string): string; >staticFooWithOverloads : Symbol(c1.staticFooWithOverloads, Decl(declFileMethods_0.ts, 52, 5), Decl(declFileMethods_0.ts, 53, 53), Decl(declFileMethods_0.ts, 54, 53)) @@ -163,9 +163,9 @@ export class c1 { return a + rests.join(""); >a : Symbol(a, Decl(declFileMethods_0.ts, 69, 54)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileMethods_0.ts, 69, 64)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } private static privateStaticFooWithOverloads(a: string): string; >privateStaticFooWithOverloads : Symbol(c1.privateStaticFooWithOverloads, Decl(declFileMethods_0.ts, 71, 5), Decl(declFileMethods_0.ts, 72, 68), Decl(declFileMethods_0.ts, 73, 68)) @@ -242,9 +242,9 @@ class c2 { return a + rests.join(""); >a : Symbol(a, Decl(declFileMethods_1.ts, 10, 33)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileMethods_1.ts, 10, 43)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } public fooWithOverloads(a: string): string; @@ -288,9 +288,9 @@ class c2 { return a + rests.join(""); >a : Symbol(a, Decl(declFileMethods_1.ts, 30, 41)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileMethods_1.ts, 30, 51)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } private privateFooWithOverloads(a: string): string; >privateFooWithOverloads : Symbol(privateFooWithOverloads, Decl(declFileMethods_1.ts, 32, 5), Decl(declFileMethods_1.ts, 33, 55), Decl(declFileMethods_1.ts, 34, 55)) @@ -333,9 +333,9 @@ class c2 { return a + rests.join(""); >a : Symbol(a, Decl(declFileMethods_1.ts, 49, 39)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileMethods_1.ts, 49, 49)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } static staticFooWithOverloads(a: string): string; >staticFooWithOverloads : Symbol(c2.staticFooWithOverloads, Decl(declFileMethods_1.ts, 51, 5), Decl(declFileMethods_1.ts, 52, 53), Decl(declFileMethods_1.ts, 53, 53)) @@ -378,9 +378,9 @@ class c2 { return a + rests.join(""); >a : Symbol(a, Decl(declFileMethods_1.ts, 68, 54)) ->rests.join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>rests.join : Symbol(Array.join, Decl(lib.d.ts, --, --)) >rests : Symbol(rests, Decl(declFileMethods_1.ts, 68, 64)) ->join : Symbol(Array.join, Decl(lib.d.ts, 1035, 31)) +>join : Symbol(Array.join, Decl(lib.d.ts, --, --)) } private static privateStaticFooWithOverloads(a: string): string; >privateStaticFooWithOverloads : Symbol(c2.privateStaticFooWithOverloads, Decl(declFileMethods_1.ts, 70, 5), Decl(declFileMethods_1.ts, 71, 68), Decl(declFileMethods_1.ts, 72, 68)) diff --git a/tests/baselines/reference/declFilePrivateMethodOverloads.symbols b/tests/baselines/reference/declFilePrivateMethodOverloads.symbols index 4f02212d79e..becc01438c2 100644 --- a/tests/baselines/reference/declFilePrivateMethodOverloads.symbols +++ b/tests/baselines/reference/declFilePrivateMethodOverloads.symbols @@ -20,7 +20,7 @@ class c1 { private _forEachBindingContext(bindingContextArray: Array, fn: (bindingContext: IContext) => void); >_forEachBindingContext : Symbol(_forEachBindingContext, Decl(declFilePrivateMethodOverloads.ts, 4, 10), Decl(declFilePrivateMethodOverloads.ts, 5, 101), Decl(declFilePrivateMethodOverloads.ts, 6, 113)) >bindingContextArray : Symbol(bindingContextArray, Decl(declFilePrivateMethodOverloads.ts, 6, 35)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >IContext : Symbol(IContext, Decl(declFilePrivateMethodOverloads.ts, 0, 0)) >fn : Symbol(fn, Decl(declFilePrivateMethodOverloads.ts, 6, 72)) >bindingContext : Symbol(bindingContext, Decl(declFilePrivateMethodOverloads.ts, 6, 78)) @@ -44,7 +44,7 @@ class c1 { private overloadWithArityDifference(bindingContextArray: Array, fn: (bindingContext: IContext) => void); >overloadWithArityDifference : Symbol(overloadWithArityDifference, Decl(declFilePrivateMethodOverloads.ts, 9, 5), Decl(declFilePrivateMethodOverloads.ts, 11, 66), Decl(declFilePrivateMethodOverloads.ts, 12, 118)) >bindingContextArray : Symbol(bindingContextArray, Decl(declFilePrivateMethodOverloads.ts, 12, 40)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >IContext : Symbol(IContext, Decl(declFilePrivateMethodOverloads.ts, 0, 0)) >fn : Symbol(fn, Decl(declFilePrivateMethodOverloads.ts, 12, 77)) >bindingContext : Symbol(bindingContext, Decl(declFilePrivateMethodOverloads.ts, 12, 83)) diff --git a/tests/baselines/reference/declFileTypeAnnotationStringLiteral.symbols b/tests/baselines/reference/declFileTypeAnnotationStringLiteral.symbols index 7250567039a..f48ced073d5 100644 --- a/tests/baselines/reference/declFileTypeAnnotationStringLiteral.symbols +++ b/tests/baselines/reference/declFileTypeAnnotationStringLiteral.symbols @@ -20,9 +20,9 @@ function foo(a: string): string | number { >a : Symbol(a, Decl(declFileTypeAnnotationStringLiteral.ts, 4, 13)) return a.length; ->a.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>a.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(declFileTypeAnnotationStringLiteral.ts, 4, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } return a; diff --git a/tests/baselines/reference/declarationEmit_array-types-from-generic-array-usage.symbols b/tests/baselines/reference/declarationEmit_array-types-from-generic-array-usage.symbols index 4f79e47277b..9c9e757afb9 100644 --- a/tests/baselines/reference/declarationEmit_array-types-from-generic-array-usage.symbols +++ b/tests/baselines/reference/declarationEmit_array-types-from-generic-array-usage.symbols @@ -1,5 +1,5 @@ === tests/cases/compiler/declarationEmit_array-types-from-generic-array-usage.ts === interface A extends Array { } >A : Symbol(A, Decl(declarationEmit_array-types-from-generic-array-usage.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/declareExternalModuleWithExportAssignedFundule.symbols b/tests/baselines/reference/declareExternalModuleWithExportAssignedFundule.symbols index 881728ce641..0b1b06cc99e 100644 --- a/tests/baselines/reference/declareExternalModuleWithExportAssignedFundule.symbols +++ b/tests/baselines/reference/declareExternalModuleWithExportAssignedFundule.symbols @@ -23,10 +23,10 @@ declare module "express" { post(path: RegExp, handler: (req: Function) => void ): void; >post : Symbol(post, Decl(declareExternalModuleWithExportAssignedFundule.ts, 10, 48)) >path : Symbol(path, Decl(declareExternalModuleWithExportAssignedFundule.ts, 12, 17)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >handler : Symbol(handler, Decl(declareExternalModuleWithExportAssignedFundule.ts, 12, 30)) >req : Symbol(req, Decl(declareExternalModuleWithExportAssignedFundule.ts, 12, 41)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/decoratorMetadataOnInferredType.symbols b/tests/baselines/reference/decoratorMetadataOnInferredType.symbols index e1507c75e94..09530f9cecf 100644 --- a/tests/baselines/reference/decoratorMetadataOnInferredType.symbols +++ b/tests/baselines/reference/decoratorMetadataOnInferredType.symbols @@ -21,7 +21,7 @@ class A { function decorator(target: Object, propertyKey: string) { >decorator : Symbol(decorator, Decl(decoratorMetadataOnInferredType.ts, 7, 1)) >target : Symbol(target, Decl(decoratorMetadataOnInferredType.ts, 9, 19)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >propertyKey : Symbol(propertyKey, Decl(decoratorMetadataOnInferredType.ts, 9, 34)) } diff --git a/tests/baselines/reference/decoratorMetadataWithConstructorType.symbols b/tests/baselines/reference/decoratorMetadataWithConstructorType.symbols index 57221f0d139..db1c388f206 100644 --- a/tests/baselines/reference/decoratorMetadataWithConstructorType.symbols +++ b/tests/baselines/reference/decoratorMetadataWithConstructorType.symbols @@ -21,7 +21,7 @@ class A { function decorator(target: Object, propertyKey: string) { >decorator : Symbol(decorator, Decl(decoratorMetadataWithConstructorType.ts, 7, 1)) >target : Symbol(target, Decl(decoratorMetadataWithConstructorType.ts, 9, 19)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >propertyKey : Symbol(propertyKey, Decl(decoratorMetadataWithConstructorType.ts, 9, 34)) } diff --git a/tests/baselines/reference/decoratorOnClassAccessor1.symbols b/tests/baselines/reference/decoratorOnClassAccessor1.symbols index 933dff1b4c5..6b8e3a16c18 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor1.symbols +++ b/tests/baselines/reference/decoratorOnClassAccessor1.symbols @@ -5,9 +5,9 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope >target : Symbol(target, Decl(decoratorOnClassAccessor1.ts, 0, 24)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassAccessor1.ts, 0, 36)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassAccessor1.ts, 0, 57)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassAccessor1.ts, 0, 21)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassAccessor1.ts, 0, 21)) class C { diff --git a/tests/baselines/reference/decoratorOnClassAccessor2.symbols b/tests/baselines/reference/decoratorOnClassAccessor2.symbols index 5738bb50bb8..936afa14de9 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor2.symbols +++ b/tests/baselines/reference/decoratorOnClassAccessor2.symbols @@ -5,9 +5,9 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope >target : Symbol(target, Decl(decoratorOnClassAccessor2.ts, 0, 24)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassAccessor2.ts, 0, 36)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassAccessor2.ts, 0, 57)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassAccessor2.ts, 0, 21)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassAccessor2.ts, 0, 21)) class C { diff --git a/tests/baselines/reference/decoratorOnClassAccessor4.symbols b/tests/baselines/reference/decoratorOnClassAccessor4.symbols index 1100df1c081..0acd491abed 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor4.symbols +++ b/tests/baselines/reference/decoratorOnClassAccessor4.symbols @@ -5,9 +5,9 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope >target : Symbol(target, Decl(decoratorOnClassAccessor4.ts, 0, 24)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassAccessor4.ts, 0, 36)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassAccessor4.ts, 0, 57)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassAccessor4.ts, 0, 21)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassAccessor4.ts, 0, 21)) class C { diff --git a/tests/baselines/reference/decoratorOnClassAccessor5.symbols b/tests/baselines/reference/decoratorOnClassAccessor5.symbols index 8d9927776c2..0585cff96b6 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor5.symbols +++ b/tests/baselines/reference/decoratorOnClassAccessor5.symbols @@ -5,9 +5,9 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope >target : Symbol(target, Decl(decoratorOnClassAccessor5.ts, 0, 24)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassAccessor5.ts, 0, 36)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassAccessor5.ts, 0, 57)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassAccessor5.ts, 0, 21)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassAccessor5.ts, 0, 21)) class C { diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter1.symbols b/tests/baselines/reference/decoratorOnClassConstructorParameter1.symbols index a863f74e2ff..2349029421c 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter1.symbols +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter1.symbols @@ -2,7 +2,7 @@ declare function dec(target: Function, propertyKey: string | symbol, parameterIndex: number): void; >dec : Symbol(dec, Decl(decoratorOnClassConstructorParameter1.ts, 0, 0)) >target : Symbol(target, Decl(decoratorOnClassConstructorParameter1.ts, 0, 21)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassConstructorParameter1.ts, 0, 38)) >parameterIndex : Symbol(parameterIndex, Decl(decoratorOnClassConstructorParameter1.ts, 0, 68)) diff --git a/tests/baselines/reference/decoratorOnClassMethod1.symbols b/tests/baselines/reference/decoratorOnClassMethod1.symbols index f1463115f49..8a92ad7b01b 100644 --- a/tests/baselines/reference/decoratorOnClassMethod1.symbols +++ b/tests/baselines/reference/decoratorOnClassMethod1.symbols @@ -5,9 +5,9 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope >target : Symbol(target, Decl(decoratorOnClassMethod1.ts, 0, 24)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassMethod1.ts, 0, 36)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassMethod1.ts, 0, 57)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod1.ts, 0, 21)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod1.ts, 0, 21)) class C { diff --git a/tests/baselines/reference/decoratorOnClassMethod13.symbols b/tests/baselines/reference/decoratorOnClassMethod13.symbols index 42f44d885ee..6dfcd15d040 100644 --- a/tests/baselines/reference/decoratorOnClassMethod13.symbols +++ b/tests/baselines/reference/decoratorOnClassMethod13.symbols @@ -5,9 +5,9 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope >target : Symbol(target, Decl(decoratorOnClassMethod13.ts, 0, 24)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassMethod13.ts, 0, 36)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassMethod13.ts, 0, 57)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod13.ts, 0, 21)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod13.ts, 0, 21)) class C { diff --git a/tests/baselines/reference/decoratorOnClassMethod2.symbols b/tests/baselines/reference/decoratorOnClassMethod2.symbols index e7942d3ae45..ebab8905469 100644 --- a/tests/baselines/reference/decoratorOnClassMethod2.symbols +++ b/tests/baselines/reference/decoratorOnClassMethod2.symbols @@ -5,9 +5,9 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope >target : Symbol(target, Decl(decoratorOnClassMethod2.ts, 0, 24)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassMethod2.ts, 0, 36)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassMethod2.ts, 0, 57)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod2.ts, 0, 21)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod2.ts, 0, 21)) class C { diff --git a/tests/baselines/reference/decoratorOnClassMethod4.symbols b/tests/baselines/reference/decoratorOnClassMethod4.symbols index 688bc03775a..745fb8c4ce7 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.symbols +++ b/tests/baselines/reference/decoratorOnClassMethod4.symbols @@ -5,9 +5,9 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope >target : Symbol(target, Decl(decoratorOnClassMethod4.ts, 0, 24)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassMethod4.ts, 0, 36)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassMethod4.ts, 0, 57)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod4.ts, 0, 21)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod4.ts, 0, 21)) class C { diff --git a/tests/baselines/reference/decoratorOnClassMethod5.symbols b/tests/baselines/reference/decoratorOnClassMethod5.symbols index 6356ca35449..124ace783fe 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.symbols +++ b/tests/baselines/reference/decoratorOnClassMethod5.symbols @@ -5,9 +5,9 @@ declare function dec(): (target: any, propertyKey: string, descriptor: TypedP >target : Symbol(target, Decl(decoratorOnClassMethod5.ts, 0, 28)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassMethod5.ts, 0, 40)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassMethod5.ts, 0, 61)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod5.ts, 0, 25)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod5.ts, 0, 25)) class C { diff --git a/tests/baselines/reference/decoratorOnClassMethod7.symbols b/tests/baselines/reference/decoratorOnClassMethod7.symbols index 75c3bee294d..e870a798559 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.symbols +++ b/tests/baselines/reference/decoratorOnClassMethod7.symbols @@ -5,9 +5,9 @@ declare function dec(target: any, propertyKey: string, descriptor: TypedPrope >target : Symbol(target, Decl(decoratorOnClassMethod7.ts, 0, 24)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassMethod7.ts, 0, 36)) >descriptor : Symbol(descriptor, Decl(decoratorOnClassMethod7.ts, 0, 57)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod7.ts, 0, 21)) ->TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, 1171, 36)) +>TypedPropertyDescriptor : Symbol(TypedPropertyDescriptor, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(decoratorOnClassMethod7.ts, 0, 21)) class C { diff --git a/tests/baselines/reference/decoratorOnClassMethodParameter1.symbols b/tests/baselines/reference/decoratorOnClassMethodParameter1.symbols index 47c5999ff47..1358343a9c5 100644 --- a/tests/baselines/reference/decoratorOnClassMethodParameter1.symbols +++ b/tests/baselines/reference/decoratorOnClassMethodParameter1.symbols @@ -2,7 +2,7 @@ declare function dec(target: Object, propertyKey: string | symbol, parameterIndex: number): void; >dec : Symbol(dec, Decl(decoratorOnClassMethodParameter1.ts, 0, 0)) >target : Symbol(target, Decl(decoratorOnClassMethodParameter1.ts, 0, 21)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >propertyKey : Symbol(propertyKey, Decl(decoratorOnClassMethodParameter1.ts, 0, 36)) >parameterIndex : Symbol(parameterIndex, Decl(decoratorOnClassMethodParameter1.ts, 0, 66)) diff --git a/tests/baselines/reference/deleteOperatorWithStringType.symbols b/tests/baselines/reference/deleteOperatorWithStringType.symbols index a13ddd5fa39..204aac0123b 100644 --- a/tests/baselines/reference/deleteOperatorWithStringType.symbols +++ b/tests/baselines/reference/deleteOperatorWithStringType.symbols @@ -88,9 +88,9 @@ var ResultIsBoolean11 = delete (STRING + STRING); var ResultIsBoolean12 = delete STRING.charAt(0); >ResultIsBoolean12 : Symbol(ResultIsBoolean12, Decl(deleteOperatorWithStringType.ts, 32, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(deleteOperatorWithStringType.ts, 1, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) // multiple delete operator var ResultIsBoolean13 = delete delete STRING; diff --git a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.symbols b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.symbols index dd384838694..17fb21e867d 100644 --- a/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.symbols +++ b/tests/baselines/reference/derivedClassOverridesIndexersWithAssignmentCompatibility.symbols @@ -4,7 +4,7 @@ class Base { [x: string]: Object; >x : Symbol(x, Decl(derivedClassOverridesIndexersWithAssignmentCompatibility.ts, 1, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } // ok, use assignment compatibility @@ -21,7 +21,7 @@ class Base2 { [x: number]: Object; >x : Symbol(x, Decl(derivedClassOverridesIndexersWithAssignmentCompatibility.ts, 10, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } // ok, use assignment compatibility diff --git a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.symbols b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.symbols index 59d062f459c..b1160328160 100644 --- a/tests/baselines/reference/derivedClassOverridesProtectedMembers2.symbols +++ b/tests/baselines/reference/derivedClassOverridesProtectedMembers2.symbols @@ -193,7 +193,7 @@ class Base2 { [i: string]: Object; >i : Symbol(i, Decl(derivedClassOverridesProtectedMembers2.ts, 49, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) [i: number]: typeof x; >i : Symbol(i, Decl(derivedClassOverridesProtectedMembers2.ts, 50, 5)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols index c2130f060ab..c4dc8fd0f79 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES5.symbols @@ -8,19 +8,19 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES5.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES5.ts, 7, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES5.ts, 8, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function a1(...x: (number|string)[]) { } >a1 : Symbol(a1, Decl(destructuringParameterDeclaration3ES5.ts, 9, 45)) @@ -33,8 +33,8 @@ function a2(...a) { } function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES5.ts, 12, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES5.ts, 13, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES5.ts, 13, 36)) @@ -122,7 +122,7 @@ const enum E1 { a, b } function foo1(...a: T[]) { } >foo1 : Symbol(foo1, Decl(destructuringParameterDeclaration3ES5.ts, 39, 22)) >T : Symbol(T, Decl(destructuringParameterDeclaration3ES5.ts, 40, 14)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES5.ts, 40, 32)) >T : Symbol(T, Decl(destructuringParameterDeclaration3ES5.ts, 40, 14)) diff --git a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols index 976c402d2b0..46682802e2a 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols +++ b/tests/baselines/reference/destructuringParameterDeclaration3ES6.symbols @@ -8,19 +8,19 @@ type arrayString = Array >arrayString : Symbol(arrayString, Decl(destructuringParameterDeclaration3ES6.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) type someArray = Array | number[]; >someArray : Symbol(someArray, Decl(destructuringParameterDeclaration3ES6.ts, 7, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) type stringOrNumArray = Array; >stringOrNumArray : Symbol(stringOrNumArray, Decl(destructuringParameterDeclaration3ES6.ts, 8, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function a1(...x: (number|string)[]) { } >a1 : Symbol(a1, Decl(destructuringParameterDeclaration3ES6.ts, 9, 45)) @@ -33,8 +33,8 @@ function a2(...a) { } function a3(...a: Array) { } >a3 : Symbol(a3, Decl(destructuringParameterDeclaration3ES6.ts, 12, 21)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES6.ts, 13, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(lib.d.ts, 4118, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function a4(...a: arrayString) { } >a4 : Symbol(a4, Decl(destructuringParameterDeclaration3ES6.ts, 13, 36)) @@ -122,7 +122,7 @@ const enum E1 { a, b } function foo1(...a: T[]) { } >foo1 : Symbol(foo1, Decl(destructuringParameterDeclaration3ES6.ts, 39, 22)) >T : Symbol(T, Decl(destructuringParameterDeclaration3ES6.ts, 40, 14)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(destructuringParameterDeclaration3ES6.ts, 40, 32)) >T : Symbol(T, Decl(destructuringParameterDeclaration3ES6.ts, 40, 14)) diff --git a/tests/baselines/reference/destructuringWithGenericParameter.symbols b/tests/baselines/reference/destructuringWithGenericParameter.symbols index 941cb0bf237..0c489cf1ef2 100644 --- a/tests/baselines/reference/destructuringWithGenericParameter.symbols +++ b/tests/baselines/reference/destructuringWithGenericParameter.symbols @@ -37,9 +37,9 @@ genericFunction(genericObject, ({greeting}) => { var s = greeting.toLocaleLowerCase(); // Greeting should be of type string >s : Symbol(s, Decl(destructuringWithGenericParameter.ts, 11, 7)) ->greeting.toLocaleLowerCase : Symbol(String.toLocaleLowerCase, Decl(lib.d.ts, 402, 26)) +>greeting.toLocaleLowerCase : Symbol(String.toLocaleLowerCase, Decl(lib.d.ts, --, --)) >greeting : Symbol(greeting, Decl(destructuringWithGenericParameter.ts, 10, 33)) ->toLocaleLowerCase : Symbol(String.toLocaleLowerCase, Decl(lib.d.ts, 402, 26)) +>toLocaleLowerCase : Symbol(String.toLocaleLowerCase, Decl(lib.d.ts, --, --)) }); diff --git a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols index 41916162553..a1c083fbc15 100644 --- a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols +++ b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.symbols @@ -1,36 +1,36 @@ === tests/cases/compiler/duplicateOverloadInTypeAugmentation1.ts === interface Array { ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 0)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 0)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, ->reduce : Symbol(reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>reduce : Symbol(reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >callbackfn : Symbol(callbackfn, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 11)) >previousValue : Symbol(previousValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 24)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) >currentValue : Symbol(currentValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 41)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) >currentIndex : Symbol(currentIndex, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 58)) >array : Symbol(array, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 80)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) initialValue?: T): T; >initialValue : Symbol(initialValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 98)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, ->reduce : Symbol(reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>reduce : Symbol(reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >U : Symbol(U, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 11)) >callbackfn : Symbol(callbackfn, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 14)) >previousValue : Symbol(previousValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 27)) >U : Symbol(U, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 11)) >currentValue : Symbol(currentValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 44)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) >currentIndex : Symbol(currentIndex, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 61)) >array : Symbol(array, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 83)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) >U : Symbol(U, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 11)) initialValue: U): U; @@ -40,13 +40,13 @@ interface Array { } var a: Array; >a : Symbol(a, Decl(duplicateOverloadInTypeAugmentation1.ts, 6, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 0)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 0)) var r5 = a.reduce((x, y) => x + y); >r5 : Symbol(r5, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 3)) ->a.reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>a.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >a : Symbol(a, Decl(duplicateOverloadInTypeAugmentation1.ts, 6, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) >x : Symbol(x, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 19)) >y : Symbol(y, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 21)) >x : Symbol(x, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 19)) diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols index 3e7770ccdda..f5846be3738 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments14_ES6.symbols @@ -4,9 +4,9 @@ function f() { >f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 0, 0)) if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) let arguments = 100; >arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 3, 11)) diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols index c0ea901fbbf..648f04b0814 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments15_ES6.symbols @@ -7,9 +7,9 @@ function f() { >arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 2, 7)) if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) const arguments = 100; >arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 4, 13)) diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols index 3d09056c8c3..bc9fcbfa159 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments16_ES6.symbols @@ -7,9 +7,9 @@ function f() { >arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 2, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 6, 7)) if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) return () => arguments[0]; >arguments : Symbol(arguments) diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols index 22431e495cc..65f4e121d10 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17_ES6.symbols @@ -8,9 +8,9 @@ function f() { >arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 2, 25)) if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) return () => arguments[0]; >arguments : Symbol(arguments) diff --git a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols index 6dbbe9501d0..a15a10c29d8 100644 --- a/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionWhenUsingArguments18_ES6.symbols @@ -9,9 +9,9 @@ function f() { >arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments18_ES6.ts, 2, 31)) if (Math.random()) { ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 4419, 60)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) return () => arguments; >arguments : Symbol(arguments) diff --git a/tests/baselines/reference/enumBasics.symbols b/tests/baselines/reference/enumBasics.symbols index 32bbfc3124e..23f2a400741 100644 --- a/tests/baselines/reference/enumBasics.symbols +++ b/tests/baselines/reference/enumBasics.symbols @@ -76,8 +76,8 @@ enum E3 { X = 'foo'.length, Y = 4 + 3, Z = +'foo' >X : Symbol(E3.X, Decl(enumBasics.ts, 31, 9)) ->'foo'.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >Y : Symbol(E3.Y, Decl(enumBasics.ts, 32, 21)) >Z : Symbol(E3.Z, Decl(enumBasics.ts, 32, 32)) } @@ -90,8 +90,8 @@ enum E4 { >X : Symbol(E4.X, Decl(enumBasics.ts, 36, 9)) >Y : Symbol(E4.Y, Decl(enumBasics.ts, 37, 10)) >Z : Symbol(E4.Z, Decl(enumBasics.ts, 37, 13)) ->'foo'.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } // Enum with > 2 constant members with no initializer for first member, non zero initializer for second element diff --git a/tests/baselines/reference/enumIndexer.symbols b/tests/baselines/reference/enumIndexer.symbols index 3f65044c2ec..59191a73276 100644 --- a/tests/baselines/reference/enumIndexer.symbols +++ b/tests/baselines/reference/enumIndexer.symbols @@ -19,9 +19,9 @@ var enumValue = MyEnumType.foo; var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type >x : Symbol(x, Decl(enumIndexer.ts, 5, 3)) ->_arr.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>_arr.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >_arr : Symbol(_arr, Decl(enumIndexer.ts, 3, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >o : Symbol(o, Decl(enumIndexer.ts, 5, 17)) >MyEnumType : Symbol(MyEnumType, Decl(enumIndexer.ts, 0, 0)) >o.key : Symbol(key, Decl(enumIndexer.ts, 3, 13)) diff --git a/tests/baselines/reference/enumMerging.symbols b/tests/baselines/reference/enumMerging.symbols index 414dd839952..7b94cb49b29 100644 --- a/tests/baselines/reference/enumMerging.symbols +++ b/tests/baselines/reference/enumMerging.symbols @@ -71,14 +71,14 @@ module M2 { A = 'foo'.length, B = 'foo'.length, C = 'foo'.length >A : Symbol(EComp2.A, Decl(enumMerging.ts, 24, 24)) ->'foo'.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >B : Symbol(EComp2.B, Decl(enumMerging.ts, 25, 25)) ->'foo'.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >C : Symbol(EComp2.C, Decl(enumMerging.ts, 25, 43)) ->'foo'.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } export enum EComp2 { @@ -86,14 +86,14 @@ module M2 { D = 'foo'.length, E = 'foo'.length, F = 'foo'.length >D : Symbol(EComp2.D, Decl(enumMerging.ts, 28, 24)) ->'foo'.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >E : Symbol(EComp2.E, Decl(enumMerging.ts, 29, 25)) ->'foo'.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >F : Symbol(EComp2.F, Decl(enumMerging.ts, 29, 43)) ->'foo'.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>'foo'.length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; diff --git a/tests/baselines/reference/enumNumbering1.symbols b/tests/baselines/reference/enumNumbering1.symbols index 7722b5bad78..274798f6aad 100644 --- a/tests/baselines/reference/enumNumbering1.symbols +++ b/tests/baselines/reference/enumNumbering1.symbols @@ -10,12 +10,12 @@ enum Test { C = Math.floor(Math.random() * 1000), >C : Symbol(Test.C, Decl(enumNumbering1.ts, 2, 6)) ->Math.floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.floor : Symbol(Math.floor, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>floor : Symbol(Math.floor, Decl(lib.d.ts, --, --)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) D = 10, >D : Symbol(Test.D, Decl(enumNumbering1.ts, 3, 41)) diff --git a/tests/baselines/reference/es3defaultAliasIsQuoted.symbols b/tests/baselines/reference/es3defaultAliasIsQuoted.symbols index 907f1d71b89..3472258373e 100644 --- a/tests/baselines/reference/es3defaultAliasIsQuoted.symbols +++ b/tests/baselines/reference/es3defaultAliasIsQuoted.symbols @@ -13,7 +13,7 @@ export default function assert(value: boolean) { if (!value) throw new Error("Assertion failed!"); >value : Symbol(value, Decl(es3defaultAliasQuoted_file0.ts, 5, 31)) ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } === tests/cases/compiler/es3defaultAliasQuoted_file1.ts === diff --git a/tests/baselines/reference/everyTypeAssignableToAny.symbols b/tests/baselines/reference/everyTypeAssignableToAny.symbols index 275a58641d2..be88c481ece 100644 --- a/tests/baselines/reference/everyTypeAssignableToAny.symbols +++ b/tests/baselines/reference/everyTypeAssignableToAny.symbols @@ -41,7 +41,7 @@ var d: boolean; var e: Date; >e : Symbol(e, Decl(everyTypeAssignableToAny.ts, 17, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var f: any; >f : Symbol(f, Decl(everyTypeAssignableToAny.ts, 18, 3)) @@ -51,7 +51,7 @@ var g: void; var h: Object; >h : Symbol(h, Decl(everyTypeAssignableToAny.ts, 20, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var i: {}; >i : Symbol(i, Decl(everyTypeAssignableToAny.ts, 21, 3)) @@ -61,7 +61,7 @@ var j: () => {}; var k: Function; >k : Symbol(k, Decl(everyTypeAssignableToAny.ts, 23, 3)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var l: (x: number) => string; >l : Symbol(l, Decl(everyTypeAssignableToAny.ts, 24, 3)) @@ -83,11 +83,11 @@ var o: (x: T) => T; var p: Number; >p : Symbol(p, Decl(everyTypeAssignableToAny.ts, 28, 3)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var q: String; >q : Symbol(q, Decl(everyTypeAssignableToAny.ts, 29, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) a = b; >a : Symbol(a, Decl(everyTypeAssignableToAny.ts, 0, 3)) @@ -166,7 +166,7 @@ function foo(x: T, y: U, z: V) { >T : Symbol(T, Decl(everyTypeAssignableToAny.ts, 50, 13)) >U : Symbol(U, Decl(everyTypeAssignableToAny.ts, 50, 15)) >V : Symbol(V, Decl(everyTypeAssignableToAny.ts, 50, 32)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(everyTypeAssignableToAny.ts, 50, 49)) >T : Symbol(T, Decl(everyTypeAssignableToAny.ts, 50, 13)) >y : Symbol(y, Decl(everyTypeAssignableToAny.ts, 50, 54)) diff --git a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.symbols b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.symbols index 489903750f5..e76b3784e8a 100644 --- a/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.symbols +++ b/tests/baselines/reference/everyTypeWithAnnotationAndInitializer.symbols @@ -51,9 +51,9 @@ module M { export function F2(x: number): string { return x.toString(); } >F2 : Symbol(F2, Decl(everyTypeWithAnnotationAndInitializer.ts, 19, 5)) >x : Symbol(x, Decl(everyTypeWithAnnotationAndInitializer.ts, 21, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(everyTypeWithAnnotationAndInitializer.ts, 21, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } var aNumber: number = 9.9; @@ -64,13 +64,13 @@ var aString: string = 'this is a string'; var aDate: Date = new Date(12); >aDate : Symbol(aDate, Decl(everyTypeWithAnnotationAndInitializer.ts, 26, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var anObject: Object = new Object(); >anObject : Symbol(anObject, Decl(everyTypeWithAnnotationAndInitializer.ts, 27, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var anAny: any = null; >anAny : Symbol(anAny, Decl(everyTypeWithAnnotationAndInitializer.ts, 29, 3)) diff --git a/tests/baselines/reference/everyTypeWithInitializer.symbols b/tests/baselines/reference/everyTypeWithInitializer.symbols index 0a22252164b..078f2e305d1 100644 --- a/tests/baselines/reference/everyTypeWithInitializer.symbols +++ b/tests/baselines/reference/everyTypeWithInitializer.symbols @@ -51,9 +51,9 @@ module M { export function F2(x: number): string { return x.toString(); } >F2 : Symbol(F2, Decl(everyTypeWithInitializer.ts, 19, 5)) >x : Symbol(x, Decl(everyTypeWithInitializer.ts, 21, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(everyTypeWithInitializer.ts, 21, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } var aNumber = 9.9; @@ -64,11 +64,11 @@ var aString = 'this is a string'; var aDate = new Date(12); >aDate : Symbol(aDate, Decl(everyTypeWithInitializer.ts, 26, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var anObject = new Object(); >anObject : Symbol(anObject, Decl(everyTypeWithInitializer.ts, 27, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var anAny = null; >anAny : Symbol(anAny, Decl(everyTypeWithInitializer.ts, 29, 3)) diff --git a/tests/baselines/reference/exportAssignValueAndType.symbols b/tests/baselines/reference/exportAssignValueAndType.symbols index b6d5b5b3bb6..faca2c6ffd0 100644 --- a/tests/baselines/reference/exportAssignValueAndType.symbols +++ b/tests/baselines/reference/exportAssignValueAndType.symbols @@ -16,7 +16,7 @@ interface server { startTime: Date; >startTime : Symbol(startTime, Decl(exportAssignValueAndType.ts, 5, 20)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var x = 5; @@ -24,7 +24,7 @@ var x = 5; var server = new Date(); >server : Symbol(server, Decl(exportAssignValueAndType.ts, 2, 1), Decl(exportAssignValueAndType.ts, 10, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) export = server; >server : Symbol(server, Decl(exportAssignValueAndType.ts, 2, 1), Decl(exportAssignValueAndType.ts, 10, 3)) diff --git a/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.symbols b/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.symbols index 2c286e8518d..e79faf36f35 100644 --- a/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.symbols +++ b/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.symbols @@ -13,7 +13,7 @@ interface x { >x : Symbol(x, Decl(exportAssignedTypeAsTypeAnnotation_0.ts, 0, 0)) (): Date; ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo: string; >foo : Symbol(foo, Decl(exportAssignedTypeAsTypeAnnotation_0.ts, 2, 13)) diff --git a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.symbols b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.symbols index bcbf5eb1f60..e2ddbdb419c 100644 --- a/tests/baselines/reference/exportAssignmentWithoutIdentifier1.symbols +++ b/tests/baselines/reference/exportAssignmentWithoutIdentifier1.symbols @@ -5,9 +5,9 @@ function Greeter() { //... } Greeter.prototype.greet = function () { ->Greeter.prototype : Symbol(Function.prototype, Decl(lib.d.ts, 249, 48)) +>Greeter.prototype : Symbol(Function.prototype, Decl(lib.d.ts, --, --)) >Greeter : Symbol(Greeter, Decl(exportAssignmentWithoutIdentifier1.ts, 0, 0)) ->prototype : Symbol(Function.prototype, Decl(lib.d.ts, 249, 48)) +>prototype : Symbol(Function.prototype, Decl(lib.d.ts, --, --)) //... } diff --git a/tests/baselines/reference/exportEqualNamespaces.symbols b/tests/baselines/reference/exportEqualNamespaces.symbols index f6f0767d414..1773883c68b 100644 --- a/tests/baselines/reference/exportEqualNamespaces.symbols +++ b/tests/baselines/reference/exportEqualNamespaces.symbols @@ -4,7 +4,7 @@ declare module server { interface Server extends Object { } >Server : Symbol(Server, Decl(exportEqualNamespaces.ts, 0, 23)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface server { @@ -16,7 +16,7 @@ interface server { startTime: Date; >startTime : Symbol(startTime, Decl(exportEqualNamespaces.ts, 5, 22)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var x = 5; @@ -24,7 +24,7 @@ var x = 5; var server = new Date(); >server : Symbol(server, Decl(exportEqualNamespaces.ts, 0, 0), Decl(exportEqualNamespaces.ts, 2, 1), Decl(exportEqualNamespaces.ts, 10, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) export = server; >server : Symbol(server, Decl(exportEqualNamespaces.ts, 0, 0), Decl(exportEqualNamespaces.ts, 2, 1), Decl(exportEqualNamespaces.ts, 10, 3)) diff --git a/tests/baselines/reference/exportedVariable1.symbols b/tests/baselines/reference/exportedVariable1.symbols index 96c4b0210ba..eb8d4d2f007 100644 --- a/tests/baselines/reference/exportedVariable1.symbols +++ b/tests/baselines/reference/exportedVariable1.symbols @@ -5,9 +5,9 @@ export var foo = {name: "Bill"}; var upper = foo.name.toUpperCase(); >upper : Symbol(upper, Decl(exportedVariable1.ts, 1, 3)) ->foo.name.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>foo.name.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) >foo.name : Symbol(name, Decl(exportedVariable1.ts, 0, 18)) >foo : Symbol(foo, Decl(exportedVariable1.ts, 0, 10)) >name : Symbol(name, Decl(exportedVariable1.ts, 0, 18)) ->toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/extendBooleanInterface.symbols b/tests/baselines/reference/extendBooleanInterface.symbols index 8e123eb050e..be2fb30226d 100644 --- a/tests/baselines/reference/extendBooleanInterface.symbols +++ b/tests/baselines/reference/extendBooleanInterface.symbols @@ -1,6 +1,6 @@ === tests/cases/conformance/types/primitives/boolean/extendBooleanInterface.ts === interface Boolean { ->Boolean : Symbol(Boolean, Decl(lib.d.ts, 443, 38), Decl(lib.d.ts, 456, 11), Decl(extendBooleanInterface.ts, 0, 0)) +>Boolean : Symbol(Boolean, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(extendBooleanInterface.ts, 0, 0)) doStuff(): string; >doStuff : Symbol(doStuff, Decl(extendBooleanInterface.ts, 0, 19)) diff --git a/tests/baselines/reference/extendNumberInterface.symbols b/tests/baselines/reference/extendNumberInterface.symbols index 56d2f8b0014..218f0f41cb2 100644 --- a/tests/baselines/reference/extendNumberInterface.symbols +++ b/tests/baselines/reference/extendNumberInterface.symbols @@ -1,6 +1,6 @@ === tests/cases/conformance/types/primitives/number/extendNumberInterface.ts === interface Number { ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11), Decl(extendNumberInterface.ts, 0, 0)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(extendNumberInterface.ts, 0, 0)) doStuff(): string; >doStuff : Symbol(doStuff, Decl(extendNumberInterface.ts, 0, 18)) diff --git a/tests/baselines/reference/extendStringInterface.symbols b/tests/baselines/reference/extendStringInterface.symbols index a72773647a8..aa20b2e2c15 100644 --- a/tests/baselines/reference/extendStringInterface.symbols +++ b/tests/baselines/reference/extendStringInterface.symbols @@ -1,6 +1,6 @@ === tests/cases/conformance/types/primitives/string/extendStringInterface.ts === interface String { ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(extendStringInterface.ts, 0, 0)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(extendStringInterface.ts, 0, 0)) doStuff(): string; >doStuff : Symbol(doStuff, Decl(extendStringInterface.ts, 0, 18)) diff --git a/tests/baselines/reference/externFunc.symbols b/tests/baselines/reference/externFunc.symbols index 1a02596d7db..b23a70695cf 100644 --- a/tests/baselines/reference/externFunc.symbols +++ b/tests/baselines/reference/externFunc.symbols @@ -1,8 +1,8 @@ === tests/cases/compiler/externFunc.ts === declare function parseInt(s:string):number; ->parseInt : Symbol(parseInt, Decl(lib.d.ts, 28, 38), Decl(externFunc.ts, 0, 0)) +>parseInt : Symbol(parseInt, Decl(lib.d.ts, --, --), Decl(externFunc.ts, 0, 0)) >s : Symbol(s, Decl(externFunc.ts, 0, 26)) parseInt("2"); ->parseInt : Symbol(parseInt, Decl(lib.d.ts, 28, 38), Decl(externFunc.ts, 0, 0)) +>parseInt : Symbol(parseInt, Decl(lib.d.ts, --, --), Decl(externFunc.ts, 0, 0)) diff --git a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.symbols b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.symbols index 731e8558bab..ea0ed9a605c 100644 --- a/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.symbols +++ b/tests/baselines/reference/fatarrowfunctionsInFunctionParameterDefaults.symbols @@ -12,7 +12,7 @@ function fn(x = () => this, y = x()) { } fn.call(4); // Should be 4 ->fn.call : Symbol(Function.call, Decl(lib.d.ts, 234, 45)) +>fn.call : Symbol(Function.call, Decl(lib.d.ts, --, --)) >fn : Symbol(fn, Decl(fatarrowfunctionsInFunctionParameterDefaults.ts, 0, 0)) ->call : Symbol(Function.call, Decl(lib.d.ts, 234, 45)) +>call : Symbol(Function.call, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/fillInMissingTypeArgsOnConstructCalls.symbols b/tests/baselines/reference/fillInMissingTypeArgsOnConstructCalls.symbols index eff8999a0f7..97d485c4b56 100644 --- a/tests/baselines/reference/fillInMissingTypeArgsOnConstructCalls.symbols +++ b/tests/baselines/reference/fillInMissingTypeArgsOnConstructCalls.symbols @@ -2,7 +2,7 @@ class A{ >A : Symbol(A, Decl(fillInMissingTypeArgsOnConstructCalls.ts, 0, 0)) >T : Symbol(T, Decl(fillInMissingTypeArgsOnConstructCalls.ts, 0, 8)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) list: T ; >list : Symbol(list, Decl(fillInMissingTypeArgsOnConstructCalls.ts, 0, 26)) diff --git a/tests/baselines/reference/fixingTypeParametersRepeatedly1.symbols b/tests/baselines/reference/fixingTypeParametersRepeatedly1.symbols index 998e59c0b8f..86f91c82663 100644 --- a/tests/baselines/reference/fixingTypeParametersRepeatedly1.symbols +++ b/tests/baselines/reference/fixingTypeParametersRepeatedly1.symbols @@ -18,9 +18,9 @@ f("", x => null, x => x.toLowerCase()); >f : Symbol(f, Decl(fixingTypeParametersRepeatedly1.ts, 0, 0)) >x : Symbol(x, Decl(fixingTypeParametersRepeatedly1.ts, 1, 5)) >x : Symbol(x, Decl(fixingTypeParametersRepeatedly1.ts, 1, 16)) ->x.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>x.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(fixingTypeParametersRepeatedly1.ts, 1, 16)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) // First overload of g should type check just like f declare function g(x: T, y: (p: T) => T, z: (p: T) => T): T; @@ -45,7 +45,7 @@ g("", x => null, x => x.toLowerCase()); >g : Symbol(g, Decl(fixingTypeParametersRepeatedly1.ts, 1, 39), Decl(fixingTypeParametersRepeatedly1.ts, 4, 63)) >x : Symbol(x, Decl(fixingTypeParametersRepeatedly1.ts, 6, 5)) >x : Symbol(x, Decl(fixingTypeParametersRepeatedly1.ts, 6, 16)) ->x.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>x.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(fixingTypeParametersRepeatedly1.ts, 6, 16)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/for-of13.symbols b/tests/baselines/reference/for-of13.symbols index 09a7e06cc21..bcfc3f981bd 100644 --- a/tests/baselines/reference/for-of13.symbols +++ b/tests/baselines/reference/for-of13.symbols @@ -4,6 +4,6 @@ var v: string; for (v of [""].values()) { } >v : Symbol(v, Decl(for-of13.ts, 0, 3)) ->[""].values : Symbol(Array.values, Decl(lib.d.ts, 4146, 37)) ->values : Symbol(Array.values, Decl(lib.d.ts, 4146, 37)) +>[""].values : Symbol(Array.values, Decl(lib.d.ts, --, --)) +>values : Symbol(Array.values, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/for-of18.symbols b/tests/baselines/reference/for-of18.symbols index 76621026a00..34e11d3d388 100644 --- a/tests/baselines/reference/for-of18.symbols +++ b/tests/baselines/reference/for-of18.symbols @@ -22,9 +22,9 @@ class StringIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(StringIterator, Decl(for-of18.ts, 1, 33)) diff --git a/tests/baselines/reference/for-of19.symbols b/tests/baselines/reference/for-of19.symbols index 35892922df3..81aafd32d13 100644 --- a/tests/baselines/reference/for-of19.symbols +++ b/tests/baselines/reference/for-of19.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(for-of19.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of20.symbols b/tests/baselines/reference/for-of20.symbols index f01969e23bb..727b69e3c9d 100644 --- a/tests/baselines/reference/for-of20.symbols +++ b/tests/baselines/reference/for-of20.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(for-of20.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of21.symbols b/tests/baselines/reference/for-of21.symbols index c740cf62446..1464a42aab2 100644 --- a/tests/baselines/reference/for-of21.symbols +++ b/tests/baselines/reference/for-of21.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(for-of21.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of22.symbols b/tests/baselines/reference/for-of22.symbols index bf4304a8216..1aac39dae6e 100644 --- a/tests/baselines/reference/for-of22.symbols +++ b/tests/baselines/reference/for-of22.symbols @@ -28,9 +28,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(for-of22.ts, 5, 13)) diff --git a/tests/baselines/reference/for-of23.symbols b/tests/baselines/reference/for-of23.symbols index a45775127b0..f4f34fcef93 100644 --- a/tests/baselines/reference/for-of23.symbols +++ b/tests/baselines/reference/for-of23.symbols @@ -27,9 +27,9 @@ class FooIterator { }; } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(for-of23.ts, 4, 13)) diff --git a/tests/baselines/reference/for-of25.symbols b/tests/baselines/reference/for-of25.symbols index ef08deb568d..dfa358da0bd 100644 --- a/tests/baselines/reference/for-of25.symbols +++ b/tests/baselines/reference/for-of25.symbols @@ -10,9 +10,9 @@ class StringIterator { >StringIterator : Symbol(StringIterator, Decl(for-of25.ts, 1, 37)) [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return x; >x : Symbol(x, Decl(for-of25.ts, 0, 3)) diff --git a/tests/baselines/reference/for-of26.symbols b/tests/baselines/reference/for-of26.symbols index abaa0a92dcc..9f4d1455c3f 100644 --- a/tests/baselines/reference/for-of26.symbols +++ b/tests/baselines/reference/for-of26.symbols @@ -16,9 +16,9 @@ class StringIterator { >x : Symbol(x, Decl(for-of26.ts, 0, 3)) } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(StringIterator, Decl(for-of26.ts, 1, 37)) diff --git a/tests/baselines/reference/for-of27.symbols b/tests/baselines/reference/for-of27.symbols index 727574805b9..57148c53f13 100644 --- a/tests/baselines/reference/for-of27.symbols +++ b/tests/baselines/reference/for-of27.symbols @@ -7,7 +7,7 @@ class StringIterator { >StringIterator : Symbol(StringIterator, Decl(for-of27.ts, 0, 37)) [Symbol.iterator]: any; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/for-of28.symbols b/tests/baselines/reference/for-of28.symbols index 4e1bf8ad3dc..91081d3abdf 100644 --- a/tests/baselines/reference/for-of28.symbols +++ b/tests/baselines/reference/for-of28.symbols @@ -10,9 +10,9 @@ class StringIterator { >next : Symbol(next, Decl(for-of28.ts, 2, 22)) [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(StringIterator, Decl(for-of28.ts, 0, 37)) diff --git a/tests/baselines/reference/for-of37.symbols b/tests/baselines/reference/for-of37.symbols index b0a39571f6f..b8ce9da9ce2 100644 --- a/tests/baselines/reference/for-of37.symbols +++ b/tests/baselines/reference/for-of37.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of37.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of37.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 4635, 1), Decl(lib.d.ts, 4658, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) for (var v of map) { >v : Symbol(v, Decl(for-of37.ts, 1, 8)) diff --git a/tests/baselines/reference/for-of38.symbols b/tests/baselines/reference/for-of38.symbols index 67ee08bbb5f..18d2dda6db8 100644 --- a/tests/baselines/reference/for-of38.symbols +++ b/tests/baselines/reference/for-of38.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of38.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of38.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 4635, 1), Decl(lib.d.ts, 4658, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) for (var [k, v] of map) { >k : Symbol(k, Decl(for-of38.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of40.symbols b/tests/baselines/reference/for-of40.symbols index 2f3a2a9a574..a9177d12435 100644 --- a/tests/baselines/reference/for-of40.symbols +++ b/tests/baselines/reference/for-of40.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of40.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of40.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 4635, 1), Decl(lib.d.ts, 4658, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) for (var [k = "", v = false] of map) { >k : Symbol(k, Decl(for-of40.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of44.symbols b/tests/baselines/reference/for-of44.symbols index 839de020702..d7057da0ee2 100644 --- a/tests/baselines/reference/for-of44.symbols +++ b/tests/baselines/reference/for-of44.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of44.ts === var array: [number, string | boolean | symbol][] = [[0, ""], [0, true], [1, Symbol()]] >array : Symbol(array, Decl(for-of44.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) for (var [num, strBoolSym] of array) { >num : Symbol(num, Decl(for-of44.ts, 1, 10)) diff --git a/tests/baselines/reference/for-of45.symbols b/tests/baselines/reference/for-of45.symbols index 6f75dd6311d..7d8ffd4ba86 100644 --- a/tests/baselines/reference/for-of45.symbols +++ b/tests/baselines/reference/for-of45.symbols @@ -5,7 +5,7 @@ var k: string, v: boolean; var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of45.ts, 1, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 4635, 1), Decl(lib.d.ts, 4658, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) for ([k = "", v = false] of map) { >k : Symbol(k, Decl(for-of45.ts, 0, 3)) diff --git a/tests/baselines/reference/for-of50.symbols b/tests/baselines/reference/for-of50.symbols index 7fb77790ef7..435390f2a6e 100644 --- a/tests/baselines/reference/for-of50.symbols +++ b/tests/baselines/reference/for-of50.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of50.ts === var map = new Map([["", true]]); >map : Symbol(map, Decl(for-of50.ts, 0, 3)) ->Map : Symbol(Map, Decl(lib.d.ts, 4635, 1), Decl(lib.d.ts, 4658, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) for (const [k, v] of map) { >k : Symbol(k, Decl(for-of50.ts, 1, 12)) diff --git a/tests/baselines/reference/for-of57.symbols b/tests/baselines/reference/for-of57.symbols index 9aadb415e8f..191377bdd47 100644 --- a/tests/baselines/reference/for-of57.symbols +++ b/tests/baselines/reference/for-of57.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/for-ofStatements/for-of57.ts === var iter: Iterable; >iter : Symbol(iter, Decl(for-of57.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) for (let num of iter) { } >num : Symbol(num, Decl(for-of57.ts, 1, 8)) diff --git a/tests/baselines/reference/forStatements.symbols b/tests/baselines/reference/forStatements.symbols index 6f7c6d6cdbe..e72d55e5813 100644 --- a/tests/baselines/reference/forStatements.symbols +++ b/tests/baselines/reference/forStatements.symbols @@ -51,9 +51,9 @@ module M { export function F2(x: number): string { return x.toString(); } >F2 : Symbol(F2, Decl(forStatements.ts, 19, 5)) >x : Symbol(x, Decl(forStatements.ts, 21, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(forStatements.ts, 21, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } for(var aNumber: number = 9.9;;){} @@ -64,13 +64,13 @@ for(var aString: string = 'this is a string';;){} for(var aDate: Date = new Date(12);;){} >aDate : Symbol(aDate, Decl(forStatements.ts, 26, 7)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) for(var anObject: Object = new Object();;){} >anObject : Symbol(anObject, Decl(forStatements.ts, 27, 7)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) for(var anAny: any = null;;){} >anAny : Symbol(anAny, Decl(forStatements.ts, 29, 7)) diff --git a/tests/baselines/reference/forStatementsMultipleValidDecl.symbols b/tests/baselines/reference/forStatementsMultipleValidDecl.symbols index 6a98fbf133e..1f131bb9701 100644 --- a/tests/baselines/reference/forStatementsMultipleValidDecl.symbols +++ b/tests/baselines/reference/forStatementsMultipleValidDecl.symbols @@ -102,7 +102,7 @@ for (var a: string[] = []; ;) { } for (var a = new Array(); ;) { } >a : Symbol(a, Decl(forStatementsMultipleValidDecl.ts, 27, 8), Decl(forStatementsMultipleValidDecl.ts, 28, 8), Decl(forStatementsMultipleValidDecl.ts, 29, 8), Decl(forStatementsMultipleValidDecl.ts, 30, 8), Decl(forStatementsMultipleValidDecl.ts, 31, 8), Decl(forStatementsMultipleValidDecl.ts, 32, 8)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) for (var a: typeof a; ;) { } >a : Symbol(a, Decl(forStatementsMultipleValidDecl.ts, 27, 8), Decl(forStatementsMultipleValidDecl.ts, 28, 8), Decl(forStatementsMultipleValidDecl.ts, 29, 8), Decl(forStatementsMultipleValidDecl.ts, 30, 8), Decl(forStatementsMultipleValidDecl.ts, 31, 8), Decl(forStatementsMultipleValidDecl.ts, 32, 8)) diff --git a/tests/baselines/reference/funcdecl.symbols b/tests/baselines/reference/funcdecl.symbols index 2538e3a9a04..b91ec3814cf 100644 --- a/tests/baselines/reference/funcdecl.symbols +++ b/tests/baselines/reference/funcdecl.symbols @@ -40,7 +40,7 @@ function withMultiParams(a : number, b, c: Object) { >a : Symbol(a, Decl(funcdecl.ts, 19, 25)) >b : Symbol(b, Decl(funcdecl.ts, 19, 36)) >c : Symbol(c, Decl(funcdecl.ts, 19, 39)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) return a; >a : Symbol(a, Decl(funcdecl.ts, 19, 25)) diff --git a/tests/baselines/reference/functionConstraintSatisfaction.symbols b/tests/baselines/reference/functionConstraintSatisfaction.symbols index eb71bb78e25..969ac928374 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction.symbols +++ b/tests/baselines/reference/functionConstraintSatisfaction.symbols @@ -4,7 +4,7 @@ function foo(x: T): T { return x; } >foo : Symbol(foo, Decl(functionConstraintSatisfaction.ts, 0, 0)) >T : Symbol(T, Decl(functionConstraintSatisfaction.ts, 2, 13)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(functionConstraintSatisfaction.ts, 2, 33)) >T : Symbol(T, Decl(functionConstraintSatisfaction.ts, 2, 13)) >T : Symbol(T, Decl(functionConstraintSatisfaction.ts, 2, 13)) @@ -39,7 +39,7 @@ var c: { (): string; (x): string }; var r = foo(new Function()); >r : Symbol(r, Decl(functionConstraintSatisfaction.ts, 17, 3)) >foo : Symbol(foo, Decl(functionConstraintSatisfaction.ts, 0, 0)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r1 = foo((x) => x); >r1 : Symbol(r1, Decl(functionConstraintSatisfaction.ts, 18, 3)) @@ -154,7 +154,7 @@ var r11 = foo((x: U) => x); >r11 : Symbol(r11, Decl(functionConstraintSatisfaction.ts, 42, 3)) >foo : Symbol(foo, Decl(functionConstraintSatisfaction.ts, 0, 0)) >U : Symbol(U, Decl(functionConstraintSatisfaction.ts, 42, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(functionConstraintSatisfaction.ts, 42, 31)) >U : Symbol(U, Decl(functionConstraintSatisfaction.ts, 42, 15)) >x : Symbol(x, Decl(functionConstraintSatisfaction.ts, 42, 31)) @@ -192,7 +192,7 @@ var r16 = foo(c2); interface F2 extends Function { foo: string; } >F2 : Symbol(F2, Decl(functionConstraintSatisfaction.ts, 47, 18)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >foo : Symbol(foo, Decl(functionConstraintSatisfaction.ts, 49, 31)) var f2: F2; diff --git a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.symbols b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.symbols index cf504147346..4809c88d7fa 100644 --- a/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.symbols +++ b/tests/baselines/reference/functionDeclarationWithArgumentOfTypeFunctionTypeArray.symbols @@ -5,8 +5,8 @@ function foo(args: { (x): number }[]) { >x : Symbol(x, Decl(functionDeclarationWithArgumentOfTypeFunctionTypeArray.ts, 0, 22)) return args.length; ->args.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>args.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >args : Symbol(args, Decl(functionDeclarationWithArgumentOfTypeFunctionTypeArray.ts, 0, 13)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.symbols b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.symbols index db66aa5618b..5211ee999bf 100644 --- a/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.symbols +++ b/tests/baselines/reference/functionExpressionAndLambdaMatchesFunction.symbols @@ -6,7 +6,7 @@ class CDoc { function doSomething(a: Function) { >doSomething : Symbol(doSomething, Decl(functionExpressionAndLambdaMatchesFunction.ts, 1, 23)) >a : Symbol(a, Decl(functionExpressionAndLambdaMatchesFunction.ts, 2, 29)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } doSomething(() => undefined); >doSomething : Symbol(doSomething, Decl(functionExpressionAndLambdaMatchesFunction.ts, 1, 23)) diff --git a/tests/baselines/reference/functionExpressionContextualTyping1.symbols b/tests/baselines/reference/functionExpressionContextualTyping1.symbols index 6182e4bb9a8..736fa86b9ca 100644 --- a/tests/baselines/reference/functionExpressionContextualTyping1.symbols +++ b/tests/baselines/reference/functionExpressionContextualTyping1.symbols @@ -18,9 +18,9 @@ var a0: (n: number, s: string) => number = (num, str) => { >str : Symbol(str, Decl(functionExpressionContextualTyping1.ts, 8, 48)) num.toExponential(); ->num.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>num.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) >num : Symbol(num, Decl(functionExpressionContextualTyping1.ts, 8, 44)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) return 0; } @@ -37,7 +37,7 @@ var a1: (c: Class) => number = (a1) => { >a1 : Symbol(a1, Decl(functionExpressionContextualTyping1.ts, 17, 3)) >c : Symbol(c, Decl(functionExpressionContextualTyping1.ts, 17, 9)) >Class : Symbol(Class, Decl(functionExpressionContextualTyping1.ts, 11, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a1 : Symbol(a1, Decl(functionExpressionContextualTyping1.ts, 17, 40)) a1.foo(); diff --git a/tests/baselines/reference/functionImplementations.symbols b/tests/baselines/reference/functionImplementations.symbols index f9205f37650..3932261b27c 100644 --- a/tests/baselines/reference/functionImplementations.symbols +++ b/tests/baselines/reference/functionImplementations.symbols @@ -279,9 +279,9 @@ var f7: (x: number) => string | number = x => { // should be (x: number) => numb >x : Symbol(x, Decl(functionImplementations.ts, 130, 40)) return x.toString(); ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(functionImplementations.ts, 130, 40)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } var f8: (x: number) => any = x => { // should be (x: number) => Base >f8 : Symbol(f8, Decl(functionImplementations.ts, 134, 3)) diff --git a/tests/baselines/reference/functionOnlyHasThrow.symbols b/tests/baselines/reference/functionOnlyHasThrow.symbols index fc8d60a58be..43846067381 100644 --- a/tests/baselines/reference/functionOnlyHasThrow.symbols +++ b/tests/baselines/reference/functionOnlyHasThrow.symbols @@ -3,5 +3,5 @@ function clone():number { >clone : Symbol(clone, Decl(functionOnlyHasThrow.ts, 0, 0)) throw new Error("To be implemented"); ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/functionOverloadsOnGenericArity2.symbols b/tests/baselines/reference/functionOverloadsOnGenericArity2.symbols index 93a56c86035..0dda3ba81a8 100644 --- a/tests/baselines/reference/functionOverloadsOnGenericArity2.symbols +++ b/tests/baselines/reference/functionOverloadsOnGenericArity2.symbols @@ -16,5 +16,5 @@ interface I { >U : Symbol(U, Decl(functionOverloadsOnGenericArity2.ts, 3, 9)) >T : Symbol(T, Decl(functionOverloadsOnGenericArity2.ts, 3, 11)) >p : Symbol(p, Decl(functionOverloadsOnGenericArity2.ts, 3, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs.symbols b/tests/baselines/reference/functionSubtypingOfVarArgs.symbols index 334766dc10c..3aa266ec030 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs.symbols +++ b/tests/baselines/reference/functionSubtypingOfVarArgs.symbols @@ -11,11 +11,11 @@ class EventBase { >args : Symbol(args, Decl(functionSubtypingOfVarArgs.ts, 3, 19)) this._listeners.push(listener); ->this._listeners.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>this._listeners.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >this._listeners : Symbol(_listeners, Decl(functionSubtypingOfVarArgs.ts, 0, 17)) >this : Symbol(EventBase, Decl(functionSubtypingOfVarArgs.ts, 0, 0)) >_listeners : Symbol(_listeners, Decl(functionSubtypingOfVarArgs.ts, 0, 17)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >listener : Symbol(listener, Decl(functionSubtypingOfVarArgs.ts, 3, 8)) } } diff --git a/tests/baselines/reference/functionSubtypingOfVarArgs2.symbols b/tests/baselines/reference/functionSubtypingOfVarArgs2.symbols index 227264f9617..c2f77199e28 100644 --- a/tests/baselines/reference/functionSubtypingOfVarArgs2.symbols +++ b/tests/baselines/reference/functionSubtypingOfVarArgs2.symbols @@ -12,11 +12,11 @@ class EventBase { >args : Symbol(args, Decl(functionSubtypingOfVarArgs2.ts, 3, 19)) this._listeners.push(listener); ->this._listeners.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>this._listeners.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >this._listeners : Symbol(_listeners, Decl(functionSubtypingOfVarArgs2.ts, 0, 17)) >this : Symbol(EventBase, Decl(functionSubtypingOfVarArgs2.ts, 0, 0)) >_listeners : Symbol(_listeners, Decl(functionSubtypingOfVarArgs2.ts, 0, 17)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >listener : Symbol(listener, Decl(functionSubtypingOfVarArgs2.ts, 3, 8)) } } diff --git a/tests/baselines/reference/functionType.symbols b/tests/baselines/reference/functionType.symbols index f972b6fc8a1..30a5a7cc447 100644 --- a/tests/baselines/reference/functionType.symbols +++ b/tests/baselines/reference/functionType.symbols @@ -3,12 +3,12 @@ function salt() {} >salt : Symbol(salt, Decl(functionType.ts, 0, 0)) salt.apply("hello", []); ->salt.apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>salt.apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) >salt : Symbol(salt, Decl(functionType.ts, 0, 0)) ->apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) (new Function("return 5"))(); ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/generatedContextualTyping.symbols b/tests/baselines/reference/generatedContextualTyping.symbols index 287b7be66d0..df0bb33e02f 100644 --- a/tests/baselines/reference/generatedContextualTyping.symbols +++ b/tests/baselines/reference/generatedContextualTyping.symbols @@ -74,7 +74,7 @@ var x7: Base[] = [d1, d2]; var x8: Array = [d1, d2]; >x8 : Symbol(x8, Decl(generatedContextualTyping.ts, 12, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -165,7 +165,7 @@ class x19 { member: Base[] = [d1, d2] } class x20 { member: Array = [d1, d2] } >x20 : Symbol(x20, Decl(generatedContextualTyping.ts, 23, 39)) >member : Symbol(member, Decl(generatedContextualTyping.ts, 24, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -260,7 +260,7 @@ class x31 { private member: Base[] = [d1, d2] } class x32 { private member: Array = [d1, d2] } >x32 : Symbol(x32, Decl(generatedContextualTyping.ts, 35, 47)) >member : Symbol(member, Decl(generatedContextualTyping.ts, 36, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -355,7 +355,7 @@ class x43 { public member: Base[] = [d1, d2] } class x44 { public member: Array = [d1, d2] } >x44 : Symbol(x44, Decl(generatedContextualTyping.ts, 47, 46)) >member : Symbol(member, Decl(generatedContextualTyping.ts, 48, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -450,7 +450,7 @@ class x55 { static member: Base[] = [d1, d2] } class x56 { static member: Array = [d1, d2] } >x56 : Symbol(x56, Decl(generatedContextualTyping.ts, 59, 46)) >member : Symbol(x56.member, Decl(generatedContextualTyping.ts, 60, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -545,7 +545,7 @@ class x67 { private static member: Base[] = [d1, d2] } class x68 { private static member: Array = [d1, d2] } >x68 : Symbol(x68, Decl(generatedContextualTyping.ts, 71, 54)) >member : Symbol(x68.member, Decl(generatedContextualTyping.ts, 72, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -640,7 +640,7 @@ class x79 { public static member: Base[] = [d1, d2] } class x80 { public static member: Array = [d1, d2] } >x80 : Symbol(x80, Decl(generatedContextualTyping.ts, 83, 53)) >member : Symbol(x80.member, Decl(generatedContextualTyping.ts, 84, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -735,7 +735,7 @@ class x91 { constructor(parm: Base[] = [d1, d2]) { } } class x92 { constructor(parm: Array = [d1, d2]) { } } >x92 : Symbol(x92, Decl(generatedContextualTyping.ts, 95, 54)) >parm : Symbol(parm, Decl(generatedContextualTyping.ts, 96, 24)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -830,7 +830,7 @@ class x103 { constructor(public parm: Base[] = [d1, d2]) { } } class x104 { constructor(public parm: Array = [d1, d2]) { } } >x104 : Symbol(x104, Decl(generatedContextualTyping.ts, 107, 62)) >parm : Symbol(parm, Decl(generatedContextualTyping.ts, 108, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -925,7 +925,7 @@ class x115 { constructor(private parm: Base[] = [d1, d2]) { } } class x116 { constructor(private parm: Array = [d1, d2]) { } } >x116 : Symbol(x116, Decl(generatedContextualTyping.ts, 119, 63)) >parm : Symbol(parm, Decl(generatedContextualTyping.ts, 120, 25)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -1020,7 +1020,7 @@ function x127(parm: Base[] = [d1, d2]) { } function x128(parm: Array = [d1, d2]) { } >x128 : Symbol(x128, Decl(generatedContextualTyping.ts, 131, 42)) >parm : Symbol(parm, Decl(generatedContextualTyping.ts, 132, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -1107,7 +1107,7 @@ function x139(): Base[] { return [d1, d2]; } function x140(): Array { return [d1, d2]; } >x140 : Symbol(x140, Decl(generatedContextualTyping.ts, 143, 44)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -1206,7 +1206,7 @@ function x151(): Base[] { return [d1, d2]; return [d1, d2]; } function x152(): Array { return [d1, d2]; return [d1, d2]; } >x152 : Symbol(x152, Decl(generatedContextualTyping.ts, 155, 61)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -1303,7 +1303,7 @@ var x163: () => Base[] = () => { return [d1, d2]; }; var x164: () => Array = () => { return [d1, d2]; }; >x164 : Symbol(x164, Decl(generatedContextualTyping.ts, 168, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -1386,7 +1386,7 @@ var x175: () => Base[] = function() { return [d1, d2]; }; var x176: () => Array = function() { return [d1, d2]; }; >x176 : Symbol(x176, Decl(generatedContextualTyping.ts, 180, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -1477,7 +1477,7 @@ module x187 { var t: Base[] = [d1, d2]; } module x188 { var t: Array = [d1, d2]; } >x188 : Symbol(x188, Decl(generatedContextualTyping.ts, 191, 41)) >t : Symbol(t, Decl(generatedContextualTyping.ts, 192, 17)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -1572,7 +1572,7 @@ module x199 { export var t: Base[] = [d1, d2]; } module x200 { export var t: Array = [d1, d2]; } >x200 : Symbol(x200, Decl(generatedContextualTyping.ts, 203, 48)) >t : Symbol(t, Decl(generatedContextualTyping.ts, 204, 24)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -1647,7 +1647,7 @@ var x211 = [d1, d2]; var x212 = >[d1, d2]; >x212 : Symbol(x212, Decl(generatedContextualTyping.ts, 214, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -1715,7 +1715,7 @@ var x221 = (undefined) || [d1, d2]; var x222 = (>undefined) || [d1, d2]; >x222 : Symbol(x222, Decl(generatedContextualTyping.ts, 223, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >undefined : Symbol(undefined) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) @@ -1791,7 +1791,7 @@ var x231: Base[]; x231 = [d1, d2]; var x232: Array; x232 = [d1, d2]; >x232 : Symbol(x232, Decl(generatedContextualTyping.ts, 233, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >x232 : Symbol(x232, Decl(generatedContextualTyping.ts, 233, 3)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) @@ -1894,7 +1894,7 @@ var x243: { n: Base[]; } = { n: [d1, d2] }; var x244: { n: Array; } = { n: [d1, d2] }; >x244 : Symbol(x244, Decl(generatedContextualTyping.ts, 245, 3)) >n : Symbol(n, Decl(generatedContextualTyping.ts, 245, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >n : Symbol(n, Decl(generatedContextualTyping.ts, 245, 33)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) @@ -1967,7 +1967,7 @@ var x255: Base[][] = [[d1, d2]]; var x256: Array[] = [[d1, d2]]; >x256 : Symbol(x256, Decl(generatedContextualTyping.ts, 254, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -2035,7 +2035,7 @@ var x265: Base[] = [d1, d2] || undefined; var x266: Array = [d1, d2] || undefined; >x266 : Symbol(x266, Decl(generatedContextualTyping.ts, 263, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -2097,7 +2097,7 @@ var x273: Base[] = undefined || [d1, d2]; var x274: Array = undefined || [d1, d2]; >x274 : Symbol(x274, Decl(generatedContextualTyping.ts, 271, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >undefined : Symbol(undefined) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) @@ -2166,7 +2166,7 @@ var x281: Base[] = [d1, d2] || [d1, d2]; var x282: Array = [d1, d2] || [d1, d2]; >x282 : Symbol(x282, Decl(generatedContextualTyping.ts, 279, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -2255,7 +2255,7 @@ var x291: Base[] = true ? [d1, d2] : [d1, d2]; var x292: Array = true ? [d1, d2] : [d1, d2]; >x292 : Symbol(x292, Decl(generatedContextualTyping.ts, 289, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -2359,7 +2359,7 @@ var x303: Base[] = true ? undefined : [d1, d2]; var x304: Array = true ? undefined : [d1, d2]; >x304 : Symbol(x304, Decl(generatedContextualTyping.ts, 301, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >undefined : Symbol(undefined) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) @@ -2454,7 +2454,7 @@ var x315: Base[] = true ? [d1, d2] : undefined; var x316: Array = true ? [d1, d2] : undefined; >x316 : Symbol(x316, Decl(generatedContextualTyping.ts, 313, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) >d2 : Symbol(d2, Decl(generatedContextualTyping.ts, 4, 40)) @@ -2557,7 +2557,7 @@ function x327(n: Base[]) { }; x327([d1, d2]); function x328(n: Array) { }; x328([d1, d2]); >x328 : Symbol(x328, Decl(generatedContextualTyping.ts, 324, 45)) >n : Symbol(n, Decl(generatedContextualTyping.ts, 325, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >x328 : Symbol(x328, Decl(generatedContextualTyping.ts, 324, 45)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) @@ -2671,7 +2671,7 @@ var x339 = (n: Base[]) => n; x339([d1, d2]); var x340 = (n: Array) => n; x340([d1, d2]); >x340 : Symbol(x340, Decl(generatedContextualTyping.ts, 337, 3)) >n : Symbol(n, Decl(generatedContextualTyping.ts, 337, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >n : Symbol(n, Decl(generatedContextualTyping.ts, 337, 12)) >x340 : Symbol(x340, Decl(generatedContextualTyping.ts, 337, 3)) @@ -2783,7 +2783,7 @@ var x351 = function(n: Base[]) { }; x351([d1, d2]); var x352 = function(n: Array) { }; x352([d1, d2]); >x352 : Symbol(x352, Decl(generatedContextualTyping.ts, 349, 3)) >n : Symbol(n, Decl(generatedContextualTyping.ts, 349, 20)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(generatedContextualTyping.ts, 0, 0)) >x352 : Symbol(x352, Decl(generatedContextualTyping.ts, 349, 3)) >d1 : Symbol(d1, Decl(generatedContextualTyping.ts, 4, 19)) diff --git a/tests/baselines/reference/generatorES6_6.symbols b/tests/baselines/reference/generatorES6_6.symbols index f424048eeec..96b8b861c8b 100644 --- a/tests/baselines/reference/generatorES6_6.symbols +++ b/tests/baselines/reference/generatorES6_6.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(generatorES6_6.ts, 0, 0)) *[Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) let a = yield 1; >a : Symbol(a, Decl(generatorES6_6.ts, 2, 7)) diff --git a/tests/baselines/reference/generatorOverloads4.symbols b/tests/baselines/reference/generatorOverloads4.symbols index 233af97ee59..341ba9c4a0d 100644 --- a/tests/baselines/reference/generatorOverloads4.symbols +++ b/tests/baselines/reference/generatorOverloads4.symbols @@ -5,15 +5,15 @@ class C { f(s: string): Iterable; >f : Symbol(f, Decl(generatorOverloads4.ts, 0, 9), Decl(generatorOverloads4.ts, 1, 32), Decl(generatorOverloads4.ts, 2, 32)) >s : Symbol(s, Decl(generatorOverloads4.ts, 1, 6)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) f(s: number): Iterable; >f : Symbol(f, Decl(generatorOverloads4.ts, 0, 9), Decl(generatorOverloads4.ts, 1, 32), Decl(generatorOverloads4.ts, 2, 32)) >s : Symbol(s, Decl(generatorOverloads4.ts, 2, 6)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) *f(s: any): Iterable { } >f : Symbol(f, Decl(generatorOverloads4.ts, 0, 9), Decl(generatorOverloads4.ts, 1, 32), Decl(generatorOverloads4.ts, 2, 32)) >s : Symbol(s, Decl(generatorOverloads4.ts, 3, 7)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/generatorOverloads5.symbols b/tests/baselines/reference/generatorOverloads5.symbols index e3b14d76cd0..07de0c87f51 100644 --- a/tests/baselines/reference/generatorOverloads5.symbols +++ b/tests/baselines/reference/generatorOverloads5.symbols @@ -5,15 +5,15 @@ module M { function f(s: string): Iterable; >f : Symbol(f, Decl(generatorOverloads5.ts, 0, 10), Decl(generatorOverloads5.ts, 1, 41), Decl(generatorOverloads5.ts, 2, 41)) >s : Symbol(s, Decl(generatorOverloads5.ts, 1, 15)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) function f(s: number): Iterable; >f : Symbol(f, Decl(generatorOverloads5.ts, 0, 10), Decl(generatorOverloads5.ts, 1, 41), Decl(generatorOverloads5.ts, 2, 41)) >s : Symbol(s, Decl(generatorOverloads5.ts, 2, 15)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) function* f(s: any): Iterable { } >f : Symbol(f, Decl(generatorOverloads5.ts, 0, 10), Decl(generatorOverloads5.ts, 1, 41), Decl(generatorOverloads5.ts, 2, 41)) >s : Symbol(s, Decl(generatorOverloads5.ts, 3, 16)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/generatorTypeCheck1.symbols b/tests/baselines/reference/generatorTypeCheck1.symbols index 3353182c7db..b9456ccba48 100644 --- a/tests/baselines/reference/generatorTypeCheck1.symbols +++ b/tests/baselines/reference/generatorTypeCheck1.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck1.ts === function* g1(): Iterator { } >g1 : Symbol(g1, Decl(generatorTypeCheck1.ts, 0, 0)) ->Iterator : Symbol(Iterator, Decl(lib.d.ts, 4390, 1)) +>Iterator : Symbol(Iterator, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/generatorTypeCheck10.symbols b/tests/baselines/reference/generatorTypeCheck10.symbols index 9dc3d726f8d..2112a9b1ebc 100644 --- a/tests/baselines/reference/generatorTypeCheck10.symbols +++ b/tests/baselines/reference/generatorTypeCheck10.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck10.ts === function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck10.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) return; } diff --git a/tests/baselines/reference/generatorTypeCheck11.symbols b/tests/baselines/reference/generatorTypeCheck11.symbols index fabd19cd199..439b97caa7f 100644 --- a/tests/baselines/reference/generatorTypeCheck11.symbols +++ b/tests/baselines/reference/generatorTypeCheck11.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck11.ts === function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck11.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) return 0; } diff --git a/tests/baselines/reference/generatorTypeCheck12.symbols b/tests/baselines/reference/generatorTypeCheck12.symbols index 4fe733933bb..1c7661a06cf 100644 --- a/tests/baselines/reference/generatorTypeCheck12.symbols +++ b/tests/baselines/reference/generatorTypeCheck12.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck12.ts === function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck12.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) return ""; } diff --git a/tests/baselines/reference/generatorTypeCheck13.symbols b/tests/baselines/reference/generatorTypeCheck13.symbols index 8a720da6ee5..7d9587e5ac9 100644 --- a/tests/baselines/reference/generatorTypeCheck13.symbols +++ b/tests/baselines/reference/generatorTypeCheck13.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck13.ts === function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck13.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) yield 0; return ""; diff --git a/tests/baselines/reference/generatorTypeCheck17.symbols b/tests/baselines/reference/generatorTypeCheck17.symbols index 28c4bb60055..523579dd47b 100644 --- a/tests/baselines/reference/generatorTypeCheck17.symbols +++ b/tests/baselines/reference/generatorTypeCheck17.symbols @@ -10,7 +10,7 @@ class Bar extends Foo { y: string } function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck17.ts, 1, 35)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(generatorTypeCheck17.ts, 0, 0)) yield; diff --git a/tests/baselines/reference/generatorTypeCheck19.symbols b/tests/baselines/reference/generatorTypeCheck19.symbols index 0c6bbbb462e..b74b5f727a6 100644 --- a/tests/baselines/reference/generatorTypeCheck19.symbols +++ b/tests/baselines/reference/generatorTypeCheck19.symbols @@ -10,7 +10,7 @@ class Bar extends Foo { y: string } function* g(): IterableIterator { >g : Symbol(g, Decl(generatorTypeCheck19.ts, 1, 35)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(generatorTypeCheck19.ts, 0, 0)) yield; diff --git a/tests/baselines/reference/generatorTypeCheck2.symbols b/tests/baselines/reference/generatorTypeCheck2.symbols index 99d9a0f0505..5741e089d1b 100644 --- a/tests/baselines/reference/generatorTypeCheck2.symbols +++ b/tests/baselines/reference/generatorTypeCheck2.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck2.ts === function* g1(): Iterable { } >g1 : Symbol(g1, Decl(generatorTypeCheck2.ts, 0, 0)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/generatorTypeCheck26.symbols b/tests/baselines/reference/generatorTypeCheck26.symbols index f2c13cf6199..2f2c27d2810 100644 --- a/tests/baselines/reference/generatorTypeCheck26.symbols +++ b/tests/baselines/reference/generatorTypeCheck26.symbols @@ -1,20 +1,20 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck26.ts === function* g(): IterableIterator<(x: string) => number> { >g : Symbol(g, Decl(generatorTypeCheck26.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck26.ts, 0, 33)) yield x => x.length; >x : Symbol(x, Decl(generatorTypeCheck26.ts, 1, 9)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck26.ts, 1, 9)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) yield *[x => x.length]; >x : Symbol(x, Decl(generatorTypeCheck26.ts, 2, 12)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck26.ts, 2, 12)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return x => x.length; >x : Symbol(x, Decl(generatorTypeCheck26.ts, 3, 10)) diff --git a/tests/baselines/reference/generatorTypeCheck27.symbols b/tests/baselines/reference/generatorTypeCheck27.symbols index e05147aa4b5..27c5cbf5db8 100644 --- a/tests/baselines/reference/generatorTypeCheck27.symbols +++ b/tests/baselines/reference/generatorTypeCheck27.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck27.ts === function* g(): IterableIterator<(x: string) => number> { >g : Symbol(g, Decl(generatorTypeCheck27.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck27.ts, 0, 33)) yield * function* () { diff --git a/tests/baselines/reference/generatorTypeCheck28.symbols b/tests/baselines/reference/generatorTypeCheck28.symbols index b157d464292..a7e799679d7 100644 --- a/tests/baselines/reference/generatorTypeCheck28.symbols +++ b/tests/baselines/reference/generatorTypeCheck28.symbols @@ -1,20 +1,20 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck28.ts === function* g(): IterableIterator<(x: string) => number> { >g : Symbol(g, Decl(generatorTypeCheck28.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck28.ts, 0, 33)) yield * { *[Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) yield x => x.length; >x : Symbol(x, Decl(generatorTypeCheck28.ts, 3, 17)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck28.ts, 3, 17)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } }; } diff --git a/tests/baselines/reference/generatorTypeCheck29.symbols b/tests/baselines/reference/generatorTypeCheck29.symbols index 54a5cc0fdb6..4b332f6c86b 100644 --- a/tests/baselines/reference/generatorTypeCheck29.symbols +++ b/tests/baselines/reference/generatorTypeCheck29.symbols @@ -1,8 +1,8 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck29.ts === function* g2(): Iterator number>> { >g2 : Symbol(g2, Decl(generatorTypeCheck29.ts, 0, 0)) ->Iterator : Symbol(Iterator, Decl(lib.d.ts, 4390, 1)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterator : Symbol(Iterator, Decl(lib.d.ts, --, --)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck29.ts, 0, 35)) yield function* () { diff --git a/tests/baselines/reference/generatorTypeCheck3.symbols b/tests/baselines/reference/generatorTypeCheck3.symbols index 5fdef53c6f3..6e97cd6f280 100644 --- a/tests/baselines/reference/generatorTypeCheck3.symbols +++ b/tests/baselines/reference/generatorTypeCheck3.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck3.ts === function* g1(): IterableIterator { } >g1 : Symbol(g1, Decl(generatorTypeCheck3.ts, 0, 0)) ->IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, 4400, 1)) +>IterableIterator : Symbol(IterableIterator, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/generatorTypeCheck30.symbols b/tests/baselines/reference/generatorTypeCheck30.symbols index d107c4bde19..3c56fde9039 100644 --- a/tests/baselines/reference/generatorTypeCheck30.symbols +++ b/tests/baselines/reference/generatorTypeCheck30.symbols @@ -1,8 +1,8 @@ === tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck30.ts === function* g2(): Iterator number>> { >g2 : Symbol(g2, Decl(generatorTypeCheck30.ts, 0, 0)) ->Iterator : Symbol(Iterator, Decl(lib.d.ts, 4390, 1)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterator : Symbol(Iterator, Decl(lib.d.ts, --, --)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck30.ts, 0, 35)) yield function* () { diff --git a/tests/baselines/reference/generatorTypeCheck45.symbols b/tests/baselines/reference/generatorTypeCheck45.symbols index bb24ffb1eb6..a637f154dc4 100644 --- a/tests/baselines/reference/generatorTypeCheck45.symbols +++ b/tests/baselines/reference/generatorTypeCheck45.symbols @@ -6,7 +6,7 @@ declare function foo(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) >x : Symbol(x, Decl(generatorTypeCheck45.ts, 0, 27)) >T : Symbol(T, Decl(generatorTypeCheck45.ts, 0, 21)) >fun : Symbol(fun, Decl(generatorTypeCheck45.ts, 0, 32)) ->Iterator : Symbol(Iterator, Decl(lib.d.ts, 4390, 1)) +>Iterator : Symbol(Iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck45.ts, 0, 54)) >T : Symbol(T, Decl(generatorTypeCheck45.ts, 0, 21)) >U : Symbol(U, Decl(generatorTypeCheck45.ts, 0, 23)) @@ -19,9 +19,9 @@ declare function foo(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) foo("", function* () { yield x => x.length }, p => undefined); // T is fixed, should be string >foo : Symbol(foo, Decl(generatorTypeCheck45.ts, 0, 0)) >x : Symbol(x, Decl(generatorTypeCheck45.ts, 2, 28)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck45.ts, 2, 28)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(generatorTypeCheck45.ts, 2, 45)) >undefined : Symbol(undefined) diff --git a/tests/baselines/reference/generatorTypeCheck46.symbols b/tests/baselines/reference/generatorTypeCheck46.symbols index a6dd01be70f..abb170b12a7 100644 --- a/tests/baselines/reference/generatorTypeCheck46.symbols +++ b/tests/baselines/reference/generatorTypeCheck46.symbols @@ -6,7 +6,7 @@ declare function foo(x: T, fun: () => Iterable<(x: T) => U>, fun2: (y: U) >x : Symbol(x, Decl(generatorTypeCheck46.ts, 0, 27)) >T : Symbol(T, Decl(generatorTypeCheck46.ts, 0, 21)) >fun : Symbol(fun, Decl(generatorTypeCheck46.ts, 0, 32)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck46.ts, 0, 54)) >T : Symbol(T, Decl(generatorTypeCheck46.ts, 0, 21)) >U : Symbol(U, Decl(generatorTypeCheck46.ts, 0, 23)) @@ -21,15 +21,15 @@ foo("", function* () { yield* { *[Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) yield x => x.length >x : Symbol(x, Decl(generatorTypeCheck46.ts, 5, 17)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(generatorTypeCheck46.ts, 5, 17)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } } }, p => undefined); // T is fixed, should be string diff --git a/tests/baselines/reference/genericArray1.symbols b/tests/baselines/reference/genericArray1.symbols index b403bd2b720..b73872b8d55 100644 --- a/tests/baselines/reference/genericArray1.symbols +++ b/tests/baselines/reference/genericArray1.symbols @@ -13,10 +13,10 @@ interface String{ var lengths = ["a", "b", "c"].map(x => x.length); >lengths : Symbol(lengths, Decl(genericArray1.ts, 12, 3)) ->["a", "b", "c"].map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>["a", "b", "c"].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericArray1.ts, 12, 34)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericArray1.ts, 12, 34)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/genericCallWithArrayLiteralArgs.symbols b/tests/baselines/reference/genericCallWithArrayLiteralArgs.symbols index 49ccf7ad595..e7a52c5e264 100644 --- a/tests/baselines/reference/genericCallWithArrayLiteralArgs.symbols +++ b/tests/baselines/reference/genericCallWithArrayLiteralArgs.symbols @@ -40,5 +40,5 @@ var r5 = foo([1, '']); // any[] var r6 = foo([1, '']); // Object[] >r6 : Symbol(r6, Decl(genericCallWithArrayLiteralArgs.ts, 11, 3)) >foo : Symbol(foo, Decl(genericCallWithArrayLiteralArgs.ts, 0, 0)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.symbols b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.symbols index 14a91401efb..3824029dfec 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.symbols +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndIndexers.symbols @@ -16,11 +16,11 @@ var a: { [x: string]: Object; >x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexers.ts, 7, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) [x: number]: Date; >x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexers.ts, 8, 5)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) }; var r = foo(a); @@ -31,7 +31,7 @@ var r = foo(a); function other(arg: T) { >other : Symbol(other, Decl(genericCallWithObjectTypeArgsAndIndexers.ts, 10, 15)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexers.ts, 12, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg : Symbol(arg, Decl(genericCallWithObjectTypeArgsAndIndexers.ts, 12, 31)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndIndexers.ts, 12, 15)) @@ -40,7 +40,7 @@ function other(arg: T) { [x: string]: Object; >x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexers.ts, 14, 9)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) [x: number]: T >x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndIndexers.ts, 15, 9)) diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.symbols b/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.symbols index 77787e77299..4e7622d3d81 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.symbols +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndNumericIndexer.symbols @@ -14,7 +14,7 @@ function foo(x: T) { var a: { [x: number]: Date }; >a : Symbol(a, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 6, 3)) >x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 6, 10)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r = foo(a); >r : Symbol(r, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 7, 3)) @@ -41,7 +41,7 @@ function other(arg: T) { function other2(arg: T) { >other2 : Symbol(other2, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 12, 1)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 14, 16)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg : Symbol(arg, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 14, 32)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 14, 16)) @@ -63,9 +63,9 @@ function other2(arg: T) { function other3(arg: T) { >other3 : Symbol(other3, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 18, 1)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 20, 16)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >U : Symbol(U, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 20, 31)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg : Symbol(arg, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 20, 48)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndNumericIndexer.ts, 20, 16)) diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.symbols b/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.symbols index 62b7c82b8e3..932cedf148e 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.symbols +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndStringIndexer.symbols @@ -14,7 +14,7 @@ function foo(x: T) { var a: { [x: string]: Date }; >a : Symbol(a, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 6, 3)) >x : Symbol(x, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 6, 10)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r = foo(a); >r : Symbol(r, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 7, 3)) @@ -41,7 +41,7 @@ function other(arg: T) { function other2(arg: T) { >other2 : Symbol(other2, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 12, 1)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 14, 16)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg : Symbol(arg, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 14, 32)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 14, 16)) @@ -57,16 +57,16 @@ function other2(arg: T) { var d: Date = r2['hm']; // ok >d : Symbol(d, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 17, 7)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >r2 : Symbol(r2, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 16, 7)) } function other3(arg: T) { >other3 : Symbol(other3, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 18, 1)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 20, 16)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >U : Symbol(U, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 20, 31)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arg : Symbol(arg, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 20, 48)) >T : Symbol(T, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 20, 16)) @@ -82,7 +82,7 @@ function other3(arg: T) { var d: Date = r2['hm']; // ok >d : Symbol(d, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 23, 7)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >r2 : Symbol(r2, Decl(genericCallWithObjectTypeArgsAndStringIndexer.ts, 22, 7)) // BUG 821629 diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.symbols b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.symbols index 3ce4f709b7d..68df4a89b36 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.symbols +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes.symbols @@ -11,7 +11,7 @@ declare module EndGate { } interface Number extends EndGate.ICloneable { } ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 4, 1)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 4, 1)) >EndGate.ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 24)) >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 17, 1)) >ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 24)) diff --git a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.symbols b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.symbols index be96d92c357..c5e9f0a79f5 100644 --- a/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.symbols +++ b/tests/baselines/reference/genericConstraintOnExtendedBuiltinTypes2.symbols @@ -11,7 +11,7 @@ module EndGate { } interface Number extends EndGate.ICloneable { } ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 4, 1)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 4, 1)) >EndGate.ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 16)) >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 16, 1)) >ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 16)) @@ -51,7 +51,7 @@ module EndGate.Tweening { export class NumberTween extends Tween{ >NumberTween : Symbol(NumberTween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 25)) >Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 4, 1)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 4, 1)) constructor(from: number) { >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 20, 20)) diff --git a/tests/baselines/reference/genericContextualTypingSpecialization.symbols b/tests/baselines/reference/genericContextualTypingSpecialization.symbols index 05312d889c9..b244ab496be 100644 --- a/tests/baselines/reference/genericContextualTypingSpecialization.symbols +++ b/tests/baselines/reference/genericContextualTypingSpecialization.symbols @@ -3,9 +3,9 @@ var b: number[]; >b : Symbol(b, Decl(genericContextualTypingSpecialization.ts, 0, 3)) b.reduce((c, d) => c + d, 0); // should not error on '+' ->b.reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) +>b.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(genericContextualTypingSpecialization.ts, 0, 3)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >c : Symbol(c, Decl(genericContextualTypingSpecialization.ts, 1, 18)) >d : Symbol(d, Decl(genericContextualTypingSpecialization.ts, 1, 20)) >c : Symbol(c, Decl(genericContextualTypingSpecialization.ts, 1, 18)) diff --git a/tests/baselines/reference/genericFunctionSpecializations1.symbols b/tests/baselines/reference/genericFunctionSpecializations1.symbols index e3c21ea418b..aaf607cbd47 100644 --- a/tests/baselines/reference/genericFunctionSpecializations1.symbols +++ b/tests/baselines/reference/genericFunctionSpecializations1.symbols @@ -18,7 +18,7 @@ function foo4(test: string); // valid function foo4(test: T) { } >foo4 : Symbol(foo4, Decl(genericFunctionSpecializations1.ts, 1, 29), Decl(genericFunctionSpecializations1.ts, 3, 31)) >T : Symbol(T, Decl(genericFunctionSpecializations1.ts, 4, 14)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >test : Symbol(test, Decl(genericFunctionSpecializations1.ts, 4, 32)) >T : Symbol(T, Decl(genericFunctionSpecializations1.ts, 4, 14)) diff --git a/tests/baselines/reference/genericFunctions2.symbols b/tests/baselines/reference/genericFunctions2.symbols index 59068cbd8dd..246f59c8e8a 100644 --- a/tests/baselines/reference/genericFunctions2.symbols +++ b/tests/baselines/reference/genericFunctions2.symbols @@ -19,8 +19,8 @@ var lengths = map(myItems, x => x.length); >map : Symbol(map, Decl(genericFunctions2.ts, 0, 0)) >myItems : Symbol(myItems, Decl(genericFunctions2.ts, 2, 3)) >x : Symbol(x, Decl(genericFunctions2.ts, 3, 26)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericFunctions2.ts, 3, 26)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/genericFunctionsWithOptionalParameters1.symbols b/tests/baselines/reference/genericFunctionsWithOptionalParameters1.symbols index fa04763f2ab..fd79d736ffd 100644 --- a/tests/baselines/reference/genericFunctionsWithOptionalParameters1.symbols +++ b/tests/baselines/reference/genericFunctionsWithOptionalParameters1.symbols @@ -7,7 +7,7 @@ interface Utils { >T : Symbol(T, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 8)) >S : Symbol(S, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 10)) >c : Symbol(c, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 8)) >folder : Symbol(folder, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 27)) >s : Symbol(s, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 38)) diff --git a/tests/baselines/reference/genericFunctionsWithOptionalParameters3.symbols b/tests/baselines/reference/genericFunctionsWithOptionalParameters3.symbols index 2fe7e295a0d..d033f7b66bb 100644 --- a/tests/baselines/reference/genericFunctionsWithOptionalParameters3.symbols +++ b/tests/baselines/reference/genericFunctionsWithOptionalParameters3.symbols @@ -63,7 +63,7 @@ var r3 = utils.mapReduce(c, (x) => { return 1 }, (y) => { return new Date() }); >c : Symbol(c, Decl(genericFunctionsWithOptionalParameters3.ts, 8, 3)) >x : Symbol(x, Decl(genericFunctionsWithOptionalParameters3.ts, 9, 29)) >y : Symbol(y, Decl(genericFunctionsWithOptionalParameters3.ts, 9, 50)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r4 = utils.mapReduce(c, (x: string) => { return 1 }, (y: number) => { return new Date() }); >r4 : Symbol(r4, Decl(genericFunctionsWithOptionalParameters3.ts, 10, 3)) @@ -73,7 +73,7 @@ var r4 = utils.mapReduce(c, (x: string) => { return 1 }, (y: number) => { return >c : Symbol(c, Decl(genericFunctionsWithOptionalParameters3.ts, 8, 3)) >x : Symbol(x, Decl(genericFunctionsWithOptionalParameters3.ts, 10, 29)) >y : Symbol(y, Decl(genericFunctionsWithOptionalParameters3.ts, 10, 58)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var f1 = (x: string) => { return 1 }; >f1 : Symbol(f1, Decl(genericFunctionsWithOptionalParameters3.ts, 11, 3)) @@ -82,7 +82,7 @@ var f1 = (x: string) => { return 1 }; var f2 = (y: number) => { return new Date() }; >f2 : Symbol(f2, Decl(genericFunctionsWithOptionalParameters3.ts, 12, 3)) >y : Symbol(y, Decl(genericFunctionsWithOptionalParameters3.ts, 12, 10)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r5 = utils.mapReduce(c, f1, f2); >r5 : Symbol(r5, Decl(genericFunctionsWithOptionalParameters3.ts, 13, 3)) diff --git a/tests/baselines/reference/genericInference1.symbols b/tests/baselines/reference/genericInference1.symbols index 6980668c6eb..8beecf27254 100644 --- a/tests/baselines/reference/genericInference1.symbols +++ b/tests/baselines/reference/genericInference1.symbols @@ -1,9 +1,9 @@ === tests/cases/compiler/genericInference1.ts === ['a', 'b', 'c'].map(x => x.length); ->['a', 'b', 'c'].map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>['a', 'b', 'c'].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericInference1.ts, 0, 20)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericInference1.ts, 0, 20)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/genericInference2.symbols b/tests/baselines/reference/genericInference2.symbols index 83b371005f7..52b80747cb9 100644 --- a/tests/baselines/reference/genericInference2.symbols +++ b/tests/baselines/reference/genericInference2.symbols @@ -49,11 +49,11 @@ }; var x_v = o.name().length; // should be 'number' >x_v : Symbol(x_v, Decl(genericInference2.ts, 14, 7)) ->o.name().length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>o.name().length : Symbol(String.length, Decl(lib.d.ts, --, --)) >o.name : Symbol(name, Decl(genericInference2.ts, 10, 13)) >o : Symbol(o, Decl(genericInference2.ts, 10, 7)) >name : Symbol(name, Decl(genericInference2.ts, 10, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) var age_v = o.age(); // should be 'number' >age_v : Symbol(age_v, Decl(genericInference2.ts, 15, 7)) diff --git a/tests/baselines/reference/genericMethodOverspecialization.symbols b/tests/baselines/reference/genericMethodOverspecialization.symbols index 651aced0fcd..808addf068c 100644 --- a/tests/baselines/reference/genericMethodOverspecialization.symbols +++ b/tests/baselines/reference/genericMethodOverspecialization.symbols @@ -27,9 +27,9 @@ interface Document { var elements = names.map(function (name) { >elements : Symbol(elements, Decl(genericMethodOverspecialization.ts, 12, 3)) ->names.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>names.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >names : Symbol(names, Decl(genericMethodOverspecialization.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(genericMethodOverspecialization.ts, 12, 35)) return document.getElementById(name); @@ -43,9 +43,9 @@ var elements = names.map(function (name) { var xxx = elements.filter(function (e) { >xxx : Symbol(xxx, Decl(genericMethodOverspecialization.ts, 17, 3)) ->elements.filter : Symbol(Array.filter, Decl(lib.d.ts, 1122, 87)) +>elements.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --)) >elements : Symbol(elements, Decl(genericMethodOverspecialization.ts, 12, 3)) ->filter : Symbol(Array.filter, Decl(lib.d.ts, 1122, 87)) +>filter : Symbol(Array.filter, Decl(lib.d.ts, --, --)) >e : Symbol(e, Decl(genericMethodOverspecialization.ts, 17, 36)) return !e.isDisabled; @@ -57,9 +57,9 @@ var xxx = elements.filter(function (e) { var widths:number[] = elements.map(function (e) { // should not error >widths : Symbol(widths, Decl(genericMethodOverspecialization.ts, 21, 3)) ->elements.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>elements.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >elements : Symbol(elements, Decl(genericMethodOverspecialization.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >e : Symbol(e, Decl(genericMethodOverspecialization.ts, 21, 45)) return e.clientWidth; diff --git a/tests/baselines/reference/genericTypeParameterEquivalence2.symbols b/tests/baselines/reference/genericTypeParameterEquivalence2.symbols index 056b4ce96ab..cd558fdd10a 100644 --- a/tests/baselines/reference/genericTypeParameterEquivalence2.symbols +++ b/tests/baselines/reference/genericTypeParameterEquivalence2.symbols @@ -24,9 +24,9 @@ function compose(f: (b: B) => C, g: (a:A) => B): (a:A) => C { return f(g.apply(null, a)); >f : Symbol(f, Decl(genericTypeParameterEquivalence2.ts, 1, 26)) ->g.apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>g.apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) >g : Symbol(g, Decl(genericTypeParameterEquivalence2.ts, 1, 41)) ->apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(genericTypeParameterEquivalence2.ts, 2, 21)) }; @@ -46,9 +46,9 @@ function forEach(list: A[], f: (a: A, n?: number) => void ): void { for (var i = 0; i < list.length; ++i) { >i : Symbol(i, Decl(genericTypeParameterEquivalence2.ts, 9, 12)) >i : Symbol(i, Decl(genericTypeParameterEquivalence2.ts, 9, 12)) ->list.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>list.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >list : Symbol(list, Decl(genericTypeParameterEquivalence2.ts, 8, 20)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(genericTypeParameterEquivalence2.ts, 9, 12)) f(list[i], i); @@ -83,9 +83,9 @@ function filter(f: (a: A) => boolean, ar: A[]): A[] { >el : Symbol(el, Decl(genericTypeParameterEquivalence2.ts, 17, 17)) ret.push(el); ->ret.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>ret.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >ret : Symbol(ret, Decl(genericTypeParameterEquivalence2.ts, 16, 7)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >el : Symbol(el, Decl(genericTypeParameterEquivalence2.ts, 17, 17)) } } ); @@ -102,9 +102,9 @@ function length2(ar: A[]): number { >A : Symbol(A, Decl(genericTypeParameterEquivalence2.ts, 27, 17)) return ar.length; ->ar.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>ar.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >ar : Symbol(ar, Decl(genericTypeParameterEquivalence2.ts, 27, 20)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) } // curry1 :: ((a,b)->c) -> (a->(b->c)) diff --git a/tests/baselines/reference/getterSetterNonAccessor.symbols b/tests/baselines/reference/getterSetterNonAccessor.symbols index 10ffc55480c..f10542c0a0c 100644 --- a/tests/baselines/reference/getterSetterNonAccessor.symbols +++ b/tests/baselines/reference/getterSetterNonAccessor.symbols @@ -7,10 +7,10 @@ function setFunc(v){} >v : Symbol(v, Decl(getterSetterNonAccessor.ts, 1, 17)) Object.defineProperty({}, "0", ({ ->Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.d.ts, 160, 60)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.d.ts, 160, 60)) ->PropertyDescriptor : Symbol(PropertyDescriptor, Decl(lib.d.ts, 79, 66)) +>Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.d.ts, --, --)) +>PropertyDescriptor : Symbol(PropertyDescriptor, Decl(lib.d.ts, --, --)) get: getFunc, >get : Symbol(get, Decl(getterSetterNonAccessor.ts, 3, 53)) diff --git a/tests/baselines/reference/globalThis.symbols b/tests/baselines/reference/globalThis.symbols index 77b65bbfa2b..6ca1054f1af 100644 --- a/tests/baselines/reference/globalThis.symbols +++ b/tests/baselines/reference/globalThis.symbols @@ -1,7 +1,7 @@ === tests/cases/compiler/globalThis.ts === var __e = Math.E; // should not generate 'this.Math.E' >__e : Symbol(__e, Decl(globalThis.ts, 0, 3)) ->Math.E : Symbol(Math.E, Decl(lib.d.ts, 524, 16)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->E : Symbol(Math.E, Decl(lib.d.ts, 524, 16)) +>Math.E : Symbol(Math.E, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>E : Symbol(Math.E, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/heterogeneousArrayLiterals.symbols b/tests/baselines/reference/heterogeneousArrayLiterals.symbols index c7a73d56414..c1d98b5873a 100644 --- a/tests/baselines/reference/heterogeneousArrayLiterals.symbols +++ b/tests/baselines/reference/heterogeneousArrayLiterals.symbols @@ -15,7 +15,7 @@ var d = [{}, 1]; // {}[] var e = [{}, Object]; // {}[] >e : Symbol(e, Decl(heterogeneousArrayLiterals.ts, 6, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var f = [[], [1]]; // number[][] >f : Symbol(f, Decl(heterogeneousArrayLiterals.ts, 8, 3)) diff --git a/tests/baselines/reference/ifDoWhileStatements.symbols b/tests/baselines/reference/ifDoWhileStatements.symbols index 36a990010ef..e2b375cb54b 100644 --- a/tests/baselines/reference/ifDoWhileStatements.symbols +++ b/tests/baselines/reference/ifDoWhileStatements.symbols @@ -67,9 +67,9 @@ module M { export function F2(x: number): string { return x.toString(); } >F2 : Symbol(F2, Decl(ifDoWhileStatements.ts, 25, 5)) >x : Symbol(x, Decl(ifDoWhileStatements.ts, 27, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(ifDoWhileStatements.ts, 27, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } module N { @@ -85,9 +85,9 @@ module N { export function F2(x: number): string { return x.toString(); } >F2 : Symbol(F2, Decl(ifDoWhileStatements.ts, 33, 5)) >x : Symbol(x, Decl(ifDoWhileStatements.ts, 35, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(ifDoWhileStatements.ts, 35, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } // literals diff --git a/tests/baselines/reference/implementArrayInterface.symbols b/tests/baselines/reference/implementArrayInterface.symbols index 97d106157fe..5a671d41de3 100644 --- a/tests/baselines/reference/implementArrayInterface.symbols +++ b/tests/baselines/reference/implementArrayInterface.symbols @@ -2,7 +2,7 @@ declare class MyArray implements Array { >MyArray : Symbol(MyArray, Decl(implementArrayInterface.ts, 0, 0)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) toString(): string; diff --git a/tests/baselines/reference/indexer3.symbols b/tests/baselines/reference/indexer3.symbols index 1de91806faa..fa6f905def6 100644 --- a/tests/baselines/reference/indexer3.symbols +++ b/tests/baselines/reference/indexer3.symbols @@ -2,10 +2,10 @@ var dateMap: { [x: string]: Date; } = {} >dateMap : Symbol(dateMap, Decl(indexer3.ts, 0, 3)) >x : Symbol(x, Decl(indexer3.ts, 0, 16)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r: Date = dateMap["hello"] // result type includes indexer using BCT >r : Symbol(r, Decl(indexer3.ts, 1, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >dateMap : Symbol(dateMap, Decl(indexer3.ts, 0, 3)) diff --git a/tests/baselines/reference/indexersInClassType.symbols b/tests/baselines/reference/indexersInClassType.symbols index e459888cc0d..0852463c37d 100644 --- a/tests/baselines/reference/indexersInClassType.symbols +++ b/tests/baselines/reference/indexersInClassType.symbols @@ -4,14 +4,14 @@ class C { [x: number]: Date; >x : Symbol(x, Decl(indexersInClassType.ts, 1, 5)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) [x: string]: Object; >x : Symbol(x, Decl(indexersInClassType.ts, 2, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 1: Date; ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 'a': {} diff --git a/tests/baselines/reference/inferSecondaryParameter.symbols b/tests/baselines/reference/inferSecondaryParameter.symbols index c2527ed14b3..5522770c02f 100644 --- a/tests/baselines/reference/inferSecondaryParameter.symbols +++ b/tests/baselines/reference/inferSecondaryParameter.symbols @@ -6,7 +6,7 @@ interface Ib { m(test: string, fn: Function); } >m : Symbol(m, Decl(inferSecondaryParameter.ts, 2, 14)) >test : Symbol(test, Decl(inferSecondaryParameter.ts, 2, 17)) >fn : Symbol(fn, Decl(inferSecondaryParameter.ts, 2, 30)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var b: Ib = { m: function (test: string, fn: Function) { } }; >b : Symbol(b, Decl(inferSecondaryParameter.ts, 4, 3)) @@ -14,7 +14,7 @@ var b: Ib = { m: function (test: string, fn: Function) { } }; >m : Symbol(m, Decl(inferSecondaryParameter.ts, 4, 13)) >test : Symbol(test, Decl(inferSecondaryParameter.ts, 4, 27)) >fn : Symbol(fn, Decl(inferSecondaryParameter.ts, 4, 40)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) b.m("test", function (bug) { >b.m : Symbol(Ib.m, Decl(inferSecondaryParameter.ts, 2, 14)) diff --git a/tests/baselines/reference/inferenceFromParameterlessLambda.symbols b/tests/baselines/reference/inferenceFromParameterlessLambda.symbols index 6170a4d1149..3e17cdfb2a4 100644 --- a/tests/baselines/reference/inferenceFromParameterlessLambda.symbols +++ b/tests/baselines/reference/inferenceFromParameterlessLambda.symbols @@ -28,7 +28,7 @@ interface Take { foo(n => n.length, () => 'hi'); >foo : Symbol(foo, Decl(inferenceFromParameterlessLambda.ts, 0, 0)) >n : Symbol(n, Decl(inferenceFromParameterlessLambda.ts, 8, 4)) ->n.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>n.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(inferenceFromParameterlessLambda.ts, 8, 4)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.symbols b/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.symbols index 3fee48fc837..07812704840 100644 --- a/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.symbols +++ b/tests/baselines/reference/inferentialTypingObjectLiteralMethod1.symbols @@ -30,9 +30,9 @@ foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } } >foo : Symbol(foo, Decl(inferentialTypingObjectLiteralMethod1.ts, 2, 1)) >method : Symbol(method, Decl(inferentialTypingObjectLiteralMethod1.ts, 4, 9)) >p1 : Symbol(p1, Decl(inferentialTypingObjectLiteralMethod1.ts, 4, 17)) ->p1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>p1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >p1 : Symbol(p1, Decl(inferentialTypingObjectLiteralMethod1.ts, 4, 17)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >method : Symbol(method, Decl(inferentialTypingObjectLiteralMethod1.ts, 4, 46)) >p2 : Symbol(p2, Decl(inferentialTypingObjectLiteralMethod1.ts, 4, 54)) >undefined : Symbol(undefined) diff --git a/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.symbols b/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.symbols index fc8d39858b6..2f4aa942b91 100644 --- a/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.symbols +++ b/tests/baselines/reference/inferentialTypingObjectLiteralMethod2.symbols @@ -30,9 +30,9 @@ foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } } >foo : Symbol(foo, Decl(inferentialTypingObjectLiteralMethod2.ts, 2, 1)) >method : Symbol(method, Decl(inferentialTypingObjectLiteralMethod2.ts, 4, 9)) >p1 : Symbol(p1, Decl(inferentialTypingObjectLiteralMethod2.ts, 4, 17)) ->p1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>p1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >p1 : Symbol(p1, Decl(inferentialTypingObjectLiteralMethod2.ts, 4, 17)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >method : Symbol(method, Decl(inferentialTypingObjectLiteralMethod2.ts, 4, 46)) >p2 : Symbol(p2, Decl(inferentialTypingObjectLiteralMethod2.ts, 4, 54)) >undefined : Symbol(undefined) diff --git a/tests/baselines/reference/inferentialTypingUsingApparentType1.symbols b/tests/baselines/reference/inferentialTypingUsingApparentType1.symbols index 4babc614183..e8d66f2bbcb 100644 --- a/tests/baselines/reference/inferentialTypingUsingApparentType1.symbols +++ b/tests/baselines/reference/inferentialTypingUsingApparentType1.symbols @@ -14,7 +14,7 @@ function foo number>(x: T): T { foo(x => x.length); >foo : Symbol(foo, Decl(inferentialTypingUsingApparentType1.ts, 0, 0)) >x : Symbol(x, Decl(inferentialTypingUsingApparentType1.ts, 4, 4)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(inferentialTypingUsingApparentType1.ts, 4, 4)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/inferentialTypingUsingApparentType2.symbols b/tests/baselines/reference/inferentialTypingUsingApparentType2.symbols index 3c47eb4c697..e1525c50012 100644 --- a/tests/baselines/reference/inferentialTypingUsingApparentType2.symbols +++ b/tests/baselines/reference/inferentialTypingUsingApparentType2.symbols @@ -16,7 +16,7 @@ foo({ m(x) { return x.length } }); >foo : Symbol(foo, Decl(inferentialTypingUsingApparentType2.ts, 0, 0)) >m : Symbol(m, Decl(inferentialTypingUsingApparentType2.ts, 4, 5)) >x : Symbol(x, Decl(inferentialTypingUsingApparentType2.ts, 4, 8)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(inferentialTypingUsingApparentType2.ts, 4, 8)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols b/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols index 5fcc91d816e..c6ac17b0ccb 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols +++ b/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols @@ -11,7 +11,7 @@ function identity(a: A): A { } var x = [1, 2, 3].map(identity)[0]; >x : Symbol(x, Decl(inferentialTypingWithFunctionType2.ts, 3, 3)) ->[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >identity : Symbol(identity, Decl(inferentialTypingWithFunctionType2.ts, 0, 0)) diff --git a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.symbols b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.symbols index 9c65c2e3655..108170e8895 100644 --- a/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.symbols +++ b/tests/baselines/reference/inheritanceOfGenericConstructorMethod1.symbols @@ -12,7 +12,7 @@ class B extends A {} var a = new A(); >a : Symbol(a, Decl(inheritanceOfGenericConstructorMethod1.ts, 2, 3)) >A : Symbol(A, Decl(inheritanceOfGenericConstructorMethod1.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var b1 = new B(); // no error >b1 : Symbol(b1, Decl(inheritanceOfGenericConstructorMethod1.ts, 3, 3)) @@ -21,12 +21,12 @@ var b1 = new B(); // no error var b2: B = new B(); // no error >b2 : Symbol(b2, Decl(inheritanceOfGenericConstructorMethod1.ts, 4, 3)) >B : Symbol(B, Decl(inheritanceOfGenericConstructorMethod1.ts, 0, 14)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >B : Symbol(B, Decl(inheritanceOfGenericConstructorMethod1.ts, 0, 14)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var b3 = new B(); // error, could not select overload for 'new' expression >b3 : Symbol(b3, Decl(inheritanceOfGenericConstructorMethod1.ts, 5, 3)) >B : Symbol(B, Decl(inheritanceOfGenericConstructorMethod1.ts, 0, 14)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.symbols b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.symbols index a76a4aad7fa..b4e6eac2183 100644 --- a/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.symbols +++ b/tests/baselines/reference/inheritedFunctionAssignmentCompatibility.symbols @@ -1,7 +1,7 @@ === tests/cases/compiler/inheritedFunctionAssignmentCompatibility.ts === interface IResultCallback extends Function { } >IResultCallback : Symbol(IResultCallback, Decl(inheritedFunctionAssignmentCompatibility.ts, 0, 0)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function fn(cb: IResultCallback) { } >fn : Symbol(fn, Decl(inheritedFunctionAssignmentCompatibility.ts, 0, 46)) diff --git a/tests/baselines/reference/inheritedGenericCallSignature.symbols b/tests/baselines/reference/inheritedGenericCallSignature.symbols index 49170401165..f70e4c7d75f 100644 --- a/tests/baselines/reference/inheritedGenericCallSignature.symbols +++ b/tests/baselines/reference/inheritedGenericCallSignature.symbols @@ -13,7 +13,7 @@ interface I1 { interface Object {} ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11), Decl(inheritedGenericCallSignature.ts, 5, 1)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(inheritedGenericCallSignature.ts, 5, 1)) @@ -34,7 +34,7 @@ interface I2 extends I1 { var x: I2; >x : Symbol(x, Decl(inheritedGenericCallSignature.ts, 20, 3)) >I2 : Symbol(I2, Decl(inheritedGenericCallSignature.ts, 8, 19)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) @@ -44,7 +44,7 @@ var y = x(undefined); >undefined : Symbol(undefined) y.length; // should not error ->y.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>y.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(inheritedGenericCallSignature.ts, 24, 3)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.symbols b/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.symbols index 1b1c6b21beb..1a204dd9f32 100644 --- a/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.symbols +++ b/tests/baselines/reference/inheritedOverloadedSpecializedSignatures.symbols @@ -20,9 +20,9 @@ var b:B; // Should not error b('foo').charAt(0); ->b('foo').charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>b('foo').charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(inheritedOverloadedSpecializedSignatures.ts, 8, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) interface A { >A : Symbol(A, Decl(inheritedOverloadedSpecializedSignatures.ts, 0, 0), Decl(inheritedOverloadedSpecializedSignatures.ts, 10, 19), Decl(inheritedOverloadedSpecializedSignatures.ts, 19, 1)) diff --git a/tests/baselines/reference/innerBoundLambdaEmit.symbols b/tests/baselines/reference/innerBoundLambdaEmit.symbols index 689aa7d075b..48bbe1fad4b 100644 --- a/tests/baselines/reference/innerBoundLambdaEmit.symbols +++ b/tests/baselines/reference/innerBoundLambdaEmit.symbols @@ -9,8 +9,8 @@ module M { >bar : Symbol(bar, Decl(innerBoundLambdaEmit.ts, 3, 7)) } interface Array { ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(innerBoundLambdaEmit.ts, 4, 1)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(innerBoundLambdaEmit.ts, 5, 16)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(innerBoundLambdaEmit.ts, 4, 1)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(innerBoundLambdaEmit.ts, 5, 16)) toFoo(): M.Foo >toFoo : Symbol(toFoo, Decl(innerBoundLambdaEmit.ts, 5, 20)) diff --git a/tests/baselines/reference/innerTypeParameterShadowingOuterOne.symbols b/tests/baselines/reference/innerTypeParameterShadowingOuterOne.symbols index b890c6c9ecf..36502a9988d 100644 --- a/tests/baselines/reference/innerTypeParameterShadowingOuterOne.symbols +++ b/tests/baselines/reference/innerTypeParameterShadowingOuterOne.symbols @@ -5,63 +5,63 @@ function f() { >f : Symbol(f, Decl(innerTypeParameterShadowingOuterOne.ts, 0, 0)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne.ts, 3, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function g() { >g : Symbol(g, Decl(innerTypeParameterShadowingOuterOne.ts, 3, 30)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne.ts, 4, 15)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var x: T; >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne.ts, 5, 11)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne.ts, 4, 15)) x.toFixed(); ->x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne.ts, 5, 11)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) } var x: T; >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne.ts, 8, 7)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne.ts, 3, 11)) x.getDate(); ->x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne.ts, 8, 7)) ->getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) } function f2() { >f2 : Symbol(f2, Decl(innerTypeParameterShadowingOuterOne.ts, 10, 1)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne.ts, 12, 12)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne.ts, 12, 27)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function g() { >g : Symbol(g, Decl(innerTypeParameterShadowingOuterOne.ts, 12, 47)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne.ts, 13, 15)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne.ts, 13, 32)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var x: U; >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne.ts, 14, 11)) >U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne.ts, 13, 32)) x.toFixed(); ->x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne.ts, 14, 11)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) } var x: U; >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne.ts, 17, 7)) >U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne.ts, 12, 27)) x.getDate(); ->x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne.ts, 17, 7)) ->getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) } //function f2() { // function g() { diff --git a/tests/baselines/reference/innerTypeParameterShadowingOuterOne2.symbols b/tests/baselines/reference/innerTypeParameterShadowingOuterOne2.symbols index 13afcb3e123..e19ab7aad28 100644 --- a/tests/baselines/reference/innerTypeParameterShadowingOuterOne2.symbols +++ b/tests/baselines/reference/innerTypeParameterShadowingOuterOne2.symbols @@ -5,21 +5,21 @@ class C { >C : Symbol(C, Decl(innerTypeParameterShadowingOuterOne2.ts, 0, 0)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 3, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) g() { >g : Symbol(g, Decl(innerTypeParameterShadowingOuterOne2.ts, 3, 25)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 4, 6)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var x: T; >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 5, 11)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 4, 6)) x.toFixed(); ->x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 5, 11)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) } h() { @@ -30,34 +30,34 @@ class C { >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 3, 8)) x.getDate(); ->x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 10, 11)) ->getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) } } class C2 { >C2 : Symbol(C2, Decl(innerTypeParameterShadowingOuterOne2.ts, 13, 1)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 15, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne2.ts, 15, 24)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) g() { >g : Symbol(g, Decl(innerTypeParameterShadowingOuterOne2.ts, 15, 42)) >T : Symbol(T, Decl(innerTypeParameterShadowingOuterOne2.ts, 16, 6)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne2.ts, 16, 23)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var x: U; >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 17, 11)) >U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne2.ts, 16, 23)) x.toFixed(); ->x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 17, 11)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) } h() { @@ -68,9 +68,9 @@ class C2 { >U : Symbol(U, Decl(innerTypeParameterShadowingOuterOne2.ts, 15, 24)) x.getDate(); ->x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(innerTypeParameterShadowingOuterOne2.ts, 22, 11)) ->getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) } } //class C2 { diff --git a/tests/baselines/reference/instanceAndStaticDeclarations1.symbols b/tests/baselines/reference/instanceAndStaticDeclarations1.symbols index d6b4789232c..8e9d4a320a0 100644 --- a/tests/baselines/reference/instanceAndStaticDeclarations1.symbols +++ b/tests/baselines/reference/instanceAndStaticDeclarations1.symbols @@ -32,9 +32,9 @@ class Point { >y : Symbol(Point.y, Decl(instanceAndStaticDeclarations1.ts, 3, 33)) return Math.sqrt(dx * dx + dy * dy); ->Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, 620, 27)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, 620, 27)) +>Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) >dx : Symbol(dx, Decl(instanceAndStaticDeclarations1.ts, 5, 11)) >dx : Symbol(dx, Decl(instanceAndStaticDeclarations1.ts, 5, 11)) >dy : Symbol(dy, Decl(instanceAndStaticDeclarations1.ts, 6, 11)) diff --git a/tests/baselines/reference/instanceOfAssignability.symbols b/tests/baselines/reference/instanceOfAssignability.symbols index b01f29a5faf..1bf39df2dd2 100644 --- a/tests/baselines/reference/instanceOfAssignability.symbols +++ b/tests/baselines/reference/instanceOfAssignability.symbols @@ -48,12 +48,12 @@ class Giraffe extends Mammal { neck; } function fn1(x: Array|Array|boolean) { >fn1 : Symbol(fn1, Decl(instanceOfAssignability.ts, 19, 38)) >x : Symbol(x, Decl(instanceOfAssignability.ts, 21, 13)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) if(x instanceof Array) { >x : Symbol(x, Decl(instanceOfAssignability.ts, 21, 13)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) // 1.5: y: Array|Array // Want: y: Array|Array @@ -154,12 +154,12 @@ function fn6(x: Animal|Mammal) { function fn7(x: Array|Array) { >fn7 : Symbol(fn7, Decl(instanceOfAssignability.ts, 67, 1)) >x : Symbol(x, Decl(instanceOfAssignability.ts, 69, 13)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) if(x instanceof Array) { >x : Symbol(x, Decl(instanceOfAssignability.ts, 69, 13)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) // 1.5: y: Array|Array // Want: y: Array|Array diff --git a/tests/baselines/reference/instanceofOperatorWithLHSIsObject.symbols b/tests/baselines/reference/instanceofOperatorWithLHSIsObject.symbols index 44859d83f72..481e241d69d 100644 --- a/tests/baselines/reference/instanceofOperatorWithLHSIsObject.symbols +++ b/tests/baselines/reference/instanceofOperatorWithLHSIsObject.symbols @@ -7,14 +7,14 @@ var x1: any; var x2: Function; >x2 : Symbol(x2, Decl(instanceofOperatorWithLHSIsObject.ts, 3, 3)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var a: {}; >a : Symbol(a, Decl(instanceofOperatorWithLHSIsObject.ts, 5, 3)) var b: Object; >b : Symbol(b, Decl(instanceofOperatorWithLHSIsObject.ts, 6, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var c: C; >c : Symbol(c, Decl(instanceofOperatorWithLHSIsObject.ts, 7, 3)) diff --git a/tests/baselines/reference/instanceofOperatorWithRHSIsSubtypeOfFunction.symbols b/tests/baselines/reference/instanceofOperatorWithRHSIsSubtypeOfFunction.symbols index e15f4b7ea45..5d02ff54ae2 100644 --- a/tests/baselines/reference/instanceofOperatorWithRHSIsSubtypeOfFunction.symbols +++ b/tests/baselines/reference/instanceofOperatorWithRHSIsSubtypeOfFunction.symbols @@ -1,14 +1,14 @@ === tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithRHSIsSubtypeOfFunction.ts === interface I extends Function { } >I : Symbol(I, Decl(instanceofOperatorWithRHSIsSubtypeOfFunction.ts, 0, 0)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var x: any; >x : Symbol(x, Decl(instanceofOperatorWithRHSIsSubtypeOfFunction.ts, 2, 3)) var f1: Function; >f1 : Symbol(f1, Decl(instanceofOperatorWithRHSIsSubtypeOfFunction.ts, 3, 3)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var f2: I; >f2 : Symbol(f2, Decl(instanceofOperatorWithRHSIsSubtypeOfFunction.ts, 4, 3)) diff --git a/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.symbols b/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.symbols index 6b45cd1daad..8e5f0413299 100644 --- a/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.symbols +++ b/tests/baselines/reference/interfaceDoesNotDependOnBaseTypes.symbols @@ -7,14 +7,14 @@ if (typeof x !== "string") { >x : Symbol(x, Decl(interfaceDoesNotDependOnBaseTypes.ts, 0, 3)) x.push(""); ->x.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>x.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(interfaceDoesNotDependOnBaseTypes.ts, 0, 3)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) x.push([""]); ->x.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>x.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(interfaceDoesNotDependOnBaseTypes.ts, 0, 3)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) } type StringTree = string | StringTreeArray; @@ -23,6 +23,6 @@ type StringTree = string | StringTreeArray; interface StringTreeArray extends Array { } >StringTreeArray : Symbol(StringTreeArray, Decl(interfaceDoesNotDependOnBaseTypes.ts, 6, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >StringTree : Symbol(StringTree, Decl(interfaceDoesNotDependOnBaseTypes.ts, 4, 1)) diff --git a/tests/baselines/reference/interfaceWithOverloadedCallAndConstructSignatures.symbols b/tests/baselines/reference/interfaceWithOverloadedCallAndConstructSignatures.symbols index 28dcb55238b..f544aac424d 100644 --- a/tests/baselines/reference/interfaceWithOverloadedCallAndConstructSignatures.symbols +++ b/tests/baselines/reference/interfaceWithOverloadedCallAndConstructSignatures.symbols @@ -9,7 +9,7 @@ interface Foo { new (): any; new (x: string): Object; >x : Symbol(x, Decl(interfaceWithOverloadedCallAndConstructSignatures.ts, 5, 9)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var f: Foo; diff --git a/tests/baselines/reference/interfaceWithPropertyOfEveryType.symbols b/tests/baselines/reference/interfaceWithPropertyOfEveryType.symbols index 46c8e92261f..f248bba02f0 100644 --- a/tests/baselines/reference/interfaceWithPropertyOfEveryType.symbols +++ b/tests/baselines/reference/interfaceWithPropertyOfEveryType.symbols @@ -39,7 +39,7 @@ interface Foo { g: Object; >g : Symbol(g, Decl(interfaceWithPropertyOfEveryType.ts, 13, 16)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) h: (x: number) => number; >h : Symbol(h, Decl(interfaceWithPropertyOfEveryType.ts, 14, 14)) diff --git a/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.symbols b/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.symbols index 40ec7863a04..1d4a024294f 100644 --- a/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.symbols +++ b/tests/baselines/reference/interfaceWithSpecializedCallAndConstructSignatures.symbols @@ -13,7 +13,7 @@ interface Foo { new (x: string): Object; >x : Symbol(x, Decl(interfaceWithSpecializedCallAndConstructSignatures.ts, 5, 9)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var f: Foo; diff --git a/tests/baselines/reference/invalidSplice.symbols b/tests/baselines/reference/invalidSplice.symbols index dc028776cb3..5aceb66a227 100644 --- a/tests/baselines/reference/invalidSplice.symbols +++ b/tests/baselines/reference/invalidSplice.symbols @@ -1,6 +1,6 @@ === tests/cases/compiler/invalidSplice.ts === var arr = [].splice(0,3,4,5); >arr : Symbol(arr, Decl(invalidSplice.ts, 0, 3)) ->[].splice : Symbol(Array.splice, Decl(lib.d.ts, 1060, 50), Decl(lib.d.ts, 1066, 31)) ->splice : Symbol(Array.splice, Decl(lib.d.ts, 1060, 50), Decl(lib.d.ts, 1066, 31)) +>[].splice : Symbol(Array.splice, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>splice : Symbol(Array.splice, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/isArray.symbols b/tests/baselines/reference/isArray.symbols index 75351b377be..b60123e6b2e 100644 --- a/tests/baselines/reference/isArray.symbols +++ b/tests/baselines/reference/isArray.symbols @@ -4,19 +4,19 @@ var maybeArray: number | number[]; if (Array.isArray(maybeArray)) { ->Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.d.ts, 1166, 28)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->isArray : Symbol(ArrayConstructor.isArray, Decl(lib.d.ts, 1166, 28)) +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.d.ts, --, --)) >maybeArray : Symbol(maybeArray, Decl(isArray.ts, 0, 3)) maybeArray.length; // OK ->maybeArray.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>maybeArray.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >maybeArray : Symbol(maybeArray, Decl(isArray.ts, 0, 3)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) } else { maybeArray.toFixed(); // OK ->maybeArray.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>maybeArray.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >maybeArray : Symbol(maybeArray, Decl(isArray.ts, 0, 3)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/isDeclarationVisibleNodeKinds.symbols b/tests/baselines/reference/isDeclarationVisibleNodeKinds.symbols index 659a1330616..2af21772cfb 100644 --- a/tests/baselines/reference/isDeclarationVisibleNodeKinds.symbols +++ b/tests/baselines/reference/isDeclarationVisibleNodeKinds.symbols @@ -127,7 +127,7 @@ module schema { export function createValidator8(schema: any): Array<{ (data: T) : T}> { >createValidator8 : Symbol(createValidator8, Decl(isDeclarationVisibleNodeKinds.ts, 52, 15)) >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 53, 37)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 53, 60)) >data : Symbol(data, Decl(isDeclarationVisibleNodeKinds.ts, 53, 63)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 53, 60)) diff --git a/tests/baselines/reference/iterableArrayPattern1.symbols b/tests/baselines/reference/iterableArrayPattern1.symbols index fae627e9c95..2877a2233da 100644 --- a/tests/baselines/reference/iterableArrayPattern1.symbols +++ b/tests/baselines/reference/iterableArrayPattern1.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iterableArrayPattern1.ts, 3, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iterableArrayPattern1.ts, 4, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iterableArrayPattern1.ts, 0, 32)) diff --git a/tests/baselines/reference/iterableArrayPattern11.symbols b/tests/baselines/reference/iterableArrayPattern11.symbols index fefeaced83f..6181edbf1fd 100644 --- a/tests/baselines/reference/iterableArrayPattern11.symbols +++ b/tests/baselines/reference/iterableArrayPattern11.symbols @@ -36,9 +36,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern11.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern12.symbols b/tests/baselines/reference/iterableArrayPattern12.symbols index fd00059449a..e4b4baf3bd5 100644 --- a/tests/baselines/reference/iterableArrayPattern12.symbols +++ b/tests/baselines/reference/iterableArrayPattern12.symbols @@ -36,9 +36,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern12.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern13.symbols b/tests/baselines/reference/iterableArrayPattern13.symbols index 8271e564f9e..02f219e7092 100644 --- a/tests/baselines/reference/iterableArrayPattern13.symbols +++ b/tests/baselines/reference/iterableArrayPattern13.symbols @@ -35,9 +35,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern13.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern2.symbols b/tests/baselines/reference/iterableArrayPattern2.symbols index d4f2949e24f..dad1262cee9 100644 --- a/tests/baselines/reference/iterableArrayPattern2.symbols +++ b/tests/baselines/reference/iterableArrayPattern2.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iterableArrayPattern2.ts, 3, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iterableArrayPattern2.ts, 4, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iterableArrayPattern2.ts, 0, 35)) diff --git a/tests/baselines/reference/iterableArrayPattern3.symbols b/tests/baselines/reference/iterableArrayPattern3.symbols index 9e38c52ad70..e0372862b9e 100644 --- a/tests/baselines/reference/iterableArrayPattern3.symbols +++ b/tests/baselines/reference/iterableArrayPattern3.symbols @@ -37,9 +37,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern3.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern30.symbols b/tests/baselines/reference/iterableArrayPattern30.symbols index 5a991f0d5b3..393d9fbca51 100644 --- a/tests/baselines/reference/iterableArrayPattern30.symbols +++ b/tests/baselines/reference/iterableArrayPattern30.symbols @@ -4,5 +4,5 @@ const [[k1, v1], [k2, v2]] = new Map([["", true], ["hello", true]]) >v1 : Symbol(v1, Decl(iterableArrayPattern30.ts, 0, 11)) >k2 : Symbol(k2, Decl(iterableArrayPattern30.ts, 0, 18)) >v2 : Symbol(v2, Decl(iterableArrayPattern30.ts, 0, 21)) ->Map : Symbol(Map, Decl(lib.d.ts, 4635, 1), Decl(lib.d.ts, 4658, 11)) +>Map : Symbol(Map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/iterableArrayPattern4.symbols b/tests/baselines/reference/iterableArrayPattern4.symbols index d3a7f4fb1d7..fb1cce1b8f9 100644 --- a/tests/baselines/reference/iterableArrayPattern4.symbols +++ b/tests/baselines/reference/iterableArrayPattern4.symbols @@ -37,9 +37,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern4.ts, 3, 27)) diff --git a/tests/baselines/reference/iterableArrayPattern9.symbols b/tests/baselines/reference/iterableArrayPattern9.symbols index efb88d2e608..07d580fcea1 100644 --- a/tests/baselines/reference/iterableArrayPattern9.symbols +++ b/tests/baselines/reference/iterableArrayPattern9.symbols @@ -32,9 +32,9 @@ class FooIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(FooIterator, Decl(iterableArrayPattern9.ts, 2, 27)) diff --git a/tests/baselines/reference/iterableContextualTyping1.symbols b/tests/baselines/reference/iterableContextualTyping1.symbols index f23d571d072..5af4fdbcd78 100644 --- a/tests/baselines/reference/iterableContextualTyping1.symbols +++ b/tests/baselines/reference/iterableContextualTyping1.symbols @@ -1,10 +1,10 @@ === tests/cases/conformance/expressions/contextualTyping/iterableContextualTyping1.ts === var iter: Iterable<(x: string) => number> = [s => s.length]; >iter : Symbol(iter, Decl(iterableContextualTyping1.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(iterableContextualTyping1.ts, 0, 20)) >s : Symbol(s, Decl(iterableContextualTyping1.ts, 0, 45)) ->s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(iterableContextualTyping1.ts, 0, 45)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/iteratorSpreadInArray.symbols b/tests/baselines/reference/iteratorSpreadInArray.symbols index 03099b124c9..d24abca314b 100644 --- a/tests/baselines/reference/iteratorSpreadInArray.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray.ts, 0, 36)) diff --git a/tests/baselines/reference/iteratorSpreadInArray11.symbols b/tests/baselines/reference/iteratorSpreadInArray11.symbols index a46d22a481a..f982bf2deab 100644 --- a/tests/baselines/reference/iteratorSpreadInArray11.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray11.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/spread/iteratorSpreadInArray11.ts === var iter: Iterable; >iter : Symbol(iter, Decl(iteratorSpreadInArray11.ts, 0, 3)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) var array = [...iter]; >array : Symbol(array, Decl(iteratorSpreadInArray11.ts, 1, 3)) diff --git a/tests/baselines/reference/iteratorSpreadInArray2.symbols b/tests/baselines/reference/iteratorSpreadInArray2.symbols index 906e8288af0..029d83d2111 100644 --- a/tests/baselines/reference/iteratorSpreadInArray2.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray2.symbols @@ -13,7 +13,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray2.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray2.ts, 5, 28)) @@ -22,9 +22,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray2.ts, 0, 59)) @@ -48,9 +48,9 @@ class NumberIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(NumberIterator, Decl(iteratorSpreadInArray2.ts, 13, 1)) diff --git a/tests/baselines/reference/iteratorSpreadInArray3.symbols b/tests/baselines/reference/iteratorSpreadInArray3.symbols index e25374c80a8..05f90d44174 100644 --- a/tests/baselines/reference/iteratorSpreadInArray3.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray3.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray3.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray3.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray3.ts, 0, 47)) diff --git a/tests/baselines/reference/iteratorSpreadInArray4.symbols b/tests/baselines/reference/iteratorSpreadInArray4.symbols index 1856d1bb682..e7ace40c4de 100644 --- a/tests/baselines/reference/iteratorSpreadInArray4.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray4.symbols @@ -12,7 +12,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray4.ts, 4, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray4.ts, 5, 28)) @@ -21,9 +21,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray4.ts, 0, 42)) diff --git a/tests/baselines/reference/iteratorSpreadInArray7.symbols b/tests/baselines/reference/iteratorSpreadInArray7.symbols index c68550b7fa7..e498e68b9eb 100644 --- a/tests/baselines/reference/iteratorSpreadInArray7.symbols +++ b/tests/baselines/reference/iteratorSpreadInArray7.symbols @@ -3,9 +3,9 @@ var array: symbol[]; >array : Symbol(array, Decl(iteratorSpreadInArray7.ts, 0, 3)) array.concat([...new SymbolIterator]); ->array.concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>array.concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >array : Symbol(array, Decl(iteratorSpreadInArray7.ts, 0, 3)) ->concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >SymbolIterator : Symbol(SymbolIterator, Decl(iteratorSpreadInArray7.ts, 1, 38)) class SymbolIterator { @@ -17,7 +17,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInArray7.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iteratorSpreadInArray7.ts, 6, 28)) @@ -26,9 +26,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInArray7.ts, 1, 38)) diff --git a/tests/baselines/reference/iteratorSpreadInCall11.symbols b/tests/baselines/reference/iteratorSpreadInCall11.symbols index 874a034631d..e504283a3bd 100644 --- a/tests/baselines/reference/iteratorSpreadInCall11.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall11.symbols @@ -19,7 +19,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall11.ts, 6, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall11.ts, 7, 28)) @@ -28,9 +28,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall11.ts, 2, 42)) diff --git a/tests/baselines/reference/iteratorSpreadInCall12.symbols b/tests/baselines/reference/iteratorSpreadInCall12.symbols index 0f84a0e1cbb..4b7f553e969 100644 --- a/tests/baselines/reference/iteratorSpreadInCall12.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall12.symbols @@ -22,7 +22,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall12.ts, 8, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall12.ts, 9, 28)) @@ -31,9 +31,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall12.ts, 4, 1)) @@ -57,9 +57,9 @@ class StringIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(StringIterator, Decl(iteratorSpreadInCall12.ts, 17, 1)) diff --git a/tests/baselines/reference/iteratorSpreadInCall3.symbols b/tests/baselines/reference/iteratorSpreadInCall3.symbols index 6f329329431..402b156002f 100644 --- a/tests/baselines/reference/iteratorSpreadInCall3.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall3.symbols @@ -16,7 +16,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall3.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall3.ts, 6, 28)) @@ -25,9 +25,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall3.ts, 2, 32)) diff --git a/tests/baselines/reference/iteratorSpreadInCall5.symbols b/tests/baselines/reference/iteratorSpreadInCall5.symbols index 01a0112b026..855b434f07c 100644 --- a/tests/baselines/reference/iteratorSpreadInCall5.symbols +++ b/tests/baselines/reference/iteratorSpreadInCall5.symbols @@ -17,7 +17,7 @@ class SymbolIterator { return { value: Symbol(), >value : Symbol(value, Decl(iteratorSpreadInCall5.ts, 5, 16)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) done: false >done : Symbol(done, Decl(iteratorSpreadInCall5.ts, 6, 28)) @@ -26,9 +26,9 @@ class SymbolIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(SymbolIterator, Decl(iteratorSpreadInCall5.ts, 2, 43)) @@ -52,9 +52,9 @@ class StringIterator { } [Symbol.iterator]() { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) return this; >this : Symbol(StringIterator, Decl(iteratorSpreadInCall5.ts, 14, 1)) diff --git a/tests/baselines/reference/letDeclarations-access.symbols b/tests/baselines/reference/letDeclarations-access.symbols index dfc9ea4c533..060ebc80b80 100644 --- a/tests/baselines/reference/letDeclarations-access.symbols +++ b/tests/baselines/reference/letDeclarations-access.symbols @@ -81,7 +81,7 @@ x; >x : Symbol(x, Decl(letDeclarations-access.ts, 1, 3)) x.toString(); ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(letDeclarations-access.ts, 1, 3)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/library_ArraySlice.symbols b/tests/baselines/reference/library_ArraySlice.symbols index 02c58859d40..f29defbc3f9 100644 --- a/tests/baselines/reference/library_ArraySlice.symbols +++ b/tests/baselines/reference/library_ArraySlice.symbols @@ -1,23 +1,23 @@ === tests/cases/compiler/library_ArraySlice.ts === // Array.prototype.slice can have zero, one, or two arguments Array.prototype.slice(); ->Array.prototype.slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) ->Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, 1167, 41)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, 1167, 41)) ->slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) +>Array.prototype.slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) +>Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) +>slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) Array.prototype.slice(0); ->Array.prototype.slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) ->Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, 1167, 41)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, 1167, 41)) ->slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) +>Array.prototype.slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) +>Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) +>slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) Array.prototype.slice(0, 1); ->Array.prototype.slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) ->Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, 1167, 41)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, 1167, 41)) ->slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) +>Array.prototype.slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) +>Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) +>slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/library_DatePrototypeProperties.symbols b/tests/baselines/reference/library_DatePrototypeProperties.symbols index c6d0b7e87fb..8aa5f81f2f5 100644 --- a/tests/baselines/reference/library_DatePrototypeProperties.symbols +++ b/tests/baselines/reference/library_DatePrototypeProperties.symbols @@ -2,310 +2,310 @@ // Properties of the Date prototype object as per ES5 spec // http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.5 Date.prototype.constructor; ->Date.prototype.constructor : Symbol(Object.constructor, Decl(lib.d.ts, 94, 18)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->constructor : Symbol(Object.constructor, Decl(lib.d.ts, 94, 18)) +>Date.prototype.constructor : Symbol(Object.constructor, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>constructor : Symbol(Object.constructor, Decl(lib.d.ts, --, --)) Date.prototype.toString(); ->Date.prototype.toString : Symbol(Date.toString, Decl(lib.d.ts, 636, 16)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->toString : Symbol(Date.toString, Decl(lib.d.ts, 636, 16)) +>Date.prototype.toString : Symbol(Date.toString, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>toString : Symbol(Date.toString, Decl(lib.d.ts, --, --)) Date.prototype.toDateString(); ->Date.prototype.toDateString : Symbol(Date.toDateString, Decl(lib.d.ts, 638, 23)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->toDateString : Symbol(Date.toDateString, Decl(lib.d.ts, 638, 23)) +>Date.prototype.toDateString : Symbol(Date.toDateString, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>toDateString : Symbol(Date.toDateString, Decl(lib.d.ts, --, --)) Date.prototype.toTimeString(); ->Date.prototype.toTimeString : Symbol(Date.toTimeString, Decl(lib.d.ts, 640, 27)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->toTimeString : Symbol(Date.toTimeString, Decl(lib.d.ts, 640, 27)) +>Date.prototype.toTimeString : Symbol(Date.toTimeString, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>toTimeString : Symbol(Date.toTimeString, Decl(lib.d.ts, --, --)) Date.prototype.toLocaleString(); ->Date.prototype.toLocaleString : Symbol(Date.toLocaleString, Decl(lib.d.ts, 642, 27)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->toLocaleString : Symbol(Date.toLocaleString, Decl(lib.d.ts, 642, 27)) +>Date.prototype.toLocaleString : Symbol(Date.toLocaleString, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>toLocaleString : Symbol(Date.toLocaleString, Decl(lib.d.ts, --, --)) Date.prototype.toLocaleDateString(); ->Date.prototype.toLocaleDateString : Symbol(Date.toLocaleDateString, Decl(lib.d.ts, 644, 29)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->toLocaleDateString : Symbol(Date.toLocaleDateString, Decl(lib.d.ts, 644, 29)) +>Date.prototype.toLocaleDateString : Symbol(Date.toLocaleDateString, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>toLocaleDateString : Symbol(Date.toLocaleDateString, Decl(lib.d.ts, --, --)) Date.prototype.toLocaleTimeString(); ->Date.prototype.toLocaleTimeString : Symbol(Date.toLocaleTimeString, Decl(lib.d.ts, 646, 33)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->toLocaleTimeString : Symbol(Date.toLocaleTimeString, Decl(lib.d.ts, 646, 33)) +>Date.prototype.toLocaleTimeString : Symbol(Date.toLocaleTimeString, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>toLocaleTimeString : Symbol(Date.toLocaleTimeString, Decl(lib.d.ts, --, --)) Date.prototype.valueOf(); ->Date.prototype.valueOf : Symbol(Date.valueOf, Decl(lib.d.ts, 648, 33)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->valueOf : Symbol(Date.valueOf, Decl(lib.d.ts, 648, 33)) +>Date.prototype.valueOf : Symbol(Date.valueOf, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>valueOf : Symbol(Date.valueOf, Decl(lib.d.ts, --, --)) Date.prototype.getTime(); ->Date.prototype.getTime : Symbol(Date.getTime, Decl(lib.d.ts, 650, 22)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getTime : Symbol(Date.getTime, Decl(lib.d.ts, 650, 22)) +>Date.prototype.getTime : Symbol(Date.getTime, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getTime : Symbol(Date.getTime, Decl(lib.d.ts, --, --)) Date.prototype.getFullYear(); ->Date.prototype.getFullYear : Symbol(Date.getFullYear, Decl(lib.d.ts, 652, 22)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getFullYear : Symbol(Date.getFullYear, Decl(lib.d.ts, 652, 22)) +>Date.prototype.getFullYear : Symbol(Date.getFullYear, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getFullYear : Symbol(Date.getFullYear, Decl(lib.d.ts, --, --)) Date.prototype.getUTCFullYear(); ->Date.prototype.getUTCFullYear : Symbol(Date.getUTCFullYear, Decl(lib.d.ts, 654, 26)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getUTCFullYear : Symbol(Date.getUTCFullYear, Decl(lib.d.ts, 654, 26)) +>Date.prototype.getUTCFullYear : Symbol(Date.getUTCFullYear, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getUTCFullYear : Symbol(Date.getUTCFullYear, Decl(lib.d.ts, --, --)) Date.prototype.getMonth(); ->Date.prototype.getMonth : Symbol(Date.getMonth, Decl(lib.d.ts, 656, 29)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getMonth : Symbol(Date.getMonth, Decl(lib.d.ts, 656, 29)) +>Date.prototype.getMonth : Symbol(Date.getMonth, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getMonth : Symbol(Date.getMonth, Decl(lib.d.ts, --, --)) Date.prototype.getUTCMonth(); ->Date.prototype.getUTCMonth : Symbol(Date.getUTCMonth, Decl(lib.d.ts, 658, 23)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getUTCMonth : Symbol(Date.getUTCMonth, Decl(lib.d.ts, 658, 23)) +>Date.prototype.getUTCMonth : Symbol(Date.getUTCMonth, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getUTCMonth : Symbol(Date.getUTCMonth, Decl(lib.d.ts, --, --)) Date.prototype.getDate(); ->Date.prototype.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>Date.prototype.getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) Date.prototype.getUTCDate(); ->Date.prototype.getUTCDate : Symbol(Date.getUTCDate, Decl(lib.d.ts, 662, 22)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getUTCDate : Symbol(Date.getUTCDate, Decl(lib.d.ts, 662, 22)) +>Date.prototype.getUTCDate : Symbol(Date.getUTCDate, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getUTCDate : Symbol(Date.getUTCDate, Decl(lib.d.ts, --, --)) Date.prototype.getDay(); ->Date.prototype.getDay : Symbol(Date.getDay, Decl(lib.d.ts, 664, 25)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getDay : Symbol(Date.getDay, Decl(lib.d.ts, 664, 25)) +>Date.prototype.getDay : Symbol(Date.getDay, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getDay : Symbol(Date.getDay, Decl(lib.d.ts, --, --)) Date.prototype.getUTCDay(); ->Date.prototype.getUTCDay : Symbol(Date.getUTCDay, Decl(lib.d.ts, 666, 21)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getUTCDay : Symbol(Date.getUTCDay, Decl(lib.d.ts, 666, 21)) +>Date.prototype.getUTCDay : Symbol(Date.getUTCDay, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getUTCDay : Symbol(Date.getUTCDay, Decl(lib.d.ts, --, --)) Date.prototype.getHours(); ->Date.prototype.getHours : Symbol(Date.getHours, Decl(lib.d.ts, 668, 24)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getHours : Symbol(Date.getHours, Decl(lib.d.ts, 668, 24)) +>Date.prototype.getHours : Symbol(Date.getHours, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getHours : Symbol(Date.getHours, Decl(lib.d.ts, --, --)) Date.prototype.getUTCHours(); ->Date.prototype.getUTCHours : Symbol(Date.getUTCHours, Decl(lib.d.ts, 670, 23)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getUTCHours : Symbol(Date.getUTCHours, Decl(lib.d.ts, 670, 23)) +>Date.prototype.getUTCHours : Symbol(Date.getUTCHours, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getUTCHours : Symbol(Date.getUTCHours, Decl(lib.d.ts, --, --)) Date.prototype.getMinutes(); ->Date.prototype.getMinutes : Symbol(Date.getMinutes, Decl(lib.d.ts, 672, 26)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getMinutes : Symbol(Date.getMinutes, Decl(lib.d.ts, 672, 26)) +>Date.prototype.getMinutes : Symbol(Date.getMinutes, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getMinutes : Symbol(Date.getMinutes, Decl(lib.d.ts, --, --)) Date.prototype.getUTCMinutes(); ->Date.prototype.getUTCMinutes : Symbol(Date.getUTCMinutes, Decl(lib.d.ts, 674, 25)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getUTCMinutes : Symbol(Date.getUTCMinutes, Decl(lib.d.ts, 674, 25)) +>Date.prototype.getUTCMinutes : Symbol(Date.getUTCMinutes, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getUTCMinutes : Symbol(Date.getUTCMinutes, Decl(lib.d.ts, --, --)) Date.prototype.getSeconds(); ->Date.prototype.getSeconds : Symbol(Date.getSeconds, Decl(lib.d.ts, 676, 28)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getSeconds : Symbol(Date.getSeconds, Decl(lib.d.ts, 676, 28)) +>Date.prototype.getSeconds : Symbol(Date.getSeconds, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getSeconds : Symbol(Date.getSeconds, Decl(lib.d.ts, --, --)) Date.prototype.getUTCSeconds(); ->Date.prototype.getUTCSeconds : Symbol(Date.getUTCSeconds, Decl(lib.d.ts, 678, 25)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getUTCSeconds : Symbol(Date.getUTCSeconds, Decl(lib.d.ts, 678, 25)) +>Date.prototype.getUTCSeconds : Symbol(Date.getUTCSeconds, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getUTCSeconds : Symbol(Date.getUTCSeconds, Decl(lib.d.ts, --, --)) Date.prototype.getMilliseconds(); ->Date.prototype.getMilliseconds : Symbol(Date.getMilliseconds, Decl(lib.d.ts, 680, 28)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getMilliseconds : Symbol(Date.getMilliseconds, Decl(lib.d.ts, 680, 28)) +>Date.prototype.getMilliseconds : Symbol(Date.getMilliseconds, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getMilliseconds : Symbol(Date.getMilliseconds, Decl(lib.d.ts, --, --)) Date.prototype.getUTCMilliseconds(); ->Date.prototype.getUTCMilliseconds : Symbol(Date.getUTCMilliseconds, Decl(lib.d.ts, 682, 30)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getUTCMilliseconds : Symbol(Date.getUTCMilliseconds, Decl(lib.d.ts, 682, 30)) +>Date.prototype.getUTCMilliseconds : Symbol(Date.getUTCMilliseconds, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getUTCMilliseconds : Symbol(Date.getUTCMilliseconds, Decl(lib.d.ts, --, --)) Date.prototype.getTimezoneOffset(); ->Date.prototype.getTimezoneOffset : Symbol(Date.getTimezoneOffset, Decl(lib.d.ts, 684, 33)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->getTimezoneOffset : Symbol(Date.getTimezoneOffset, Decl(lib.d.ts, 684, 33)) +>Date.prototype.getTimezoneOffset : Symbol(Date.getTimezoneOffset, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>getTimezoneOffset : Symbol(Date.getTimezoneOffset, Decl(lib.d.ts, --, --)) Date.prototype.setTime(0); ->Date.prototype.setTime : Symbol(Date.setTime, Decl(lib.d.ts, 686, 32)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setTime : Symbol(Date.setTime, Decl(lib.d.ts, 686, 32)) +>Date.prototype.setTime : Symbol(Date.setTime, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setTime : Symbol(Date.setTime, Decl(lib.d.ts, --, --)) Date.prototype.setMilliseconds(0); ->Date.prototype.setMilliseconds : Symbol(Date.setMilliseconds, Decl(lib.d.ts, 691, 34)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setMilliseconds : Symbol(Date.setMilliseconds, Decl(lib.d.ts, 691, 34)) +>Date.prototype.setMilliseconds : Symbol(Date.setMilliseconds, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setMilliseconds : Symbol(Date.setMilliseconds, Decl(lib.d.ts, --, --)) Date.prototype.setUTCMilliseconds(0); ->Date.prototype.setUTCMilliseconds : Symbol(Date.setUTCMilliseconds, Decl(lib.d.ts, 696, 40)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setUTCMilliseconds : Symbol(Date.setUTCMilliseconds, Decl(lib.d.ts, 696, 40)) +>Date.prototype.setUTCMilliseconds : Symbol(Date.setUTCMilliseconds, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setUTCMilliseconds : Symbol(Date.setUTCMilliseconds, Decl(lib.d.ts, --, --)) Date.prototype.setSeconds(0); ->Date.prototype.setSeconds : Symbol(Date.setSeconds, Decl(lib.d.ts, 701, 43)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setSeconds : Symbol(Date.setSeconds, Decl(lib.d.ts, 701, 43)) +>Date.prototype.setSeconds : Symbol(Date.setSeconds, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setSeconds : Symbol(Date.setSeconds, Decl(lib.d.ts, --, --)) Date.prototype.setUTCSeconds(0); ->Date.prototype.setUTCSeconds : Symbol(Date.setUTCSeconds, Decl(lib.d.ts, 708, 49)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setUTCSeconds : Symbol(Date.setUTCSeconds, Decl(lib.d.ts, 708, 49)) +>Date.prototype.setUTCSeconds : Symbol(Date.setUTCSeconds, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setUTCSeconds : Symbol(Date.setUTCSeconds, Decl(lib.d.ts, --, --)) Date.prototype.setMinutes(0); ->Date.prototype.setMinutes : Symbol(Date.setMinutes, Decl(lib.d.ts, 714, 52)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setMinutes : Symbol(Date.setMinutes, Decl(lib.d.ts, 714, 52)) +>Date.prototype.setMinutes : Symbol(Date.setMinutes, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setMinutes : Symbol(Date.setMinutes, Decl(lib.d.ts, --, --)) Date.prototype.setUTCMinutes(0); ->Date.prototype.setUTCMinutes : Symbol(Date.setUTCMinutes, Decl(lib.d.ts, 721, 63)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setUTCMinutes : Symbol(Date.setUTCMinutes, Decl(lib.d.ts, 721, 63)) +>Date.prototype.setUTCMinutes : Symbol(Date.setUTCMinutes, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setUTCMinutes : Symbol(Date.setUTCMinutes, Decl(lib.d.ts, --, --)) Date.prototype.setHours(0); ->Date.prototype.setHours : Symbol(Date.setHours, Decl(lib.d.ts, 728, 66)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setHours : Symbol(Date.setHours, Decl(lib.d.ts, 728, 66)) +>Date.prototype.setHours : Symbol(Date.setHours, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setHours : Symbol(Date.setHours, Decl(lib.d.ts, --, --)) Date.prototype.setUTCHours(0); ->Date.prototype.setUTCHours : Symbol(Date.setUTCHours, Decl(lib.d.ts, 736, 77)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setUTCHours : Symbol(Date.setUTCHours, Decl(lib.d.ts, 736, 77)) +>Date.prototype.setUTCHours : Symbol(Date.setUTCHours, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setUTCHours : Symbol(Date.setUTCHours, Decl(lib.d.ts, --, --)) Date.prototype.setDate(0); ->Date.prototype.setDate : Symbol(Date.setDate, Decl(lib.d.ts, 744, 80)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setDate : Symbol(Date.setDate, Decl(lib.d.ts, 744, 80)) +>Date.prototype.setDate : Symbol(Date.setDate, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setDate : Symbol(Date.setDate, Decl(lib.d.ts, --, --)) Date.prototype.setUTCDate(0); ->Date.prototype.setUTCDate : Symbol(Date.setUTCDate, Decl(lib.d.ts, 749, 34)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setUTCDate : Symbol(Date.setUTCDate, Decl(lib.d.ts, 749, 34)) +>Date.prototype.setUTCDate : Symbol(Date.setUTCDate, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setUTCDate : Symbol(Date.setUTCDate, Decl(lib.d.ts, --, --)) Date.prototype.setMonth(0); ->Date.prototype.setMonth : Symbol(Date.setMonth, Decl(lib.d.ts, 754, 37)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setMonth : Symbol(Date.setMonth, Decl(lib.d.ts, 754, 37)) +>Date.prototype.setMonth : Symbol(Date.setMonth, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setMonth : Symbol(Date.setMonth, Decl(lib.d.ts, --, --)) Date.prototype.setUTCMonth(0); ->Date.prototype.setUTCMonth : Symbol(Date.setUTCMonth, Decl(lib.d.ts, 760, 51)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setUTCMonth : Symbol(Date.setUTCMonth, Decl(lib.d.ts, 760, 51)) +>Date.prototype.setUTCMonth : Symbol(Date.setUTCMonth, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setUTCMonth : Symbol(Date.setUTCMonth, Decl(lib.d.ts, --, --)) Date.prototype.setFullYear(0); ->Date.prototype.setFullYear : Symbol(Date.setFullYear, Decl(lib.d.ts, 766, 54)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setFullYear : Symbol(Date.setFullYear, Decl(lib.d.ts, 766, 54)) +>Date.prototype.setFullYear : Symbol(Date.setFullYear, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setFullYear : Symbol(Date.setFullYear, Decl(lib.d.ts, --, --)) Date.prototype.setUTCFullYear(0); ->Date.prototype.setUTCFullYear : Symbol(Date.setUTCFullYear, Decl(lib.d.ts, 773, 69)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->setUTCFullYear : Symbol(Date.setUTCFullYear, Decl(lib.d.ts, 773, 69)) +>Date.prototype.setUTCFullYear : Symbol(Date.setUTCFullYear, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>setUTCFullYear : Symbol(Date.setUTCFullYear, Decl(lib.d.ts, --, --)) Date.prototype.toUTCString(); ->Date.prototype.toUTCString : Symbol(Date.toUTCString, Decl(lib.d.ts, 780, 72)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->toUTCString : Symbol(Date.toUTCString, Decl(lib.d.ts, 780, 72)) +>Date.prototype.toUTCString : Symbol(Date.toUTCString, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>toUTCString : Symbol(Date.toUTCString, Decl(lib.d.ts, --, --)) Date.prototype.toISOString(); ->Date.prototype.toISOString : Symbol(Date.toISOString, Decl(lib.d.ts, 782, 26)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->toISOString : Symbol(Date.toISOString, Decl(lib.d.ts, 782, 26)) +>Date.prototype.toISOString : Symbol(Date.toISOString, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>toISOString : Symbol(Date.toISOString, Decl(lib.d.ts, --, --)) Date.prototype.toJSON(null); ->Date.prototype.toJSON : Symbol(Date.toJSON, Decl(lib.d.ts, 784, 26)) ->Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, 794, 15)) ->toJSON : Symbol(Date.toJSON, Decl(lib.d.ts, 784, 26)) +>Date.prototype.toJSON : Symbol(Date.toJSON, Decl(lib.d.ts, --, --)) +>Date.prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(DateConstructor.prototype, Decl(lib.d.ts, --, --)) +>toJSON : Symbol(Date.toJSON, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/library_ObjectPrototypeProperties.symbols b/tests/baselines/reference/library_ObjectPrototypeProperties.symbols index eb24374af2a..acbeccc02d0 100644 --- a/tests/baselines/reference/library_ObjectPrototypeProperties.symbols +++ b/tests/baselines/reference/library_ObjectPrototypeProperties.symbols @@ -2,52 +2,52 @@ // Properties of the Object Prototype Object as per ES5 spec // http://www.ecma-international.org/ecma-262/5.1/#sec-15.2.4 Object.prototype.constructor; ->Object.prototype.constructor : Symbol(Object.constructor, Decl(lib.d.ts, 94, 18)) ->Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->constructor : Symbol(Object.constructor, Decl(lib.d.ts, 94, 18)) +>Object.prototype.constructor : Symbol(Object.constructor, Decl(lib.d.ts, --, --)) +>Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>constructor : Symbol(Object.constructor, Decl(lib.d.ts, --, --)) Object.prototype.toString(); ->Object.prototype.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) ->Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>Object.prototype.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) +>Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) Object.prototype.toLocaleString(); ->Object.prototype.toLocaleString : Symbol(Object.toLocaleString, Decl(lib.d.ts, 99, 23)) ->Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->toLocaleString : Symbol(Object.toLocaleString, Decl(lib.d.ts, 99, 23)) +>Object.prototype.toLocaleString : Symbol(Object.toLocaleString, Decl(lib.d.ts, --, --)) +>Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>toLocaleString : Symbol(Object.toLocaleString, Decl(lib.d.ts, --, --)) Object.prototype.valueOf(); ->Object.prototype.valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, 102, 29)) ->Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, 102, 29)) +>Object.prototype.valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, --, --)) +>Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>valueOf : Symbol(Object.valueOf, Decl(lib.d.ts, --, --)) Object.prototype.hasOwnProperty("string"); ->Object.prototype.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) ->Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>Object.prototype.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) +>Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) Object.prototype.isPrototypeOf(Object); ->Object.prototype.isPrototypeOf : Symbol(Object.isPrototypeOf, Decl(lib.d.ts, 111, 39)) ->Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->isPrototypeOf : Symbol(Object.isPrototypeOf, Decl(lib.d.ts, 111, 39)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object.prototype.isPrototypeOf : Symbol(Object.isPrototypeOf, Decl(lib.d.ts, --, --)) +>Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>isPrototypeOf : Symbol(Object.isPrototypeOf, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) Object.prototype.propertyIsEnumerable("string"); ->Object.prototype.propertyIsEnumerable : Symbol(Object.propertyIsEnumerable, Decl(lib.d.ts, 117, 38)) ->Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, 129, 22)) ->propertyIsEnumerable : Symbol(Object.propertyIsEnumerable, Decl(lib.d.ts, 117, 38)) +>Object.prototype.propertyIsEnumerable : Symbol(Object.propertyIsEnumerable, Decl(lib.d.ts, --, --)) +>Object.prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ObjectConstructor.prototype, Decl(lib.d.ts, --, --)) +>propertyIsEnumerable : Symbol(Object.propertyIsEnumerable, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/library_RegExpExecArraySlice.symbols b/tests/baselines/reference/library_RegExpExecArraySlice.symbols index bc460801fe8..d1ad57ff1d5 100644 --- a/tests/baselines/reference/library_RegExpExecArraySlice.symbols +++ b/tests/baselines/reference/library_RegExpExecArraySlice.symbols @@ -2,20 +2,20 @@ // RegExpExecArray.slice can have zero, one, or two arguments var regExpExecArrayValue: RegExpExecArray; >regExpExecArrayValue : Symbol(regExpExecArrayValue, Decl(library_RegExpExecArraySlice.ts, 1, 3)) ->RegExpExecArray : Symbol(RegExpExecArray, Decl(lib.d.ts, 820, 1)) +>RegExpExecArray : Symbol(RegExpExecArray, Decl(lib.d.ts, --, --)) regExpExecArrayValue.slice(); ->regExpExecArrayValue.slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) +>regExpExecArrayValue.slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) >regExpExecArrayValue : Symbol(regExpExecArrayValue, Decl(library_RegExpExecArraySlice.ts, 1, 3)) ->slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) +>slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) regExpExecArrayValue.slice(0); ->regExpExecArrayValue.slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) +>regExpExecArrayValue.slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) >regExpExecArrayValue : Symbol(regExpExecArrayValue, Decl(library_RegExpExecArraySlice.ts, 1, 3)) ->slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) +>slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) regExpExecArrayValue.slice(0,1); ->regExpExecArrayValue.slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) +>regExpExecArrayValue.slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) >regExpExecArrayValue : Symbol(regExpExecArrayValue, Decl(library_RegExpExecArraySlice.ts, 1, 3)) ->slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15)) +>slice : Symbol(Array.slice, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/library_StringSlice.symbols b/tests/baselines/reference/library_StringSlice.symbols index 92c80089511..de79b8755ac 100644 --- a/tests/baselines/reference/library_StringSlice.symbols +++ b/tests/baselines/reference/library_StringSlice.symbols @@ -1,23 +1,23 @@ === tests/cases/compiler/library_StringSlice.ts === // String.prototype.slice can have zero, one, or two arguments String.prototype.slice(); ->String.prototype.slice : Symbol(String.slice, Decl(lib.d.ts, 369, 35)) ->String.prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, 435, 26)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) ->prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, 435, 26)) ->slice : Symbol(String.slice, Decl(lib.d.ts, 369, 35)) +>String.prototype.slice : Symbol(String.slice, Decl(lib.d.ts, --, --)) +>String.prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, --, --)) +>slice : Symbol(String.slice, Decl(lib.d.ts, --, --)) String.prototype.slice(0); ->String.prototype.slice : Symbol(String.slice, Decl(lib.d.ts, 369, 35)) ->String.prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, 435, 26)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) ->prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, 435, 26)) ->slice : Symbol(String.slice, Decl(lib.d.ts, 369, 35)) +>String.prototype.slice : Symbol(String.slice, Decl(lib.d.ts, --, --)) +>String.prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, --, --)) +>slice : Symbol(String.slice, Decl(lib.d.ts, --, --)) String.prototype.slice(0,1); ->String.prototype.slice : Symbol(String.slice, Decl(lib.d.ts, 369, 35)) ->String.prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, 435, 26)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) ->prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, 435, 26)) ->slice : Symbol(String.slice, Decl(lib.d.ts, 369, 35)) +>String.prototype.slice : Symbol(String.slice, Decl(lib.d.ts, --, --)) +>String.prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, --, --)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(StringConstructor.prototype, Decl(lib.d.ts, --, --)) +>slice : Symbol(String.slice, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/localTypes5.symbols b/tests/baselines/reference/localTypes5.symbols index 4ffe53b3e53..41851a617de 100644 --- a/tests/baselines/reference/localTypes5.symbols +++ b/tests/baselines/reference/localTypes5.symbols @@ -22,7 +22,7 @@ function foo() { >Y : Symbol(Y, Decl(localTypes5.ts, 3, 36)) })(); ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } } var x = new X(); diff --git a/tests/baselines/reference/logicalNotOperatorWithStringType.symbols b/tests/baselines/reference/logicalNotOperatorWithStringType.symbols index ff266361321..e91c8b71572 100644 --- a/tests/baselines/reference/logicalNotOperatorWithStringType.symbols +++ b/tests/baselines/reference/logicalNotOperatorWithStringType.symbols @@ -88,9 +88,9 @@ var ResultIsBoolean11 = !(STRING + STRING); var ResultIsBoolean12 = !STRING.charAt(0); >ResultIsBoolean12 : Symbol(ResultIsBoolean12, Decl(logicalNotOperatorWithStringType.ts, 32, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(logicalNotOperatorWithStringType.ts, 1, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) // multiple ! operator var ResultIsBoolean13 = !!STRING; diff --git a/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.symbols b/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.symbols index 6cfbf7ea6b6..a7dfba5f4cb 100644 --- a/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.symbols +++ b/tests/baselines/reference/logicalOrExpressionIsNotContextuallyTyped.symbols @@ -14,7 +14,7 @@ var r = a || ((a) => a.toLowerCase()); >r : Symbol(r, Decl(logicalOrExpressionIsNotContextuallyTyped.ts, 9, 3)) >a : Symbol(a, Decl(logicalOrExpressionIsNotContextuallyTyped.ts, 6, 3)) >a : Symbol(a, Decl(logicalOrExpressionIsNotContextuallyTyped.ts, 9, 15)) ->a.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>a.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(logicalOrExpressionIsNotContextuallyTyped.ts, 9, 15)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/memberAccessOnConstructorType.symbols b/tests/baselines/reference/memberAccessOnConstructorType.symbols index 0e3c707c4f9..c9c06c6f021 100644 --- a/tests/baselines/reference/memberAccessOnConstructorType.symbols +++ b/tests/baselines/reference/memberAccessOnConstructorType.symbols @@ -3,7 +3,7 @@ var f: new () => void; >f : Symbol(f, Decl(memberAccessOnConstructorType.ts, 0, 3)) f.arguments == 0; ->f.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>f.arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) >f : Symbol(f, Decl(memberAccessOnConstructorType.ts, 0, 3)) ->arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/mergedInterfaceFromMultipleFiles1.symbols b/tests/baselines/reference/mergedInterfaceFromMultipleFiles1.symbols index f34501f025b..78383c29377 100644 --- a/tests/baselines/reference/mergedInterfaceFromMultipleFiles1.symbols +++ b/tests/baselines/reference/mergedInterfaceFromMultipleFiles1.symbols @@ -11,7 +11,7 @@ interface C extends D { b(): Date; >b : Symbol(b, Decl(mergedInterfaceFromMultipleFiles1_1.ts, 4, 23)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var c:C; @@ -38,7 +38,7 @@ var d: number = c.a(); var e: Date = c.b(); >e : Symbol(e, Decl(mergedInterfaceFromMultipleFiles1_1.ts, 12, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >c.b : Symbol(C.b, Decl(mergedInterfaceFromMultipleFiles1_1.ts, 4, 23)) >c : Symbol(c, Decl(mergedInterfaceFromMultipleFiles1_1.ts, 8, 3)) >b : Symbol(C.b, Decl(mergedInterfaceFromMultipleFiles1_1.ts, 4, 23)) diff --git a/tests/baselines/reference/mergedInterfacesWithMultipleBases3.symbols b/tests/baselines/reference/mergedInterfacesWithMultipleBases3.symbols index 337ef1dbb1c..1aa65e8825a 100644 --- a/tests/baselines/reference/mergedInterfacesWithMultipleBases3.symbols +++ b/tests/baselines/reference/mergedInterfacesWithMultipleBases3.symbols @@ -69,7 +69,7 @@ class D implements A { b: Date; >b : Symbol(b, Decl(mergedInterfacesWithMultipleBases3.ts, 28, 14)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) c: string; >c : Symbol(c, Decl(mergedInterfacesWithMultipleBases3.ts, 29, 12)) diff --git a/tests/baselines/reference/negateOperatorWithStringType.symbols b/tests/baselines/reference/negateOperatorWithStringType.symbols index 00a90bdf743..5ef0afc7e1c 100644 --- a/tests/baselines/reference/negateOperatorWithStringType.symbols +++ b/tests/baselines/reference/negateOperatorWithStringType.symbols @@ -88,9 +88,9 @@ var ResultIsNumber11 = -(STRING + STRING); var ResultIsNumber12 = -STRING.charAt(0); >ResultIsNumber12 : Symbol(ResultIsNumber12, Decl(negateOperatorWithStringType.ts, 32, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(negateOperatorWithStringType.ts, 1, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) // miss assignment operators -""; diff --git a/tests/baselines/reference/nestedSelf.symbols b/tests/baselines/reference/nestedSelf.symbols index 08f41f155d6..a14a9b9d374 100644 --- a/tests/baselines/reference/nestedSelf.symbols +++ b/tests/baselines/reference/nestedSelf.symbols @@ -10,8 +10,8 @@ module M { public foo() { [1,2,3].map((x) => { return this.n * x; })} >foo : Symbol(foo, Decl(nestedSelf.ts, 2, 17)) ->[1,2,3].map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>[1,2,3].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(nestedSelf.ts, 3, 31)) >this.n : Symbol(n, Decl(nestedSelf.ts, 1, 17)) >this : Symbol(C, Decl(nestedSelf.ts, 0, 10)) diff --git a/tests/baselines/reference/newArrays.symbols b/tests/baselines/reference/newArrays.symbols index fd30b2fe25e..663b6380bc7 100644 --- a/tests/baselines/reference/newArrays.symbols +++ b/tests/baselines/reference/newArrays.symbols @@ -25,7 +25,7 @@ module M { >this.fa : Symbol(fa, Decl(newArrays.ts, 2, 12)) >this : Symbol(Gar, Decl(newArrays.ts, 1, 13)) >fa : Symbol(fa, Decl(newArrays.ts, 2, 12)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Foo : Symbol(Foo, Decl(newArrays.ts, 0, 10)) >this.x : Symbol(x, Decl(newArrays.ts, 3, 19)) >this : Symbol(Gar, Decl(newArrays.ts, 1, 13)) diff --git a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols index 9144d725efb..6cee1604cf0 100644 --- a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols +++ b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols @@ -4,11 +4,11 @@ var regexMatchList = ['', '']; >regexMatchList : Symbol(regexMatchList, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 1, 3)) regexMatchList.forEach(match => ''.replace(match, '')); ->regexMatchList.forEach : Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) +>regexMatchList.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >regexMatchList : Symbol(regexMatchList, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 1, 3)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >match : Symbol(match, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 2, 23)) ->''.replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) ->replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) +>''.replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >match : Symbol(match, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 2, 23)) diff --git a/tests/baselines/reference/noImplicitAnyIndexingSuppressed.symbols b/tests/baselines/reference/noImplicitAnyIndexingSuppressed.symbols index 7c8f57795b4..96b38408560 100644 --- a/tests/baselines/reference/noImplicitAnyIndexingSuppressed.symbols +++ b/tests/baselines/reference/noImplicitAnyIndexingSuppressed.symbols @@ -74,7 +74,7 @@ var m: MyMap = { "1": 1, "2": 2, "Okay that's enough for today.": NaN ->NaN : Symbol(NaN, Decl(lib.d.ts, 21, 11)) +>NaN : Symbol(NaN, Decl(lib.d.ts, --, --)) }; diff --git a/tests/baselines/reference/nullAssignableToEveryType.symbols b/tests/baselines/reference/nullAssignableToEveryType.symbols index 7179a02c0bc..a01077c8eb4 100644 --- a/tests/baselines/reference/nullAssignableToEveryType.symbols +++ b/tests/baselines/reference/nullAssignableToEveryType.symbols @@ -38,7 +38,7 @@ var d: boolean = null; var e: Date = null; >e : Symbol(e, Decl(nullAssignableToEveryType.ts, 15, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var f: any = null; >f : Symbol(f, Decl(nullAssignableToEveryType.ts, 16, 3)) @@ -48,7 +48,7 @@ var g: void = null; var h: Object = null; >h : Symbol(h, Decl(nullAssignableToEveryType.ts, 18, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var i: {} = null; >i : Symbol(i, Decl(nullAssignableToEveryType.ts, 19, 3)) @@ -58,7 +58,7 @@ var j: () => {} = null; var k: Function = null; >k : Symbol(k, Decl(nullAssignableToEveryType.ts, 21, 3)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var l: (x: number) => string = null; >l : Symbol(l, Decl(nullAssignableToEveryType.ts, 22, 3)) @@ -89,18 +89,18 @@ var o: (x: T) => T = null; var p: Number = null; >p : Symbol(p, Decl(nullAssignableToEveryType.ts, 29, 3)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var q: String = null; >q : Symbol(q, Decl(nullAssignableToEveryType.ts, 30, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo(x: T, y: U, z: V) { >foo : Symbol(foo, Decl(nullAssignableToEveryType.ts, 30, 21)) >T : Symbol(T, Decl(nullAssignableToEveryType.ts, 32, 13)) >U : Symbol(U, Decl(nullAssignableToEveryType.ts, 32, 15)) >V : Symbol(V, Decl(nullAssignableToEveryType.ts, 32, 18)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(nullAssignableToEveryType.ts, 32, 35)) >T : Symbol(T, Decl(nullAssignableToEveryType.ts, 32, 13)) >y : Symbol(y, Decl(nullAssignableToEveryType.ts, 32, 40)) diff --git a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.symbols b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.symbols index 7f81995c9be..cb6fab17560 100644 --- a/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.symbols +++ b/tests/baselines/reference/nullIsSubtypeOfEverythingButUndefined.symbols @@ -39,11 +39,11 @@ var r3 = true ? null : true; var r4 = true ? new Date() : null; >r4 : Symbol(r4, Decl(nullIsSubtypeOfEverythingButUndefined.ts, 18, 3), Decl(nullIsSubtypeOfEverythingButUndefined.ts, 19, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r4 = true ? null : new Date(); >r4 : Symbol(r4, Decl(nullIsSubtypeOfEverythingButUndefined.ts, 18, 3), Decl(nullIsSubtypeOfEverythingButUndefined.ts, 19, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r5 = true ? /1/ : null; >r5 : Symbol(r5, Decl(nullIsSubtypeOfEverythingButUndefined.ts, 21, 3), Decl(nullIsSubtypeOfEverythingButUndefined.ts, 22, 3)) @@ -233,11 +233,11 @@ function f18(x: U) { var r19 = true ? new Object() : null; >r19 : Symbol(r19, Decl(nullIsSubtypeOfEverythingButUndefined.ts, 85, 3), Decl(nullIsSubtypeOfEverythingButUndefined.ts, 86, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r19 = true ? null : new Object(); >r19 : Symbol(r19, Decl(nullIsSubtypeOfEverythingButUndefined.ts, 85, 3), Decl(nullIsSubtypeOfEverythingButUndefined.ts, 86, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r20 = true ? {} : null; >r20 : Symbol(r20, Decl(nullIsSubtypeOfEverythingButUndefined.ts, 88, 3), Decl(nullIsSubtypeOfEverythingButUndefined.ts, 89, 3)) diff --git a/tests/baselines/reference/numberPropertyAccess.symbols b/tests/baselines/reference/numberPropertyAccess.symbols index fdfd4c404de..4792c16609a 100644 --- a/tests/baselines/reference/numberPropertyAccess.symbols +++ b/tests/baselines/reference/numberPropertyAccess.symbols @@ -4,23 +4,23 @@ var x = 1; var a = x.toExponential(); >a : Symbol(a, Decl(numberPropertyAccess.ts, 1, 3)) ->x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>x.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(numberPropertyAccess.ts, 0, 3)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) var b = x.hasOwnProperty('toFixed'); >b : Symbol(b, Decl(numberPropertyAccess.ts, 2, 3)) ->x.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>x.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(numberPropertyAccess.ts, 0, 3)) ->hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) var c = x['toExponential'](); >c : Symbol(c, Decl(numberPropertyAccess.ts, 4, 3)) >x : Symbol(x, Decl(numberPropertyAccess.ts, 0, 3)) ->'toExponential' : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>'toExponential' : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) var d = x['hasOwnProperty']('toFixed'); >d : Symbol(d, Decl(numberPropertyAccess.ts, 5, 3)) >x : Symbol(x, Decl(numberPropertyAccess.ts, 0, 3)) ->'hasOwnProperty' : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>'hasOwnProperty' : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/objectLitGetterSetter.symbols b/tests/baselines/reference/objectLitGetterSetter.symbols index 512e459c8c0..15f3cdd8a4f 100644 --- a/tests/baselines/reference/objectLitGetterSetter.symbols +++ b/tests/baselines/reference/objectLitGetterSetter.symbols @@ -3,17 +3,17 @@ >obj : Symbol(obj, Decl(objectLitGetterSetter.ts, 0, 15)) Object.defineProperty(obj, "accProperty", ({ ->Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.d.ts, 160, 60)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) ->defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.d.ts, 160, 60)) +>Object.defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.d.ts, --, --)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>defineProperty : Symbol(ObjectConstructor.defineProperty, Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(objectLitGetterSetter.ts, 0, 15)) ->PropertyDescriptor : Symbol(PropertyDescriptor, Decl(lib.d.ts, 79, 66)) +>PropertyDescriptor : Symbol(PropertyDescriptor, Decl(lib.d.ts, --, --)) get: function () { >get : Symbol(get, Decl(objectLitGetterSetter.ts, 1, 76)) eval("public = 1;"); ->eval : Symbol(eval, Decl(lib.d.ts, 22, 29)) +>eval : Symbol(eval, Decl(lib.d.ts, --, --)) return 11; }, diff --git a/tests/baselines/reference/objectMembersOnTypes.symbols b/tests/baselines/reference/objectMembersOnTypes.symbols index 12cc909dcd9..3114d3b9695 100644 --- a/tests/baselines/reference/objectMembersOnTypes.symbols +++ b/tests/baselines/reference/objectMembersOnTypes.symbols @@ -10,25 +10,25 @@ var x: number; >x : Symbol(x, Decl(objectMembersOnTypes.ts, 2, 3)) x.toString(); ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectMembersOnTypes.ts, 2, 3)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) var i: I; >i : Symbol(i, Decl(objectMembersOnTypes.ts, 4, 3)) >I : Symbol(I, Decl(objectMembersOnTypes.ts, 0, 0)) i.toString(); // used to be an error ->i.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>i.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(objectMembersOnTypes.ts, 4, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var c: AAA; >c : Symbol(c, Decl(objectMembersOnTypes.ts, 6, 3)) >AAA : Symbol(AAA, Decl(objectMembersOnTypes.ts, 0, 14)) c.toString(); // used to be an error ->c.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>c.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >c : Symbol(c, Decl(objectMembersOnTypes.ts, 6, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/objectTypePropertyAccess.symbols b/tests/baselines/reference/objectTypePropertyAccess.symbols index 519bf589260..2117b9ce35a 100644 --- a/tests/baselines/reference/objectTypePropertyAccess.symbols +++ b/tests/baselines/reference/objectTypePropertyAccess.symbols @@ -13,14 +13,14 @@ var c: C; var r1 = c.toString(); >r1 : Symbol(r1, Decl(objectTypePropertyAccess.ts, 6, 3)) ->c.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>c.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >c : Symbol(c, Decl(objectTypePropertyAccess.ts, 5, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var r2 = c['toString'](); >r2 : Symbol(r2, Decl(objectTypePropertyAccess.ts, 7, 3)) >c : Symbol(c, Decl(objectTypePropertyAccess.ts, 5, 3)) ->'toString' : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>'toString' : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var r3 = c.foo; >r3 : Symbol(r3, Decl(objectTypePropertyAccess.ts, 8, 3)) @@ -45,14 +45,14 @@ var i: I; var r4 = i.toString(); >r4 : Symbol(r4, Decl(objectTypePropertyAccess.ts, 9, 3), Decl(objectTypePropertyAccess.ts, 15, 3)) ->i.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>i.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(objectTypePropertyAccess.ts, 14, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var r5 = i['toString'](); >r5 : Symbol(r5, Decl(objectTypePropertyAccess.ts, 16, 3)) >i : Symbol(i, Decl(objectTypePropertyAccess.ts, 14, 3)) ->'toString' : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>'toString' : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var r6 = i.bar; >r6 : Symbol(r6, Decl(objectTypePropertyAccess.ts, 17, 3)) @@ -74,14 +74,14 @@ var a = { var r8 = a.toString(); >r8 : Symbol(r8, Decl(objectTypePropertyAccess.ts, 24, 3)) ->a.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>a.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(objectTypePropertyAccess.ts, 20, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var r9 = a['toString'](); >r9 : Symbol(r9, Decl(objectTypePropertyAccess.ts, 25, 3)) >a : Symbol(a, Decl(objectTypePropertyAccess.ts, 20, 3)) ->'toString' : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>'toString' : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var r10 = a.foo; >r10 : Symbol(r10, Decl(objectTypePropertyAccess.ts, 26, 3)) diff --git a/tests/baselines/reference/objectTypeWithCallSignatureAppearsToBeFunctionType.symbols b/tests/baselines/reference/objectTypeWithCallSignatureAppearsToBeFunctionType.symbols index 36127117f43..60b7b08397a 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureAppearsToBeFunctionType.symbols +++ b/tests/baselines/reference/objectTypeWithCallSignatureAppearsToBeFunctionType.symbols @@ -20,9 +20,9 @@ var r2b: (x: any, y?: any) => any = i.apply; >r2b : Symbol(r2b, Decl(objectTypeWithCallSignatureAppearsToBeFunctionType.ts, 9, 3)) >x : Symbol(x, Decl(objectTypeWithCallSignatureAppearsToBeFunctionType.ts, 9, 10)) >y : Symbol(y, Decl(objectTypeWithCallSignatureAppearsToBeFunctionType.ts, 9, 17)) ->i.apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>i.apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(objectTypeWithCallSignatureAppearsToBeFunctionType.ts, 7, 3)) ->apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) var b: { >b : Symbol(b, Decl(objectTypeWithCallSignatureAppearsToBeFunctionType.ts, 11, 3)) @@ -38,7 +38,7 @@ var rb4: (x: any, y?: any) => any = b.apply; >rb4 : Symbol(rb4, Decl(objectTypeWithCallSignatureAppearsToBeFunctionType.ts, 16, 3)) >x : Symbol(x, Decl(objectTypeWithCallSignatureAppearsToBeFunctionType.ts, 16, 10)) >y : Symbol(y, Decl(objectTypeWithCallSignatureAppearsToBeFunctionType.ts, 16, 17)) ->b.apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>b.apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(objectTypeWithCallSignatureAppearsToBeFunctionType.ts, 11, 3)) ->apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.symbols b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.symbols index de1f2abc5aa..2d80be5f4ea 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.symbols +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.symbols @@ -3,14 +3,14 @@ // no errors expected below interface Function { ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 0, 0)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 0, 0)) data: number; >data : Symbol(data, Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 3, 20)) [x: string]: Object; >x : Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 5, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface I { @@ -50,9 +50,9 @@ var r1b: (thisArg: number, ...argArray: number[]) => void = i.call; var r1c = i.arguments; >r1c : Symbol(r1c, Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 17, 3)) ->i.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>i.arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 14, 3)) ->arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) var r1d = i.data; >r1d : Symbol(r1d, Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 18, 3)) @@ -97,9 +97,9 @@ var r2b: (thisArg: number, ...argArray: number[]) => void = x.call; var r2c = x.arguments; >r2c : Symbol(r2c, Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 29, 3)) ->x.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>x.arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 21, 3)) ->arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) var r2d = x.data; >r2d : Symbol(r2d, Decl(objectTypeWithCallSignatureHidingMembersOfExtendedFunction.ts, 30, 3)) diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunction.symbols b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunction.symbols index 0ddebe0e68c..07b0ca1a9c1 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunction.symbols +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunction.symbols @@ -39,9 +39,9 @@ var r1b: (thisArg: number, ...argArray: number[]) => void = i.call; var r1c = i.arguments; >r1c : Symbol(r1c, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 12, 3)) ->i.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>i.arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 9, 3)) ->arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) var x: { >x : Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3)) @@ -76,7 +76,7 @@ var r2b: (thisArg: number, ...argArray: number[]) => void = x.call; var r2c = x.arguments; >r2c : Symbol(r2c, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 22, 3)) ->x.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>x.arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3)) ->arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.symbols b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.symbols index 57479c548ee..009291b0fb3 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.symbols +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.symbols @@ -1,13 +1,13 @@ === tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts === interface Function { ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11), Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 0, 0)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 0, 0)) data: number; >data : Symbol(data, Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 0, 20)) [x: string]: Object; >x : Symbol(x, Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 2, 5)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface I { @@ -47,9 +47,9 @@ var r1b: (thisArg: number, ...argArray: number[]) => void = i.call; var r1c = i.arguments; >r1c : Symbol(r1c, Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 14, 3)) ->i.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>i.arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 11, 3)) ->arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) var r1d = i.data; >r1d : Symbol(r1d, Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 15, 3)) @@ -94,9 +94,9 @@ var r2b: (thisArg: number, ...argArray: number[]) => void = x.call; var r2c = x.arguments; >r2c : Symbol(r2c, Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 26, 3)) ->x.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>x.arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 18, 3)) ->arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) var r2d = x.data; >r2d : Symbol(r2d, Decl(objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.ts, 27, 3)) diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunction.symbols b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunction.symbols index 8478fd1d37c..c623bcb6f63 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunction.symbols +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunction.symbols @@ -36,9 +36,9 @@ var r1b: (thisArg: number, ...argArray: number[]) => void = i.call; var r1c = i.arguments; >r1c : Symbol(r1c, Decl(objectTypeWithConstructSignatureHidingMembersOfFunction.ts, 9, 3)) ->i.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>i.arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(objectTypeWithConstructSignatureHidingMembersOfFunction.ts, 6, 3)) ->arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) var x: { >x : Symbol(x, Decl(objectTypeWithConstructSignatureHidingMembersOfFunction.ts, 11, 3)) @@ -73,7 +73,7 @@ var r2b: (thisArg: number, ...argArray: number[]) => void = x.call; var r2c = x.arguments; >r2c : Symbol(r2c, Decl(objectTypeWithConstructSignatureHidingMembersOfFunction.ts, 19, 3)) ->x.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>x.arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypeWithConstructSignatureHidingMembersOfFunction.ts, 11, 3)) ->arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19)) +>arguments : Symbol(Function.arguments, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.symbols b/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.symbols index c95105a8626..d3c463d9a15 100644 --- a/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.symbols +++ b/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.symbols @@ -9,19 +9,19 @@ class C { "0.1": void; ".1": Object; ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "1": number; "1.": string; "1..": boolean; "1.0": Date; ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "-1.0": RegExp; ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "-1": Date; ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var c: C; @@ -115,19 +115,19 @@ interface I { "0.1": void; ".1": Object; ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "1": number; "1.": string; "1..": boolean; "1.0": Date; ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "-1.0": RegExp; ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "-1": Date; ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var i: I; @@ -221,19 +221,19 @@ var a: { "0.1": void; ".1": Object; ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "1": number; "1.": string; "1..": boolean; "1.0": Date; ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "-1.0": RegExp; ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "-1": Date; ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var r1 = a['0.1']; @@ -323,17 +323,17 @@ var b = { "0.1": null, ".1": new Object(), ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "1": 1, "1.": "", "1..": true, "1.0": new Date(), ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) "-1.0": /123/, "-1": Date ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) }; diff --git a/tests/baselines/reference/objectTypesIdentity2.symbols b/tests/baselines/reference/objectTypesIdentity2.symbols index e78def5ca00..6db54e5b59a 100644 --- a/tests/baselines/reference/objectTypesIdentity2.symbols +++ b/tests/baselines/reference/objectTypesIdentity2.symbols @@ -29,13 +29,13 @@ interface I { foo: Date; >foo : Symbol(foo, Decl(objectTypesIdentity2.ts, 14, 13)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var a: { foo: RegExp; } >a : Symbol(a, Decl(objectTypesIdentity2.ts, 18, 3)) >foo : Symbol(foo, Decl(objectTypesIdentity2.ts, 18, 8)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) enum E { A } >E : Symbol(E, Decl(objectTypesIdentity2.ts, 18, 23)) diff --git a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.symbols b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.symbols index 85c138a8c34..7e081608bc0 100644 --- a/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithCallSignatures2.symbols @@ -51,13 +51,13 @@ var a: { foo(x: Date): string } >a : Symbol(a, Decl(objectTypesIdentityWithCallSignatures2.ts, 22, 3)) >foo : Symbol(foo, Decl(objectTypesIdentityWithCallSignatures2.ts, 22, 8)) >x : Symbol(x, Decl(objectTypesIdentityWithCallSignatures2.ts, 22, 13)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var b = { foo(x: RegExp) { return ''; } }; >b : Symbol(b, Decl(objectTypesIdentityWithCallSignatures2.ts, 23, 3)) >foo : Symbol(foo, Decl(objectTypesIdentityWithCallSignatures2.ts, 23, 9)) >x : Symbol(x, Decl(objectTypesIdentityWithCallSignatures2.ts, 23, 14)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1(x: A); >foo1 : Symbol(foo1, Decl(objectTypesIdentityWithCallSignatures2.ts, 23, 42), Decl(objectTypesIdentityWithCallSignatures2.ts, 25, 20), Decl(objectTypesIdentityWithCallSignatures2.ts, 26, 20)) diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.symbols b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.symbols index 0d37d7fc97b..90ec832873c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.symbols @@ -37,13 +37,13 @@ interface I2 { var a: { new(x: Date): string } >a : Symbol(a, Decl(objectTypesIdentityWithConstructSignatures2.ts, 18, 3)) >x : Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 18, 13)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var b = { new(x: RegExp) { return ''; } }; // not a construct signature, function called new >b : Symbol(b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 3)) >new : Symbol(new, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 9)) >x : Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 14)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1b(x: B); >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 42), Decl(objectTypesIdentityWithConstructSignatures2.ts, 21, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 22, 21)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.symbols index 3b681c55c13..b8432af2425 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.symbols @@ -9,7 +9,7 @@ class A { foo(x: T): string { return null; } >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 4, 9)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 5, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 5, 24)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 5, 8)) } @@ -17,7 +17,7 @@ class A { class B> { >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 6, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 8, 8)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo(x: T): string { return null; } >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 8, 34)) @@ -28,7 +28,7 @@ class B> { class C { >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 12, 8)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo(x: T): string { return null; } >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 12, 27)) @@ -39,7 +39,7 @@ class C { interface I { >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 14, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 16, 12)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo(x: T): string; >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 16, 31)) @@ -53,7 +53,7 @@ interface I2 { foo(x: T): string; >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 20, 14)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 21, 8)) ->Boolean : Symbol(Boolean, Decl(lib.d.ts, 443, 38), Decl(lib.d.ts, 456, 11)) +>Boolean : Symbol(Boolean, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 21, 27)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 21, 8)) } @@ -62,7 +62,7 @@ var a: { foo>(x: T): string } >a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 24, 3)) >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 24, 8)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 24, 13)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 24, 38)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 24, 13)) @@ -70,7 +70,7 @@ var b = { foo(x: T) { return ''; } }; >b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 25, 3)) >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 25, 9)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 25, 14)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 25, 32)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 25, 14)) @@ -92,13 +92,13 @@ function foo1b(x: B>); >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 29, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 31, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 32, 36)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 31, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 6, 1)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1b(x: B>); // error >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 29, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 31, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 32, 36)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 32, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 6, 1)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1b(x: any) { } >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 29, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 31, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 32, 36)) @@ -108,13 +108,13 @@ function foo1c(x: C); >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 35, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 36, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 35, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1c(x: C); // error >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 35, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 36, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 36, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1c(x: any) { } >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 35, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 36, 29)) @@ -124,13 +124,13 @@ function foo2(x: I); >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 39, 28), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 40, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 39, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 14, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo2(x: I); // error >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 39, 28), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 40, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 40, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 14, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo2(x: any) { } >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 39, 28), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 40, 28)) @@ -173,7 +173,7 @@ function foo5(x: B>); // ok >foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 51, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 52, 35)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 52, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 6, 1)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo5(x: any) { } >foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 51, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 52, 35)) @@ -188,7 +188,7 @@ function foo5b(x: C); // ok >foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 55, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 56, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 56, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo5b(x: any) { } >foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 55, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 56, 29)) @@ -203,7 +203,7 @@ function foo6(x: I); // ok >foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 57, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 59, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 60, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 60, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 14, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo6(x: any) { } >foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 57, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 59, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 60, 28)) @@ -227,13 +227,13 @@ function foo8(x: B>); >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 65, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 67, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 68, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 67, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 6, 1)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: I); // ok >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 65, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 67, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 68, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 68, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 14, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: any) { } >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 65, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 67, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 68, 28)) @@ -243,13 +243,13 @@ function foo9(x: B>); >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 71, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 72, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 71, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 6, 1)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo9(x: C); // ok >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 71, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 72, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 72, 14)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo9(x: any) { } >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 71, 35), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 72, 28)) @@ -259,7 +259,7 @@ function foo10(x: B>); >foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 75, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 76, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 75, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 6, 1)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo10(x: typeof a); // ok >foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 75, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 76, 28)) @@ -274,7 +274,7 @@ function foo11(x: B>); >foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 77, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 79, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 80, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 79, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 6, 1)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo11(x: typeof b); // ok >foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 77, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 79, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 80, 28)) @@ -289,13 +289,13 @@ function foo12(x: I); >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 83, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 84, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 83, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 14, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: C); // ok >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 83, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 84, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 84, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 83, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 84, 29)) @@ -310,7 +310,7 @@ function foo12b(x: C); // ok >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 85, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 87, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 88, 30)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 88, 16)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12b(x: any) { } >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 85, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 87, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 88, 30)) @@ -320,7 +320,7 @@ function foo13(x: I); >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 89, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 91, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 92, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 91, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 14, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo13(x: typeof a); // ok >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 89, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 91, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 92, 28)) @@ -335,7 +335,7 @@ function foo14(x: I); >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 95, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 96, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 95, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 14, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo14(x: typeof b); // ok >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 95, 29), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 96, 28)) @@ -355,7 +355,7 @@ function foo15(x: C); // ok >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 99, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 100, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 100, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 10, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo15(x: any) { } >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 99, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.ts, 100, 29)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.symbols index a9210b20f32..e199d538e4b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.symbols @@ -41,7 +41,7 @@ interface I { >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts, 16, 16)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts, 17, 8)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts, 16, 12)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface I2 { @@ -52,7 +52,7 @@ interface I2 { >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts, 21, 8)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts, 21, 11)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.ts, 21, 8)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var a: { foo(x: T): T } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.symbols index e1c4e120370..a0c520ef3fa 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.symbols @@ -9,7 +9,7 @@ class A { foo(x: T): string { return null; } >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 4, 9)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 5, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 5, 24)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 5, 8)) } @@ -17,7 +17,7 @@ class A { class B { >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 6, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 8, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo(x: T): number { return null; } >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 8, 25)) @@ -28,7 +28,7 @@ class B { class C { >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 10, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 12, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo(x: T): boolean { return null; } >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 12, 25)) @@ -39,13 +39,13 @@ class C { interface I { >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 14, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 16, 12)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo(x: T): Date; >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 16, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 17, 8)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 16, 12)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface I2 { @@ -54,17 +54,17 @@ interface I2 { foo(x: T): RegExp; >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 20, 14)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 21, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 21, 24)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 21, 8)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var a: { foo(x: T): T } >a : Symbol(a, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 24, 3)) >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 24, 8)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 24, 13)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 24, 29)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 24, 13)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 24, 13)) @@ -73,7 +73,7 @@ var b = { foo(x: T) { return null; } }; >b : Symbol(b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 25, 3)) >foo : Symbol(foo, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 25, 9)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 25, 14)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 25, 30)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 25, 14)) @@ -95,13 +95,13 @@ function foo1b(x: B); >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 29, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 31, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 32, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 31, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1b(x: B); // error >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 29, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 31, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 32, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 32, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1b(x: any) { } >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 29, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 31, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 32, 27)) @@ -111,13 +111,13 @@ function foo1c(x: C); >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 35, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 36, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 35, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1c(x: C); // error >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 35, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 36, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 36, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1c(x: any) { } >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 33, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 35, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 36, 27)) @@ -127,13 +127,13 @@ function foo2(x: I); >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 39, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 40, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 39, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 14, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo2(x: I); // error >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 39, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 40, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 40, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 14, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo2(x: any) { } >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 37, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 39, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 40, 26)) @@ -176,7 +176,7 @@ function foo5(x: B); // ok >foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 51, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 52, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 52, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo5(x: any) { } >foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 49, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 51, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 52, 26)) @@ -191,7 +191,7 @@ function foo5b(x: C); // ok >foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 55, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 56, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 56, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo5b(x: any) { } >foo5b : Symbol(foo5b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 53, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 55, 21), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 56, 27)) @@ -206,7 +206,7 @@ function foo6(x: I); // ok >foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 57, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 59, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 60, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 60, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 14, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo6(x: any) { } >foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 57, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 59, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 60, 26)) @@ -230,13 +230,13 @@ function foo8(x: B); >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 65, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 67, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 68, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 67, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: I); // ok >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 65, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 67, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 68, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 68, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 14, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: any) { } >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 65, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 67, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 68, 26)) @@ -246,13 +246,13 @@ function foo9(x: B); >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 71, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 72, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 71, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo9(x: C); // ok >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 71, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 72, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 72, 14)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo9(x: any) { } >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 69, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 71, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 72, 26)) @@ -262,7 +262,7 @@ function foo10(x: B); >foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 75, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 76, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 75, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo10(x: typeof a); // ok >foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 73, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 75, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 76, 28)) @@ -277,7 +277,7 @@ function foo11(x: B); >foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 77, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 79, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 80, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 79, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo11(x: typeof b); // ok >foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 77, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 79, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 80, 28)) @@ -292,13 +292,13 @@ function foo12(x: I); >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 83, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 84, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 83, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 14, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: C); // ok >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 83, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 84, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 84, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 81, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 83, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 84, 27)) @@ -313,7 +313,7 @@ function foo12b(x: C); // ok >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 85, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 87, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 88, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 88, 16)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12b(x: any) { } >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 85, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 87, 23), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 88, 28)) @@ -323,7 +323,7 @@ function foo13(x: I); >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 89, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 91, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 92, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 91, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 14, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo13(x: typeof a); // ok >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 89, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 91, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 92, 28)) @@ -338,7 +338,7 @@ function foo14(x: I); >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 95, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 96, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 95, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 14, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo14(x: typeof b); // ok >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 93, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 95, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 96, 28)) @@ -358,7 +358,7 @@ function foo15(x: C); // ok >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 99, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 100, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 100, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo15(x: any) { } >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 97, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 99, 22), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.ts, 100, 27)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.symbols index 9b801aa2c6f..a4760572e7d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.symbols @@ -211,7 +211,7 @@ function foo6(x: I); // ok >foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 55, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 57, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 58, 51)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 58, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 12, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo6(x: any) { } >foo6 : Symbol(foo6, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 55, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 57, 20), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 58, 51)) @@ -240,7 +240,7 @@ function foo8(x: I); // error >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 63, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 65, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 66, 51)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 66, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 12, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: any) { } >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 63, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 65, 36), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 66, 51)) @@ -294,14 +294,14 @@ function foo12(x: I, number, Date, string>); >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 81, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 12, 1)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 4, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: C, number, Date>); // error >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 79, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 81, 62), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 82, 54)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 82, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 8, 1)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 4, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 79, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 81, 62), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 82, 54)) @@ -325,9 +325,9 @@ function foo13(x: I); >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 87, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 89, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 90, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 89, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 12, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo13(x: typeof a); // ok >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 87, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 89, 49), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 90, 28)) @@ -342,8 +342,8 @@ function foo14(x: I); >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 91, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 93, 52), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 94, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 93, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 12, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo14(x: typeof b); // ok >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 91, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 93, 52), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.ts, 94, 28)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.symbols index 7e9f1a97f69..d1f87946de5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.symbols @@ -85,7 +85,7 @@ function foo13(x: I); >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 23, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 25, 52), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 26, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 25, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo13(x: typeof a); // ok >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 23, 25), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 25, 52), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 26, 28)) @@ -100,7 +100,7 @@ function foo14(x: I); >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 27, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 29, 52), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 30, 22)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 29, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo14(x: I2); // error >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 27, 26), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 29, 52), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 30, 22)) @@ -129,7 +129,7 @@ function foo15(x: I); >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 35, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 37, 52), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 38, 22)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 37, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo15(x: I2); // ok >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 35, 27), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 37, 52), Decl(objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.ts, 38, 22)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.symbols index 6f53dcf17b2..fb3fba82cb2 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.symbols @@ -6,7 +6,7 @@ class B> { >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 0, 0)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 4, 8)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) constructor(x: T) { return null; } >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 5, 16)) @@ -16,7 +16,7 @@ class B> { class C { >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 8, 8)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) constructor(x: T) { return null; } >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 9, 16)) @@ -26,7 +26,7 @@ class C { interface I { >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 10, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 12, 12)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) new(x: T): string; >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 13, 8)) @@ -38,7 +38,7 @@ interface I2 { new(x: T): string; >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 17, 8)) ->Boolean : Symbol(Boolean, Decl(lib.d.ts, 443, 38), Decl(lib.d.ts, 456, 11)) +>Boolean : Symbol(Boolean, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 17, 27)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 17, 8)) } @@ -46,7 +46,7 @@ interface I2 { var a: { new>(x: T): string } >a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 20, 3)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 20, 13)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 20, 38)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 20, 13)) @@ -54,7 +54,7 @@ var b = { new(x: T) { return ''; } }; // not a construct signa >b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 21, 3)) >new : Symbol(new, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 21, 9)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 21, 14)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 21, 32)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 21, 14)) @@ -62,13 +62,13 @@ function foo1b(x: B>); >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 21, 55), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 23, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 24, 36)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 23, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1b(x: B>); // error >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 21, 55), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 23, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 24, 36)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 24, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1b(x: any) { } >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 21, 55), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 23, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 24, 36)) @@ -78,13 +78,13 @@ function foo1c(x: C); >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 27, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 28, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 27, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1c(x: C); // error >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 27, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 28, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 28, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1c(x: any) { } >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 27, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 28, 29)) @@ -94,13 +94,13 @@ function foo2(x: I); >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 31, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 32, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 31, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 10, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo2(x: I); // error >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 31, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 32, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 32, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 10, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo2(x: any) { } >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 31, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 32, 28)) @@ -138,13 +138,13 @@ function foo8(x: B>); >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 43, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 44, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 43, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: I); // ok >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 43, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 44, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 44, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 10, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: any) { } >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 43, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 44, 28)) @@ -154,13 +154,13 @@ function foo9(x: B>); >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 47, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 48, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 47, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo9(x: C); // error, types are structurally equal >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 47, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 48, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 48, 14)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo9(x: any) { } >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 47, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 48, 28)) @@ -170,7 +170,7 @@ function foo10(x: B>); >foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 49, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 51, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 52, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 51, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo10(x: typeof a); // ok >foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 49, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 51, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 52, 28)) @@ -185,7 +185,7 @@ function foo11(x: B>); >foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 53, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 55, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 56, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 55, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 0, 0)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo11(x: typeof b); // ok >foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 53, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 55, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 56, 28)) @@ -200,13 +200,13 @@ function foo12(x: I); >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 59, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 60, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 59, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 10, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: C); // ok >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 59, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 60, 29)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 60, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 59, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 60, 29)) @@ -221,7 +221,7 @@ function foo12b(x: C); // ok >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 61, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 63, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 64, 30)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 64, 16)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 6, 1)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12b(x: any) { } >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 61, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 63, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 64, 30)) @@ -231,7 +231,7 @@ function foo13(x: I); >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 65, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 67, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 68, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 67, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 10, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo13(x: typeof a); // ok >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 65, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 67, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 68, 28)) @@ -246,7 +246,7 @@ function foo14(x: I); >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 69, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 71, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 72, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 71, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 10, 1)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo14(x: typeof b); // ok >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 69, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 71, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.ts, 72, 28)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.symbols index 703ee5d3cc4..422b5820a8b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.symbols @@ -28,7 +28,7 @@ interface I { new(x: T): Date; >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 13, 8)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 12, 12)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface I2 { @@ -38,7 +38,7 @@ interface I2 { >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 17, 8)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 17, 11)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 17, 8)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var a: { new(x: T): T } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.symbols index faa0995c2dd..e44493e933b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.symbols @@ -6,7 +6,7 @@ class B { >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 0, 0)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 4, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) constructor(x: T) { return null; } >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 5, 16)) @@ -16,7 +16,7 @@ class B { class C { >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 6, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 8, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) constructor(x: T) { return null; } >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 9, 16)) @@ -26,12 +26,12 @@ class C { interface I { >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 10, 1)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 12, 12)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) new(x: T): Date; >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 13, 8)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 12, 12)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface I2 { @@ -39,16 +39,16 @@ interface I2 { new(x: T): RegExp; >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 17, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 17, 24)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 17, 8)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var a: { new(x: T): T } >a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 20, 3)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 20, 13)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 20, 29)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 20, 13)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 20, 13)) @@ -57,7 +57,7 @@ var b = { new(x: T) { return null; } }; // not a construct signa >b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 21, 3)) >new : Symbol(new, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 21, 9)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 21, 14)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 21, 30)) >T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 21, 14)) @@ -65,13 +65,13 @@ function foo1b(x: B); >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 21, 55), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 23, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 24, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 23, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1b(x: B); // error >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 21, 55), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 23, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 24, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 24, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1b(x: any) { } >foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 21, 55), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 23, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 24, 27)) @@ -81,13 +81,13 @@ function foo1c(x: C); >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 27, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 28, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 27, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1c(x: C); // error >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 27, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 28, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 28, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo1c(x: any) { } >foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 27, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 28, 27)) @@ -97,13 +97,13 @@ function foo2(x: I); >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 31, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 32, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 31, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo2(x: I); // error >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 31, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 32, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 32, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo2(x: any) { } >foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 31, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 32, 26)) @@ -141,13 +141,13 @@ function foo8(x: B); >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 43, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 44, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 43, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: I); // ok >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 43, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 44, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 44, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: any) { } >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 43, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 44, 26)) @@ -157,13 +157,13 @@ function foo9(x: B); >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 47, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 48, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 47, 14)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo9(x: C); // error since types are structurally equal >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 47, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 48, 26)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 48, 14)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo9(x: any) { } >foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 45, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 47, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 48, 26)) @@ -173,7 +173,7 @@ function foo10(x: B); >foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 49, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 51, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 52, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 51, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo10(x: typeof a); // ok >foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 49, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 51, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 52, 28)) @@ -188,7 +188,7 @@ function foo11(x: B); >foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 53, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 55, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 56, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 55, 15)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo11(x: typeof b); // ok >foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 53, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 55, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 56, 28)) @@ -203,13 +203,13 @@ function foo12(x: I); >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 59, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 60, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 59, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: C); // ok >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 59, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 60, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 60, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 59, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 60, 27)) @@ -224,7 +224,7 @@ function foo12b(x: C); // ok >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 61, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 63, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 64, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 64, 16)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12b(x: any) { } >foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 61, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 63, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 64, 28)) @@ -234,7 +234,7 @@ function foo13(x: I); >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 65, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 67, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 68, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 67, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo13(x: typeof a); // ok >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 65, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 67, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 68, 28)) @@ -249,7 +249,7 @@ function foo14(x: I); >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 69, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 71, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 72, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 71, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 10, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo14(x: typeof b); // ok >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 69, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 71, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 72, 28)) @@ -269,7 +269,7 @@ function foo15(x: C); // ok >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 75, 22), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 76, 27)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 76, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 6, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo15(x: any) { } >foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 75, 22), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.ts, 76, 27)) diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.symbols b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.symbols index d7797a833c9..48f28e40b8a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.symbols +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.symbols @@ -159,7 +159,7 @@ function foo8(x: I); // BUG 832086 >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 39, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 41, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 42, 51)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 42, 14)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 8, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo8(x: any) { } >foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 39, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 41, 36), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 42, 51)) @@ -213,14 +213,14 @@ function foo12(x: I, number, Date, string>); >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 57, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 8, 1)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: C, number, Date>); // ok >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 55, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 57, 62), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 58, 54)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 58, 15)) >C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 4, 1)) >B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo12(x: any) { } >foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 55, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 57, 62), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 58, 54)) @@ -244,9 +244,9 @@ function foo13(x: I); >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 63, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 65, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 66, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 65, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 8, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo13(x: typeof a); // ok >foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 63, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 65, 49), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 66, 28)) @@ -261,8 +261,8 @@ function foo14(x: I); >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 67, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 69, 52), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 70, 28)) >x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 69, 15)) >I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 8, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function foo14(x: typeof b); // ok >foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 67, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 69, 52), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.ts, 70, 28)) diff --git a/tests/baselines/reference/overloadOnGenericArity.symbols b/tests/baselines/reference/overloadOnGenericArity.symbols index 28f3c74fd2b..a9fddb65177 100644 --- a/tests/baselines/reference/overloadOnGenericArity.symbols +++ b/tests/baselines/reference/overloadOnGenericArity.symbols @@ -10,7 +10,7 @@ interface Test { then(p: string): Date; // Error: Overloads cannot differ only by return type >then : Symbol(then, Decl(overloadOnGenericArity.ts, 0, 16), Decl(overloadOnGenericArity.ts, 1, 31)) >p : Symbol(p, Decl(overloadOnGenericArity.ts, 2, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.symbols b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.symbols index bc2bd0785b9..02390079e38 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.symbols +++ b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.symbols @@ -14,9 +14,9 @@ module Bugs { var result= message.replace(/\{(\d+)\}/g, function(match, ...rest) { >result : Symbol(result, Decl(overloadResolutionOverNonCTLambdas.ts, 6, 7)) ->message.replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) +>message.replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >message : Symbol(message, Decl(overloadResolutionOverNonCTLambdas.ts, 5, 16)) ->replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >match : Symbol(match, Decl(overloadResolutionOverNonCTLambdas.ts, 6, 55)) >rest : Symbol(rest, Decl(overloadResolutionOverNonCTLambdas.ts, 6, 61)) diff --git a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.symbols b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.symbols index 850f188a58b..d352216b74e 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.symbols +++ b/tests/baselines/reference/overloadResolutionOverNonCTObjectLit.symbols @@ -39,17 +39,17 @@ module Bugs { >IToken : Symbol(IToken, Decl(overloadResolutionOverNonCTObjectLit.ts, 0, 13)) tokens.push({ startIndex: 1, type: '', bracket: 3 }); ->tokens.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>tokens.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >tokens : Symbol(tokens, Decl(overloadResolutionOverNonCTObjectLit.ts, 16, 35)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >startIndex : Symbol(startIndex, Decl(overloadResolutionOverNonCTObjectLit.ts, 17, 45)) >type : Symbol(type, Decl(overloadResolutionOverNonCTObjectLit.ts, 17, 60)) >bracket : Symbol(bracket, Decl(overloadResolutionOverNonCTObjectLit.ts, 17, 70)) tokens.push(({ startIndex: 1, type: '', bracket: 3, state: null, length: 10 })); ->tokens.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>tokens.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >tokens : Symbol(tokens, Decl(overloadResolutionOverNonCTObjectLit.ts, 16, 35)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >IToken : Symbol(IToken, Decl(overloadResolutionOverNonCTObjectLit.ts, 0, 13)) >startIndex : Symbol(startIndex, Decl(overloadResolutionOverNonCTObjectLit.ts, 18, 54)) >type : Symbol(type, Decl(overloadResolutionOverNonCTObjectLit.ts, 18, 69)) diff --git a/tests/baselines/reference/overloadResolutionWithAny.symbols b/tests/baselines/reference/overloadResolutionWithAny.symbols index af998b6b376..425855fb7da 100644 --- a/tests/baselines/reference/overloadResolutionWithAny.symbols +++ b/tests/baselines/reference/overloadResolutionWithAny.symbols @@ -37,7 +37,7 @@ var func2: { (s: string, t: any): RegExp; >s : Symbol(s, Decl(overloadResolutionWithAny.ts, 13, 5)) >t : Symbol(t, Decl(overloadResolutionWithAny.ts, 13, 15)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) (s: any, t: any): string; >s : Symbol(s, Decl(overloadResolutionWithAny.ts, 14, 5)) diff --git a/tests/baselines/reference/overloadsWithConstraints.symbols b/tests/baselines/reference/overloadsWithConstraints.symbols index 68b675093bf..4b33826e6b8 100644 --- a/tests/baselines/reference/overloadsWithConstraints.symbols +++ b/tests/baselines/reference/overloadsWithConstraints.symbols @@ -2,7 +2,7 @@ declare function f(x: T): T; >f : Symbol(f, Decl(overloadsWithConstraints.ts, 0, 0), Decl(overloadsWithConstraints.ts, 0, 46)) >T : Symbol(T, Decl(overloadsWithConstraints.ts, 0, 19)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(overloadsWithConstraints.ts, 0, 37)) >T : Symbol(T, Decl(overloadsWithConstraints.ts, 0, 19)) >T : Symbol(T, Decl(overloadsWithConstraints.ts, 0, 19)) @@ -10,7 +10,7 @@ declare function f(x: T): T; declare function f(x: T): T >f : Symbol(f, Decl(overloadsWithConstraints.ts, 0, 0), Decl(overloadsWithConstraints.ts, 0, 46)) >T : Symbol(T, Decl(overloadsWithConstraints.ts, 1, 19)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(overloadsWithConstraints.ts, 1, 37)) >T : Symbol(T, Decl(overloadsWithConstraints.ts, 1, 19)) >T : Symbol(T, Decl(overloadsWithConstraints.ts, 1, 19)) diff --git a/tests/baselines/reference/parenthesizedContexualTyping1.symbols b/tests/baselines/reference/parenthesizedContexualTyping1.symbols index 698e26734ad..e5efefb89a0 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping1.symbols +++ b/tests/baselines/reference/parenthesizedContexualTyping1.symbols @@ -102,9 +102,9 @@ var h = fun((((x => x))), ((x => x)), 10); var i = fun((Math.random() < 0.5 ? x => x : x => undefined), 10); >i : Symbol(i, Decl(parenthesizedContexualTyping1.ts, 18, 3)) >fun : Symbol(fun, Decl(parenthesizedContexualTyping1.ts, 0, 0), Decl(parenthesizedContexualTyping1.ts, 1, 41), Decl(parenthesizedContexualTyping1.ts, 2, 57)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 18, 34)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 18, 34)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 18, 43)) @@ -113,9 +113,9 @@ var i = fun((Math.random() < 0.5 ? x => x : x => undefined), 10); var j = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), 10); >j : Symbol(j, Decl(parenthesizedContexualTyping1.ts, 19, 3)) >fun : Symbol(fun, Decl(parenthesizedContexualTyping1.ts, 0, 0), Decl(parenthesizedContexualTyping1.ts, 1, 41), Decl(parenthesizedContexualTyping1.ts, 2, 57)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 19, 36)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 19, 36)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 19, 47)) @@ -124,9 +124,9 @@ var j = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), 10); var k = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10); >k : Symbol(k, Decl(parenthesizedContexualTyping1.ts, 20, 3)) >fun : Symbol(fun, Decl(parenthesizedContexualTyping1.ts, 0, 0), Decl(parenthesizedContexualTyping1.ts, 1, 41), Decl(parenthesizedContexualTyping1.ts, 2, 57)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 20, 36)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 20, 36)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 20, 47)) @@ -137,9 +137,9 @@ var k = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10); var l = fun(((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))), ((x => x)), 10); >l : Symbol(l, Decl(parenthesizedContexualTyping1.ts, 21, 3)) >fun : Symbol(fun, Decl(parenthesizedContexualTyping1.ts, 0, 0), Decl(parenthesizedContexualTyping1.ts, 1, 41), Decl(parenthesizedContexualTyping1.ts, 2, 57)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 21, 38)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 21, 38)) >x : Symbol(x, Decl(parenthesizedContexualTyping1.ts, 21, 51)) diff --git a/tests/baselines/reference/parenthesizedContexualTyping2.symbols b/tests/baselines/reference/parenthesizedContexualTyping2.symbols index f7616f07710..bd735a8078a 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping2.symbols +++ b/tests/baselines/reference/parenthesizedContexualTyping2.symbols @@ -128,9 +128,9 @@ var h = fun((((x => { x(undefined); return x; }))),((x => { x(un var i = fun((Math.random() < 0.5 ? x => { x(undefined); return x; } : x => undefined), 10); >i : Symbol(i, Decl(parenthesizedContexualTyping2.ts, 25, 3)) >fun : Symbol(fun, Decl(parenthesizedContexualTyping2.ts, 6, 48), Decl(parenthesizedContexualTyping2.ts, 8, 38), Decl(parenthesizedContexualTyping2.ts, 9, 51)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedContexualTyping2.ts, 25, 34)) >x : Symbol(x, Decl(parenthesizedContexualTyping2.ts, 25, 34)) >undefined : Symbol(undefined) @@ -141,9 +141,9 @@ var i = fun((Math.random() < 0.5 ? x => { x(undefined); return x; } : x var j = fun((Math.random() < 0.5 ? (x => { x(undefined); return x; }) : (x => undefined)), 10); >j : Symbol(j, Decl(parenthesizedContexualTyping2.ts, 26, 3)) >fun : Symbol(fun, Decl(parenthesizedContexualTyping2.ts, 6, 48), Decl(parenthesizedContexualTyping2.ts, 8, 38), Decl(parenthesizedContexualTyping2.ts, 9, 51)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedContexualTyping2.ts, 26, 36)) >x : Symbol(x, Decl(parenthesizedContexualTyping2.ts, 26, 36)) >undefined : Symbol(undefined) @@ -154,9 +154,9 @@ var j = fun((Math.random() < 0.5 ? (x => { x(undefined); return x; }) : var k = fun((Math.random() < 0.5 ? (x => { x(undefined); return x; }) : (x => undefined)), x => { x(undefined); return x; }, 10); >k : Symbol(k, Decl(parenthesizedContexualTyping2.ts, 27, 3)) >fun : Symbol(fun, Decl(parenthesizedContexualTyping2.ts, 6, 48), Decl(parenthesizedContexualTyping2.ts, 8, 38), Decl(parenthesizedContexualTyping2.ts, 9, 51)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedContexualTyping2.ts, 27, 36)) >x : Symbol(x, Decl(parenthesizedContexualTyping2.ts, 27, 36)) >undefined : Symbol(undefined) @@ -171,9 +171,9 @@ var k = fun((Math.random() < 0.5 ? (x => { x(undefined); return x; }) : var l = fun(((Math.random() < 0.5 ? ((x => { x(undefined); return x; })) : ((x => undefined)))),((x => { x(undefined); return x; })), 10); >l : Symbol(l, Decl(parenthesizedContexualTyping2.ts, 28, 3)) >fun : Symbol(fun, Decl(parenthesizedContexualTyping2.ts, 6, 48), Decl(parenthesizedContexualTyping2.ts, 8, 38), Decl(parenthesizedContexualTyping2.ts, 9, 51)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedContexualTyping2.ts, 28, 38)) >x : Symbol(x, Decl(parenthesizedContexualTyping2.ts, 28, 38)) >undefined : Symbol(undefined) diff --git a/tests/baselines/reference/parenthesizedContexualTyping3.symbols b/tests/baselines/reference/parenthesizedContexualTyping3.symbols index b0d696e2d21..4db888efd61 100644 --- a/tests/baselines/reference/parenthesizedContexualTyping3.symbols +++ b/tests/baselines/reference/parenthesizedContexualTyping3.symbols @@ -9,7 +9,7 @@ function tempFun(tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T; >tempFun : Symbol(tempFun, Decl(parenthesizedContexualTyping3.ts, 0, 0), Decl(parenthesizedContexualTyping3.ts, 6, 77), Decl(parenthesizedContexualTyping3.ts, 7, 93)) >T : Symbol(T, Decl(parenthesizedContexualTyping3.ts, 6, 17)) >tempStrs : Symbol(tempStrs, Decl(parenthesizedContexualTyping3.ts, 6, 20)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >g : Symbol(g, Decl(parenthesizedContexualTyping3.ts, 6, 51)) >x : Symbol(x, Decl(parenthesizedContexualTyping3.ts, 6, 56)) >T : Symbol(T, Decl(parenthesizedContexualTyping3.ts, 6, 17)) @@ -22,7 +22,7 @@ function tempFun(tempStrs: TemplateStringsArray, g: (x: T) => T, h: (y: T) => >tempFun : Symbol(tempFun, Decl(parenthesizedContexualTyping3.ts, 0, 0), Decl(parenthesizedContexualTyping3.ts, 6, 77), Decl(parenthesizedContexualTyping3.ts, 7, 93)) >T : Symbol(T, Decl(parenthesizedContexualTyping3.ts, 7, 17)) >tempStrs : Symbol(tempStrs, Decl(parenthesizedContexualTyping3.ts, 7, 20)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >g : Symbol(g, Decl(parenthesizedContexualTyping3.ts, 7, 51)) >x : Symbol(x, Decl(parenthesizedContexualTyping3.ts, 7, 56)) >T : Symbol(T, Decl(parenthesizedContexualTyping3.ts, 7, 17)) @@ -39,7 +39,7 @@ function tempFun(tempStrs: TemplateStringsArray, g: (x: T) => T, x: T): T { >tempFun : Symbol(tempFun, Decl(parenthesizedContexualTyping3.ts, 0, 0), Decl(parenthesizedContexualTyping3.ts, 6, 77), Decl(parenthesizedContexualTyping3.ts, 7, 93)) >T : Symbol(T, Decl(parenthesizedContexualTyping3.ts, 8, 17)) >tempStrs : Symbol(tempStrs, Decl(parenthesizedContexualTyping3.ts, 8, 20)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >g : Symbol(g, Decl(parenthesizedContexualTyping3.ts, 8, 51)) >x : Symbol(x, Decl(parenthesizedContexualTyping3.ts, 8, 56)) >T : Symbol(T, Decl(parenthesizedContexualTyping3.ts, 8, 17)) diff --git a/tests/baselines/reference/parenthesizedTypes.symbols b/tests/baselines/reference/parenthesizedTypes.symbols index ec0ec4e4c6f..7d7706795d5 100644 --- a/tests/baselines/reference/parenthesizedTypes.symbols +++ b/tests/baselines/reference/parenthesizedTypes.symbols @@ -40,19 +40,19 @@ var d: ({ (x: string): string } | { (x: number): number })[]; var d: Array<((x: string) => string) | ((x: number) => number)>; >d : Symbol(d, Decl(parenthesizedTypes.ts, 12, 3), Decl(parenthesizedTypes.ts, 13, 3), Decl(parenthesizedTypes.ts, 14, 3), Decl(parenthesizedTypes.ts, 15, 3), Decl(parenthesizedTypes.ts, 16, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedTypes.ts, 14, 15)) >x : Symbol(x, Decl(parenthesizedTypes.ts, 14, 41)) var d: Array<{ (x: string): string } | { (x: number): number }>; >d : Symbol(d, Decl(parenthesizedTypes.ts, 12, 3), Decl(parenthesizedTypes.ts, 13, 3), Decl(parenthesizedTypes.ts, 14, 3), Decl(parenthesizedTypes.ts, 15, 3), Decl(parenthesizedTypes.ts, 16, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedTypes.ts, 15, 16)) >x : Symbol(x, Decl(parenthesizedTypes.ts, 15, 42)) var d: (Array<{ (x: string): string } | { (x: number): number }>); >d : Symbol(d, Decl(parenthesizedTypes.ts, 12, 3), Decl(parenthesizedTypes.ts, 13, 3), Decl(parenthesizedTypes.ts, 14, 3), Decl(parenthesizedTypes.ts, 15, 3), Decl(parenthesizedTypes.ts, 16, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(parenthesizedTypes.ts, 16, 17)) >x : Symbol(x, Decl(parenthesizedTypes.ts, 16, 43)) diff --git a/tests/baselines/reference/parser630933.symbols b/tests/baselines/reference/parser630933.symbols index 70a069c3581..0f2ac0679e0 100644 --- a/tests/baselines/reference/parser630933.symbols +++ b/tests/baselines/reference/parser630933.symbols @@ -4,7 +4,7 @@ var a = "Hello"; var b = a.match(/\/ver=([^/]+)/); >b : Symbol(b, Decl(parser630933.ts, 1, 3)) ->a.match : Symbol(String.match, Decl(lib.d.ts, 317, 40), Decl(lib.d.ts, 323, 44)) +>a.match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(parser630933.ts, 0, 3)) ->match : Symbol(String.match, Decl(lib.d.ts, 317, 40), Decl(lib.d.ts, 323, 44)) +>match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/parserSymbolProperty1.symbols b/tests/baselines/reference/parserSymbolProperty1.symbols index f21959df892..b337b6ae30b 100644 --- a/tests/baselines/reference/parserSymbolProperty1.symbols +++ b/tests/baselines/reference/parserSymbolProperty1.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(parserSymbolProperty1.ts, 0, 0)) [Symbol.iterator]: string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/parserSymbolProperty2.symbols b/tests/baselines/reference/parserSymbolProperty2.symbols index 9f43ba7b006..d4bfa388fa8 100644 --- a/tests/baselines/reference/parserSymbolProperty2.symbols +++ b/tests/baselines/reference/parserSymbolProperty2.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(parserSymbolProperty2.ts, 0, 0)) [Symbol.unscopables](): string; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/parserSymbolProperty3.symbols b/tests/baselines/reference/parserSymbolProperty3.symbols index e3a3b1d5609..b740d5be4ad 100644 --- a/tests/baselines/reference/parserSymbolProperty3.symbols +++ b/tests/baselines/reference/parserSymbolProperty3.symbols @@ -3,7 +3,7 @@ declare class C { >C : Symbol(C, Decl(parserSymbolProperty3.ts, 0, 0)) [Symbol.unscopables](): string; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/parserSymbolProperty4.symbols b/tests/baselines/reference/parserSymbolProperty4.symbols index ba0134e82a9..65250e977b7 100644 --- a/tests/baselines/reference/parserSymbolProperty4.symbols +++ b/tests/baselines/reference/parserSymbolProperty4.symbols @@ -3,7 +3,7 @@ declare class C { >C : Symbol(C, Decl(parserSymbolProperty4.ts, 0, 0)) [Symbol.toPrimitive]: string; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/parserSymbolProperty5.symbols b/tests/baselines/reference/parserSymbolProperty5.symbols index 970f8a0b753..c883c0aa12f 100644 --- a/tests/baselines/reference/parserSymbolProperty5.symbols +++ b/tests/baselines/reference/parserSymbolProperty5.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty5.ts, 0, 0)) [Symbol.toPrimitive]: string; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/parserSymbolProperty6.symbols b/tests/baselines/reference/parserSymbolProperty6.symbols index 29831fad7ef..d8a2b9bf1cc 100644 --- a/tests/baselines/reference/parserSymbolProperty6.symbols +++ b/tests/baselines/reference/parserSymbolProperty6.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty6.ts, 0, 0)) [Symbol.toStringTag]: string = ""; ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/parserSymbolProperty7.symbols b/tests/baselines/reference/parserSymbolProperty7.symbols index 8322d312839..9319dfe87bb 100644 --- a/tests/baselines/reference/parserSymbolProperty7.symbols +++ b/tests/baselines/reference/parserSymbolProperty7.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(parserSymbolProperty7.ts, 0, 0)) [Symbol.toStringTag](): void { } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/parserSymbolProperty8.symbols b/tests/baselines/reference/parserSymbolProperty8.symbols index 7c5dfbff7c6..2a58473973e 100644 --- a/tests/baselines/reference/parserSymbolProperty8.symbols +++ b/tests/baselines/reference/parserSymbolProperty8.symbols @@ -3,7 +3,7 @@ var x: { >x : Symbol(x, Decl(parserSymbolProperty8.ts, 0, 3)) [Symbol.toPrimitive](): string ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/parserSymbolProperty9.symbols b/tests/baselines/reference/parserSymbolProperty9.symbols index 7ee5e7e6998..85c66b21d5e 100644 --- a/tests/baselines/reference/parserSymbolProperty9.symbols +++ b/tests/baselines/reference/parserSymbolProperty9.symbols @@ -3,7 +3,7 @@ var x: { >x : Symbol(x, Decl(parserSymbolProperty9.ts, 0, 3)) [Symbol.toPrimitive]: string ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/plusOperatorWithStringType.symbols b/tests/baselines/reference/plusOperatorWithStringType.symbols index 1ff2cec5dff..fd3e10c172f 100644 --- a/tests/baselines/reference/plusOperatorWithStringType.symbols +++ b/tests/baselines/reference/plusOperatorWithStringType.symbols @@ -88,9 +88,9 @@ var ResultIsNumber11 = +(STRING + STRING); var ResultIsNumber12 = +STRING.charAt(0); >ResultIsNumber12 : Symbol(ResultIsNumber12, Decl(plusOperatorWithStringType.ts, 32, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(plusOperatorWithStringType.ts, 1, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) // miss assignment operators +""; diff --git a/tests/baselines/reference/promiseChaining.symbols b/tests/baselines/reference/promiseChaining.symbols index 1ad7044faae..f13323742ce 100644 --- a/tests/baselines/reference/promiseChaining.symbols +++ b/tests/baselines/reference/promiseChaining.symbols @@ -38,9 +38,9 @@ class Chain { >x : Symbol(x, Decl(promiseChaining.ts, 5, 49)) >then : Symbol(Chain.then, Decl(promiseChaining.ts, 1, 36)) >x : Symbol(x, Decl(promiseChaining.ts, 5, 76)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(promiseChaining.ts, 5, 76)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return new Chain(result); >Chain : Symbol(Chain, Decl(promiseChaining.ts, 0, 0)) diff --git a/tests/baselines/reference/promiseVoidErrorCallback.symbols b/tests/baselines/reference/promiseVoidErrorCallback.symbols index 3fc23ce5253..93e86b9ec2e 100644 --- a/tests/baselines/reference/promiseVoidErrorCallback.symbols +++ b/tests/baselines/reference/promiseVoidErrorCallback.symbols @@ -22,13 +22,13 @@ interface T3 { function f1(): Promise { >f1 : Symbol(f1, Decl(promiseVoidErrorCallback.ts, 10, 1)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T1 : Symbol(T1, Decl(promiseVoidErrorCallback.ts, 0, 0)) return Promise.resolve({ __t1: "foo_t1" }); ->Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 5136, 39), Decl(lib.d.ts, 5143, 54)) ->Promise : Symbol(Promise, Decl(lib.d.ts, 5068, 1), Decl(lib.d.ts, 5154, 11)) ->resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, 5136, 39), Decl(lib.d.ts, 5143, 54)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >__t1 : Symbol(__t1, Decl(promiseVoidErrorCallback.ts, 13, 28)) } @@ -47,22 +47,22 @@ function f2(x: T1): T2 { var x3 = f1() >x3 : Symbol(x3, Decl(promiseVoidErrorCallback.ts, 20, 3)) ->f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.d.ts, 5073, 22), Decl(lib.d.ts, 5080, 158)) ->f1() .then : Symbol(Promise.then, Decl(lib.d.ts, 5073, 22), Decl(lib.d.ts, 5080, 158)) +>f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>f1() .then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >f1 : Symbol(f1, Decl(promiseVoidErrorCallback.ts, 10, 1)) .then(f2, (e: Error) => { ->then : Symbol(Promise.then, Decl(lib.d.ts, 5073, 22), Decl(lib.d.ts, 5080, 158)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >f2 : Symbol(f2, Decl(promiseVoidErrorCallback.ts, 14, 1)) >e : Symbol(e, Decl(promiseVoidErrorCallback.ts, 21, 15)) ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) throw e; >e : Symbol(e, Decl(promiseVoidErrorCallback.ts, 21, 15)) }) .then((x: T2) => { ->then : Symbol(Promise.then, Decl(lib.d.ts, 5073, 22), Decl(lib.d.ts, 5080, 158)) +>then : Symbol(Promise.then, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(promiseVoidErrorCallback.ts, 24, 11)) >T2 : Symbol(T2, Decl(promiseVoidErrorCallback.ts, 2, 1)) diff --git a/tests/baselines/reference/propagationOfPromiseInitialization.symbols b/tests/baselines/reference/propagationOfPromiseInitialization.symbols index 2289c175168..25527f05809 100644 --- a/tests/baselines/reference/propagationOfPromiseInitialization.symbols +++ b/tests/baselines/reference/propagationOfPromiseInitialization.symbols @@ -36,9 +36,9 @@ foo.then((x) => { // x is inferred to be string x.length; ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(propagationOfPromiseInitialization.ts, 8, 9)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return 123; }); diff --git a/tests/baselines/reference/propertyAccess7.symbols b/tests/baselines/reference/propertyAccess7.symbols index f6407ae8c3c..9f9dd879f6a 100644 --- a/tests/baselines/reference/propertyAccess7.symbols +++ b/tests/baselines/reference/propertyAccess7.symbols @@ -3,7 +3,7 @@ var foo: string; >foo : Symbol(foo, Decl(propertyAccess7.ts, 0, 3)) foo.toUpperCase(); ->foo.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>foo.toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) >foo : Symbol(foo, Decl(propertyAccess7.ts, 0, 3)) ->toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, 405, 32)) +>toUpperCase : Symbol(String.toUpperCase, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.symbols b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.symbols index 99856e99ae1..bf5cb72a708 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.symbols +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithConstraints.symbols @@ -5,7 +5,7 @@ class C { >C : Symbol(C, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 0, 0)) >T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 3, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) f() { >f : Symbol(f, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 3, 25)) @@ -17,13 +17,13 @@ class C { var a = x['getDate'](); // number >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 6, 11)) >x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 5, 11)) ->'getDate' : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>'getDate' : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) return a + x.getDate(); >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 6, 11)) ->x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 5, 11)) ->getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) } } @@ -31,13 +31,13 @@ var r = (new C()).f(); >r : Symbol(r, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 11, 3)) >(new C()).f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 3, 25)) >C : Symbol(C, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 0, 0)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 3, 25)) interface I { >I : Symbol(I, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 11, 28)) >T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 13, 12)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo: T; >foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 13, 29)) @@ -46,42 +46,42 @@ interface I { var i: I; >i : Symbol(i, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 16, 3)) >I : Symbol(I, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 11, 28)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r2 = i.foo.getDate(); >r2 : Symbol(r2, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 17, 3)) ->i.foo.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>i.foo.getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) >i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 13, 29)) >i : Symbol(i, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 16, 3)) >foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 13, 29)) ->getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) var r2b = i.foo['getDate'](); >r2b : Symbol(r2b, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 18, 3)) >i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 13, 29)) >i : Symbol(i, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 16, 3)) >foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 13, 29)) ->'getDate' : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>'getDate' : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) var a: { >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 20, 3)) (): T; >T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 21, 5)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 21, 5)) } var r3 = a().getDate(); >r3 : Symbol(r3, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 23, 3)) ->a().getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>a().getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 20, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) var r3b = a()['getDate'](); >r3b : Symbol(r3b, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 24, 3)) >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 20, 3)) ->'getDate' : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>'getDate' : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) var b = { >b : Symbol(b, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 26, 3)) @@ -89,20 +89,20 @@ var b = { foo: (x: T) => { >foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 26, 9)) >T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 27, 10)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 27, 26)) >T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 27, 10)) var a = x['getDate'](); // number >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 28, 11)) >x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 27, 26)) ->'getDate' : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>'getDate' : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) return a + x.getDate(); >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 28, 11)) ->x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>x.getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 27, 26)) ->getDate : Symbol(Date.getDate, Decl(lib.d.ts, 660, 26)) +>getDate : Symbol(Date.getDate, Decl(lib.d.ts, --, --)) } } @@ -111,5 +111,5 @@ var r4 = b.foo(new Date()); >b.foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 26, 9)) >b : Symbol(b, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 26, 3)) >foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints.ts, 26, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.symbols b/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.symbols index 425c7e42aff..7417346a791 100644 --- a/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.symbols +++ b/tests/baselines/reference/propertyAccessOnTypeParameterWithoutConstraints.symbols @@ -13,13 +13,13 @@ class C { var a = x['toString'](); // should be string >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 3, 11)) >x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 2, 11)) ->'toString' : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>'toString' : Symbol(Object.toString, Decl(lib.d.ts, --, --)) return a + x.toString(); >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 3, 11)) ->x.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 2, 11)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) } } @@ -43,18 +43,18 @@ var i: I; var r2 = i.foo.toString(); >r2 : Symbol(r2, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 14, 3)) ->i.foo.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>i.foo.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 16)) >i : Symbol(i, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 13, 3)) >foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 16)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) var r2b = i.foo['toString'](); >r2b : Symbol(r2b, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 15, 3)) >i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 16)) >i : Symbol(i, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 13, 3)) >foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 16)) ->'toString' : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>'toString' : Symbol(Number.toString, Decl(lib.d.ts, --, --)) var a: { >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 17, 3)) @@ -65,14 +65,14 @@ var a: { } var r3: string = a().toString(); >r3 : Symbol(r3, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 20, 3)) ->a().toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>a().toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 17, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var r3b: string = a()['toString'](); >r3b : Symbol(r3b, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 21, 3)) >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 17, 3)) ->'toString' : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>'toString' : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var b = { >b : Symbol(b, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 23, 3)) @@ -86,13 +86,13 @@ var b = { var a = x['toString'](); // should be string >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 25, 11)) >x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 24, 13)) ->'toString' : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>'toString' : Symbol(Object.toString, Decl(lib.d.ts, --, --)) return a + x.toString(); >a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 25, 11)) ->x.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 24, 13)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/prototypeOnConstructorFunctions.symbols b/tests/baselines/reference/prototypeOnConstructorFunctions.symbols index ada59370532..d3644ad89b2 100644 --- a/tests/baselines/reference/prototypeOnConstructorFunctions.symbols +++ b/tests/baselines/reference/prototypeOnConstructorFunctions.symbols @@ -15,9 +15,9 @@ var i: I1; i.const.prototype.prop = "yo"; ->i.const.prototype : Symbol(Function.prototype, Decl(lib.d.ts, 249, 48)) +>i.const.prototype : Symbol(Function.prototype, Decl(lib.d.ts, --, --)) >i.const : Symbol(I1.const, Decl(prototypeOnConstructorFunctions.ts, 0, 14)) >i : Symbol(i, Decl(prototypeOnConstructorFunctions.ts, 5, 3)) >const : Symbol(I1.const, Decl(prototypeOnConstructorFunctions.ts, 0, 14)) ->prototype : Symbol(Function.prototype, Decl(lib.d.ts, 249, 48)) +>prototype : Symbol(Function.prototype, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/regExpWithSlashInCharClass.symbols b/tests/baselines/reference/regExpWithSlashInCharClass.symbols index 68a257a9666..105724b12f1 100644 --- a/tests/baselines/reference/regExpWithSlashInCharClass.symbols +++ b/tests/baselines/reference/regExpWithSlashInCharClass.symbols @@ -1,16 +1,16 @@ === tests/cases/compiler/regExpWithSlashInCharClass.ts === var foo1 = "a/".replace(/.[/]/, ""); >foo1 : Symbol(foo1, Decl(regExpWithSlashInCharClass.ts, 0, 3)) ->"a/".replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) ->replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) +>"a/".replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var foo2 = "a//".replace(/.[//]/g, ""); >foo2 : Symbol(foo2, Decl(regExpWithSlashInCharClass.ts, 1, 3)) ->"a//".replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) ->replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) +>"a//".replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var foo3 = "a/".replace(/.[/no sleep /till/]/, "bugfix"); >foo3 : Symbol(foo3, Decl(regExpWithSlashInCharClass.ts, 2, 3)) ->"a/".replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) ->replace : Symbol(String.replace, Decl(lib.d.ts, 329, 44), Decl(lib.d.ts, 336, 63), Decl(lib.d.ts, 343, 98), Decl(lib.d.ts, 350, 63)) +>"a/".replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/returnStatements.symbols b/tests/baselines/reference/returnStatements.symbols index e12f3ba5d8a..7d8b6d69d82 100644 --- a/tests/baselines/reference/returnStatements.symbols +++ b/tests/baselines/reference/returnStatements.symbols @@ -18,8 +18,8 @@ function fn5(): boolean { return true; } function fn6(): Date { return new Date(12); } >fn6 : Symbol(fn6, Decl(returnStatements.ts, 5, 40)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function fn7(): any { return null; } >fn7 : Symbol(fn7, Decl(returnStatements.ts, 6, 45)) diff --git a/tests/baselines/reference/returnTypeParameterWithModules.symbols b/tests/baselines/reference/returnTypeParameterWithModules.symbols index c4b354ad920..7f8fab382a3 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.symbols +++ b/tests/baselines/reference/returnTypeParameterWithModules.symbols @@ -8,17 +8,17 @@ module M1 { >ar : Symbol(ar, Decl(returnTypeParameterWithModules.ts, 1, 30)) >f : Symbol(f, Decl(returnTypeParameterWithModules.ts, 1, 33)) >e : Symbol(e, Decl(returnTypeParameterWithModules.ts, 1, 36)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >A : Symbol(A, Decl(returnTypeParameterWithModules.ts, 1, 27)) return Array.prototype.reduce.apply(ar, e ? [f, e] : [f]); ->Array.prototype.reduce.apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) ->Array.prototype.reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) ->Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, 1167, 41)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) ->prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, 1167, 41)) ->reduce : Symbol(Array.reduce, Decl(lib.d.ts, 1129, 93), Decl(lib.d.ts, 1136, 120)) ->apply : Symbol(Function.apply, Decl(lib.d.ts, 228, 20)) +>Array.prototype.reduce.apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) +>Array.prototype.reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Array.prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>prototype : Symbol(ArrayConstructor.prototype, Decl(lib.d.ts, --, --)) +>reduce : Symbol(Array.reduce, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>apply : Symbol(Function.apply, Decl(lib.d.ts, --, --)) >ar : Symbol(ar, Decl(returnTypeParameterWithModules.ts, 1, 30)) >e : Symbol(e, Decl(returnTypeParameterWithModules.ts, 1, 36)) >f : Symbol(f, Decl(returnTypeParameterWithModules.ts, 1, 33)) diff --git a/tests/baselines/reference/reverseInferenceInContextualInstantiation.symbols b/tests/baselines/reference/reverseInferenceInContextualInstantiation.symbols index 9e72d85a7fe..48cf549efad 100644 --- a/tests/baselines/reference/reverseInferenceInContextualInstantiation.symbols +++ b/tests/baselines/reference/reverseInferenceInContextualInstantiation.symbols @@ -11,8 +11,8 @@ var x: number[]; >x : Symbol(x, Decl(reverseInferenceInContextualInstantiation.ts, 1, 3)) x.sort(compare); // Error, but shouldn't be ->x.sort : Symbol(Array.sort, Decl(lib.d.ts, 1054, 45)) +>x.sort : Symbol(Array.sort, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(reverseInferenceInContextualInstantiation.ts, 1, 3)) ->sort : Symbol(Array.sort, Decl(lib.d.ts, 1054, 45)) +>sort : Symbol(Array.sort, Decl(lib.d.ts, --, --)) >compare : Symbol(compare, Decl(reverseInferenceInContextualInstantiation.ts, 0, 0)) diff --git a/tests/baselines/reference/scopeResolutionIdentifiers.symbols b/tests/baselines/reference/scopeResolutionIdentifiers.symbols index c3547aab60c..3ba780b8290 100644 --- a/tests/baselines/reference/scopeResolutionIdentifiers.symbols +++ b/tests/baselines/reference/scopeResolutionIdentifiers.symbols @@ -51,7 +51,7 @@ class C { s: Date; >s : Symbol(s, Decl(scopeResolutionIdentifiers.ts, 21, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) n = this.s; >n : Symbol(n, Decl(scopeResolutionIdentifiers.ts, 22, 12)) @@ -70,7 +70,7 @@ class C { var p: Date; >p : Symbol(p, Decl(scopeResolutionIdentifiers.ts, 25, 11), Decl(scopeResolutionIdentifiers.ts, 26, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols index ab79174a43a..49528257830 100644 --- a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols +++ b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols @@ -1,9 +1,9 @@ === tests/cases/compiler/simpleArrowFunctionParameterReferencedInObjectLiteral1.ts === [].map(() => [].map(p => ({ X: p }))); ->[].map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) ->[].map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>[].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>[].map : Symbol(Array.map, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(simpleArrowFunctionParameterReferencedInObjectLiteral1.ts, 0, 20)) >X : Symbol(X, Decl(simpleArrowFunctionParameterReferencedInObjectLiteral1.ts, 0, 27)) >p : Symbol(p, Decl(simpleArrowFunctionParameterReferencedInObjectLiteral1.ts, 0, 20)) diff --git a/tests/baselines/reference/sourceMap-FileWithComments.symbols b/tests/baselines/reference/sourceMap-FileWithComments.symbols index d065f6d4db8..50993547428 100644 --- a/tests/baselines/reference/sourceMap-FileWithComments.symbols +++ b/tests/baselines/reference/sourceMap-FileWithComments.symbols @@ -25,9 +25,9 @@ module Shapes { // Instance member getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } >getDist : Symbol(getDist, Decl(sourceMap-FileWithComments.ts, 12, 59)) ->Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, 620, 27)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, 620, 27)) +>Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) >this.x : Symbol(x, Decl(sourceMap-FileWithComments.ts, 12, 20)) >this : Symbol(Point, Decl(sourceMap-FileWithComments.ts, 7, 15)) >x : Symbol(x, Decl(sourceMap-FileWithComments.ts, 12, 20)) diff --git a/tests/baselines/reference/sourceMapValidationClasses.symbols b/tests/baselines/reference/sourceMapValidationClasses.symbols index 7b5eb5ffdfa..8608cd4ed21 100644 --- a/tests/baselines/reference/sourceMapValidationClasses.symbols +++ b/tests/baselines/reference/sourceMapValidationClasses.symbols @@ -60,15 +60,15 @@ module Foo.Bar { for (var i = 0; i < restGreetings.length; i++) { >i : Symbol(i, Decl(sourceMapValidationClasses.ts, 23, 16)) >i : Symbol(i, Decl(sourceMapValidationClasses.ts, 23, 16)) ->restGreetings.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>restGreetings.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >restGreetings : Symbol(restGreetings, Decl(sourceMapValidationClasses.ts, 20, 35)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(sourceMapValidationClasses.ts, 23, 16)) greeters.push(new Greeter(restGreetings[i])); ->greeters.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>greeters.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >greeters : Symbol(greeters, Decl(sourceMapValidationClasses.ts, 21, 11)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >Greeter : Symbol(Greeter, Decl(sourceMapValidationClasses.ts, 1, 17)) >restGreetings : Symbol(restGreetings, Decl(sourceMapValidationClasses.ts, 20, 35)) >i : Symbol(i, Decl(sourceMapValidationClasses.ts, 23, 16)) @@ -86,9 +86,9 @@ module Foo.Bar { for (var j = 0; j < b.length; j++) { >j : Symbol(j, Decl(sourceMapValidationClasses.ts, 32, 12)) >j : Symbol(j, Decl(sourceMapValidationClasses.ts, 32, 12)) ->b.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>b.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(sourceMapValidationClasses.ts, 30, 7)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >j : Symbol(j, Decl(sourceMapValidationClasses.ts, 32, 12)) b[j].greet(); diff --git a/tests/baselines/reference/sourceMapValidationDecorators.symbols b/tests/baselines/reference/sourceMapValidationDecorators.symbols index e22afb7b7fc..90204d0b71f 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.symbols +++ b/tests/baselines/reference/sourceMapValidationDecorators.symbols @@ -2,35 +2,35 @@ declare function ClassDecorator1(target: Function): void; >ClassDecorator1 : Symbol(ClassDecorator1, Decl(sourceMapValidationDecorators.ts, 0, 0)) >target : Symbol(target, Decl(sourceMapValidationDecorators.ts, 0, 33)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function ClassDecorator2(x: number): (target: Function) => void; >ClassDecorator2 : Symbol(ClassDecorator2, Decl(sourceMapValidationDecorators.ts, 0, 57)) >x : Symbol(x, Decl(sourceMapValidationDecorators.ts, 1, 33)) >target : Symbol(target, Decl(sourceMapValidationDecorators.ts, 1, 46)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) declare function PropertyDecorator1(target: Object, key: string | symbol, descriptor?: PropertyDescriptor): void; >PropertyDecorator1 : Symbol(PropertyDecorator1, Decl(sourceMapValidationDecorators.ts, 1, 72)) >target : Symbol(target, Decl(sourceMapValidationDecorators.ts, 2, 36)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >key : Symbol(key, Decl(sourceMapValidationDecorators.ts, 2, 51)) >descriptor : Symbol(descriptor, Decl(sourceMapValidationDecorators.ts, 2, 73)) ->PropertyDescriptor : Symbol(PropertyDescriptor, Decl(lib.d.ts, 79, 66)) +>PropertyDescriptor : Symbol(PropertyDescriptor, Decl(lib.d.ts, --, --)) declare function PropertyDecorator2(x: number): (target: Object, key: string | symbol, descriptor?: PropertyDescriptor) => void; >PropertyDecorator2 : Symbol(PropertyDecorator2, Decl(sourceMapValidationDecorators.ts, 2, 113)) >x : Symbol(x, Decl(sourceMapValidationDecorators.ts, 3, 36)) >target : Symbol(target, Decl(sourceMapValidationDecorators.ts, 3, 49)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >key : Symbol(key, Decl(sourceMapValidationDecorators.ts, 3, 64)) >descriptor : Symbol(descriptor, Decl(sourceMapValidationDecorators.ts, 3, 86)) ->PropertyDescriptor : Symbol(PropertyDescriptor, Decl(lib.d.ts, 79, 66)) +>PropertyDescriptor : Symbol(PropertyDescriptor, Decl(lib.d.ts, --, --)) declare function ParameterDecorator1(target: Object, key: string | symbol, paramIndex: number): void; >ParameterDecorator1 : Symbol(ParameterDecorator1, Decl(sourceMapValidationDecorators.ts, 3, 128)) >target : Symbol(target, Decl(sourceMapValidationDecorators.ts, 4, 37)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >key : Symbol(key, Decl(sourceMapValidationDecorators.ts, 4, 52)) >paramIndex : Symbol(paramIndex, Decl(sourceMapValidationDecorators.ts, 4, 74)) @@ -38,7 +38,7 @@ declare function ParameterDecorator2(x: number): (target: Object, key: string | >ParameterDecorator2 : Symbol(ParameterDecorator2, Decl(sourceMapValidationDecorators.ts, 4, 101)) >x : Symbol(x, Decl(sourceMapValidationDecorators.ts, 5, 37)) >target : Symbol(target, Decl(sourceMapValidationDecorators.ts, 5, 50)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >key : Symbol(key, Decl(sourceMapValidationDecorators.ts, 5, 65)) >paramIndex : Symbol(paramIndex, Decl(sourceMapValidationDecorators.ts, 5, 87)) diff --git a/tests/baselines/reference/sourceMapValidationTryCatchFinally.symbols b/tests/baselines/reference/sourceMapValidationTryCatchFinally.symbols index f2306df6827..321d262d9e7 100644 --- a/tests/baselines/reference/sourceMapValidationTryCatchFinally.symbols +++ b/tests/baselines/reference/sourceMapValidationTryCatchFinally.symbols @@ -26,7 +26,7 @@ try >x : Symbol(x, Decl(sourceMapValidationTryCatchFinally.ts, 0, 3)) throw new Error(); ->Error : Symbol(Error, Decl(lib.d.ts, 876, 38), Decl(lib.d.ts, 889, 11)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } catch (e) >e : Symbol(e, Decl(sourceMapValidationTryCatchFinally.ts, 13, 7)) diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols b/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols index 9f03f8fca01..9114afccdf4 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols @@ -23,9 +23,9 @@ function foo() { >series2 : Symbol(series2, Decl(specializationsShouldNotAffectEachOther.ts, 12, 7)) series2.map(seriesExtent); ->series2.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>series2.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >series2 : Symbol(series2, Decl(specializationsShouldNotAffectEachOther.ts, 12, 7)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >seriesExtent : Symbol(seriesExtent, Decl(specializationsShouldNotAffectEachOther.ts, 10, 7)) return null; @@ -34,11 +34,11 @@ function foo() { var keyExtent2: any[] = series.data.map(function (d: string) { return d; }); >keyExtent2 : Symbol(keyExtent2, Decl(specializationsShouldNotAffectEachOther.ts, 19, 3)) ->series.data.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>series.data.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >series.data : Symbol(Series.data, Decl(specializationsShouldNotAffectEachOther.ts, 1, 19)) >series : Symbol(series, Decl(specializationsShouldNotAffectEachOther.ts, 5, 3)) >data : Symbol(Series.data, Decl(specializationsShouldNotAffectEachOther.ts, 1, 19)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >d : Symbol(d, Decl(specializationsShouldNotAffectEachOther.ts, 19, 50)) >d : Symbol(d, Decl(specializationsShouldNotAffectEachOther.ts, 19, 50)) diff --git a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.symbols b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.symbols index 0730ccaf409..8b1bbfb6aab 100644 --- a/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.symbols +++ b/tests/baselines/reference/specializedSignatureIsSubtypeOfNonSpecializedSignature.symbols @@ -55,7 +55,7 @@ class C2 { class C3 { >C3 : Symbol(C3, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 18, 1)) >T : Symbol(T, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 20, 9)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo(x: 'a'); >foo : Symbol(foo, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 20, 28), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 21, 16), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 22, 19), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 23, 14)) @@ -131,7 +131,7 @@ interface I2 { interface I3 { >I3 : Symbol(I3, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 43, 1)) >T : Symbol(T, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 45, 13)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) (x: 'a'); >x : Symbol(x, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 46, 5)) @@ -236,7 +236,7 @@ var a3: { foo(x: T); >foo : Symbol(foo, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 75, 16), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 76, 19), Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 77, 16)) >T : Symbol(T, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 78, 8)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 78, 26)) >T : Symbol(T, Decl(specializedSignatureIsSubtypeOfNonSpecializedSignature.ts, 78, 8)) } diff --git a/tests/baselines/reference/staticInstanceResolution2.symbols b/tests/baselines/reference/staticInstanceResolution2.symbols index 349088f5ded..cb7b96445c2 100644 --- a/tests/baselines/reference/staticInstanceResolution2.symbols +++ b/tests/baselines/reference/staticInstanceResolution2.symbols @@ -3,9 +3,9 @@ class A { } >A : Symbol(A, Decl(staticInstanceResolution2.ts, 0, 0)) A.hasOwnProperty('foo'); ->A.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>A.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) >A : Symbol(A, Decl(staticInstanceResolution2.ts, 0, 0)) ->hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) class B { >B : Symbol(B, Decl(staticInstanceResolution2.ts, 1, 24)) @@ -13,9 +13,9 @@ class B { constructor() { } } B.hasOwnProperty('foo'); ->B.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>B.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) >B : Symbol(B, Decl(staticInstanceResolution2.ts, 1, 24)) ->hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/stringIncludes.symbols b/tests/baselines/reference/stringIncludes.symbols index 1348b62e566..1f1b2e55ccf 100644 --- a/tests/baselines/reference/stringIncludes.symbols +++ b/tests/baselines/reference/stringIncludes.symbols @@ -5,11 +5,11 @@ var includes: boolean; includes = "abcde".includes("cd"); >includes : Symbol(includes, Decl(stringIncludes.ts, 1, 3)) ->"abcde".includes : Symbol(String.includes, Decl(lib.d.ts, 4249, 37)) ->includes : Symbol(String.includes, Decl(lib.d.ts, 4249, 37)) +>"abcde".includes : Symbol(String.includes, Decl(lib.d.ts, --, --)) +>includes : Symbol(String.includes, Decl(lib.d.ts, --, --)) includes = "abcde".includes("cd", 2); >includes : Symbol(includes, Decl(stringIncludes.ts, 1, 3)) ->"abcde".includes : Symbol(String.includes, Decl(lib.d.ts, 4249, 37)) ->includes : Symbol(String.includes, Decl(lib.d.ts, 4249, 37)) +>"abcde".includes : Symbol(String.includes, Decl(lib.d.ts, --, --)) +>includes : Symbol(String.includes, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/stringPropCodeGen.symbols b/tests/baselines/reference/stringPropCodeGen.symbols index b0d9cb91fc2..d2c966f1b6e 100644 --- a/tests/baselines/reference/stringPropCodeGen.symbols +++ b/tests/baselines/reference/stringPropCodeGen.symbols @@ -15,9 +15,9 @@ a.foo(); >foo : Symbol("foo", Decl(stringPropCodeGen.ts, 0, 9)) a.bar.toString(); ->a.bar.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>a.bar.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >a.bar : Symbol("bar", Decl(stringPropCodeGen.ts, 2, 25)) >a : Symbol(a, Decl(stringPropCodeGen.ts, 0, 3)) >bar : Symbol("bar", Decl(stringPropCodeGen.ts, 2, 25)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/stringPropertyAccess.symbols b/tests/baselines/reference/stringPropertyAccess.symbols index 26a84d67d6f..ba239deee00 100644 --- a/tests/baselines/reference/stringPropertyAccess.symbols +++ b/tests/baselines/reference/stringPropertyAccess.symbols @@ -4,23 +4,23 @@ var x = ''; var a = x.charAt(0); >a : Symbol(a, Decl(stringPropertyAccess.ts, 1, 3)) ->x.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>x.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(stringPropertyAccess.ts, 0, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) var b = x.hasOwnProperty('charAt'); >b : Symbol(b, Decl(stringPropertyAccess.ts, 2, 3)) ->x.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>x.hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(stringPropertyAccess.ts, 0, 3)) ->hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>hasOwnProperty : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) var c = x['charAt'](0); >c : Symbol(c, Decl(stringPropertyAccess.ts, 4, 3)) >x : Symbol(x, Decl(stringPropertyAccess.ts, 0, 3)) ->'charAt' : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>'charAt' : Symbol(String.charAt, Decl(lib.d.ts, --, --)) var e = x['hasOwnProperty']('toFixed'); >e : Symbol(e, Decl(stringPropertyAccess.ts, 5, 3)) >x : Symbol(x, Decl(stringPropertyAccess.ts, 0, 3)) ->'hasOwnProperty' : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, 105, 22)) +>'hasOwnProperty' : Symbol(Object.hasOwnProperty, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/subtypesOfAny.symbols b/tests/baselines/reference/subtypesOfAny.symbols index ff4874f1cec..85f5186f705 100644 --- a/tests/baselines/reference/subtypesOfAny.symbols +++ b/tests/baselines/reference/subtypesOfAny.symbols @@ -53,7 +53,7 @@ interface I5 { foo: Date; >foo : Symbol(foo, Decl(subtypesOfAny.ts, 27, 21)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } @@ -65,7 +65,7 @@ interface I6 { foo: RegExp; >foo : Symbol(foo, Decl(subtypesOfAny.ts, 33, 21)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } @@ -261,7 +261,7 @@ interface I19 { foo: Object; >foo : Symbol(foo, Decl(subtypesOfAny.ts, 124, 21)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/subtypingTransitivity.symbols b/tests/baselines/reference/subtypingTransitivity.symbols index 95e0a4bc9d6..7a1ee279bb3 100644 --- a/tests/baselines/reference/subtypingTransitivity.symbols +++ b/tests/baselines/reference/subtypingTransitivity.symbols @@ -4,7 +4,7 @@ class B { x: Object; >x : Symbol(x, Decl(subtypingTransitivity.ts, 0, 9)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } class D extends B { diff --git a/tests/baselines/reference/subtypingWithCallSignatures2.symbols b/tests/baselines/reference/subtypingWithCallSignatures2.symbols index 5aa1021d260..02f08016b31 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures2.symbols +++ b/tests/baselines/reference/subtypingWithCallSignatures2.symbols @@ -173,12 +173,12 @@ declare function foo12(a: (x: Array, y: Array) => Array >foo12 : Symbol(foo12, Decl(subtypingWithCallSignatures2.ts, 38, 36), Decl(subtypingWithCallSignatures2.ts, 40, 92)) >a : Symbol(a, Decl(subtypingWithCallSignatures2.ts, 40, 23)) >x : Symbol(x, Decl(subtypingWithCallSignatures2.ts, 40, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithCallSignatures2.ts, 40, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithCallSignatures2.ts, 3, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures2.ts, 2, 27)) >a : Symbol(a, Decl(subtypingWithCallSignatures2.ts, 40, 23)) @@ -190,12 +190,12 @@ declare function foo13(a: (x: Array, y: Array) => Array) >foo13 : Symbol(foo13, Decl(subtypingWithCallSignatures2.ts, 41, 36), Decl(subtypingWithCallSignatures2.ts, 43, 91)) >a : Symbol(a, Decl(subtypingWithCallSignatures2.ts, 43, 23)) >x : Symbol(x, Decl(subtypingWithCallSignatures2.ts, 43, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithCallSignatures2.ts, 43, 42)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures2.ts, 2, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures2.ts, 2, 27)) >a : Symbol(a, Decl(subtypingWithCallSignatures2.ts, 43, 23)) @@ -209,7 +209,7 @@ declare function foo14(a: (x: { a: string; b: number }) => Object): typeof a; >x : Symbol(x, Decl(subtypingWithCallSignatures2.ts, 46, 27)) >a : Symbol(a, Decl(subtypingWithCallSignatures2.ts, 46, 31)) >b : Symbol(b, Decl(subtypingWithCallSignatures2.ts, 46, 42)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(subtypingWithCallSignatures2.ts, 46, 23)) declare function foo14(a: any): any; @@ -297,8 +297,8 @@ declare function foo18(a: { (a: Date): Date; >a : Symbol(a, Decl(subtypingWithCallSignatures2.ts, 74, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) }): any[]; }): typeof a; @@ -680,25 +680,25 @@ var r11b = [r11arg2, r11arg1]; var r12arg1 = >(x: Array, y: T) => >null; >r12arg1 : Symbol(r12arg1, Decl(subtypingWithCallSignatures2.ts, 145, 3)) >T : Symbol(T, Decl(subtypingWithCallSignatures2.ts, 145, 15)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures2.ts, 0, 0)) >x : Symbol(x, Decl(subtypingWithCallSignatures2.ts, 145, 38)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithCallSignatures2.ts, 145, 53)) >T : Symbol(T, Decl(subtypingWithCallSignatures2.ts, 145, 15)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures2.ts, 2, 27)) var r12arg2 = (x: Array, y: Array) => >null; >r12arg2 : Symbol(r12arg2, Decl(subtypingWithCallSignatures2.ts, 146, 3)) >x : Symbol(x, Decl(subtypingWithCallSignatures2.ts, 146, 15)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithCallSignatures2.ts, 146, 30)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithCallSignatures2.ts, 3, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures2.ts, 2, 27)) var r12 = foo12(r12arg1); // any @@ -719,10 +719,10 @@ var r12b = [r12arg2, r12arg1]; var r13arg1 = >(x: Array, y: T) => y; >r13arg1 : Symbol(r13arg1, Decl(subtypingWithCallSignatures2.ts, 151, 3)) >T : Symbol(T, Decl(subtypingWithCallSignatures2.ts, 151, 15)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures2.ts, 2, 27)) >x : Symbol(x, Decl(subtypingWithCallSignatures2.ts, 151, 41)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithCallSignatures2.ts, 151, 56)) >T : Symbol(T, Decl(subtypingWithCallSignatures2.ts, 151, 15)) @@ -731,12 +731,12 @@ var r13arg1 = >(x: Array, y: T) => y; var r13arg2 = (x: Array, y: Array) => >null; >r13arg2 : Symbol(r13arg2, Decl(subtypingWithCallSignatures2.ts, 152, 3)) >x : Symbol(x, Decl(subtypingWithCallSignatures2.ts, 152, 15)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithCallSignatures2.ts, 152, 30)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures2.ts, 2, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures2.ts, 2, 27)) var r13 = foo13(r13arg1); // any @@ -771,7 +771,7 @@ var r14arg2 = (x: { a: string; b: number }) => null; >x : Symbol(x, Decl(subtypingWithCallSignatures2.ts, 158, 15)) >a : Symbol(a, Decl(subtypingWithCallSignatures2.ts, 158, 19)) >b : Symbol(b, Decl(subtypingWithCallSignatures2.ts, 158, 30)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r14 = foo14(r14arg1); // any >r14 : Symbol(r14, Decl(subtypingWithCallSignatures2.ts, 159, 3)) diff --git a/tests/baselines/reference/subtypingWithCallSignatures3.symbols b/tests/baselines/reference/subtypingWithCallSignatures3.symbols index 666977c62d9..37e1c0423c4 100644 --- a/tests/baselines/reference/subtypingWithCallSignatures3.symbols +++ b/tests/baselines/reference/subtypingWithCallSignatures3.symbols @@ -101,12 +101,12 @@ module Errors { >foo12 : Symbol(foo12, Decl(subtypingWithCallSignatures3.ts, 22, 41), Decl(subtypingWithCallSignatures3.ts, 24, 98)) >a2 : Symbol(a2, Decl(subtypingWithCallSignatures3.ts, 24, 27)) >x : Symbol(x, Decl(subtypingWithCallSignatures3.ts, 24, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures3.ts, 3, 15)) >y : Symbol(y, Decl(subtypingWithCallSignatures3.ts, 24, 47)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithCallSignatures3.ts, 5, 47)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures3.ts, 4, 31)) >a2 : Symbol(a2, Decl(subtypingWithCallSignatures3.ts, 24, 27)) @@ -386,24 +386,24 @@ module Errors { var r6arg = (x: Array, y: Array) => >null; >r6arg : Symbol(r6arg, Decl(subtypingWithCallSignatures3.ts, 83, 7)) >x : Symbol(x, Decl(subtypingWithCallSignatures3.ts, 83, 17)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures3.ts, 3, 15)) >y : Symbol(y, Decl(subtypingWithCallSignatures3.ts, 83, 32)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithCallSignatures3.ts, 5, 47)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithCallSignatures3.ts, 4, 31)) var r6arg2 = >(x: Array, y: Array) => null; >r6arg2 : Symbol(r6arg2, Decl(subtypingWithCallSignatures3.ts, 84, 7)) >T : Symbol(T, Decl(subtypingWithCallSignatures3.ts, 84, 18)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithCallSignatures3.ts, 5, 47)) >x : Symbol(x, Decl(subtypingWithCallSignatures3.ts, 84, 45)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures3.ts, 3, 15)) >y : Symbol(y, Decl(subtypingWithCallSignatures3.ts, 84, 60)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithCallSignatures3.ts, 3, 15)) >T : Symbol(T, Decl(subtypingWithCallSignatures3.ts, 84, 18)) diff --git a/tests/baselines/reference/subtypingWithConstructSignatures2.symbols b/tests/baselines/reference/subtypingWithConstructSignatures2.symbols index 08f1e814b4d..2173aaa1392 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures2.symbols +++ b/tests/baselines/reference/subtypingWithConstructSignatures2.symbols @@ -173,12 +173,12 @@ declare function foo12(a: new (x: Array, y: Array) => Arrayfoo12 : Symbol(foo12, Decl(subtypingWithConstructSignatures2.ts, 38, 36), Decl(subtypingWithConstructSignatures2.ts, 40, 96)) >a : Symbol(a, Decl(subtypingWithConstructSignatures2.ts, 40, 23)) >x : Symbol(x, Decl(subtypingWithConstructSignatures2.ts, 40, 31)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures2.ts, 40, 46)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithConstructSignatures2.ts, 3, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures2.ts, 2, 27)) >a : Symbol(a, Decl(subtypingWithConstructSignatures2.ts, 40, 23)) @@ -190,12 +190,12 @@ declare function foo13(a: new (x: Array, y: Array) => Arrayfoo13 : Symbol(foo13, Decl(subtypingWithConstructSignatures2.ts, 41, 36), Decl(subtypingWithConstructSignatures2.ts, 43, 95)) >a : Symbol(a, Decl(subtypingWithConstructSignatures2.ts, 43, 23)) >x : Symbol(x, Decl(subtypingWithConstructSignatures2.ts, 43, 31)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures2.ts, 43, 46)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures2.ts, 2, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures2.ts, 2, 27)) >a : Symbol(a, Decl(subtypingWithConstructSignatures2.ts, 43, 23)) @@ -209,7 +209,7 @@ declare function foo14(a: new (x: { a: string; b: number }) => Object): typeof a >x : Symbol(x, Decl(subtypingWithConstructSignatures2.ts, 46, 31)) >a : Symbol(a, Decl(subtypingWithConstructSignatures2.ts, 46, 35)) >b : Symbol(b, Decl(subtypingWithConstructSignatures2.ts, 46, 46)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(subtypingWithConstructSignatures2.ts, 46, 23)) declare function foo14(a: any): any; @@ -297,8 +297,8 @@ declare function foo18(a: { new (a: Date): Date; >a : Symbol(a, Decl(subtypingWithConstructSignatures2.ts, 74, 13)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) }): any[]; }): typeof a; @@ -680,25 +680,25 @@ var r11b = [r11arg2, r11arg1]; var r12arg1: new >(x: Array, y: T) => Array; >r12arg1 : Symbol(r12arg1, Decl(subtypingWithConstructSignatures2.ts, 145, 3)) >T : Symbol(T, Decl(subtypingWithConstructSignatures2.ts, 145, 18)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures2.ts, 0, 0)) >x : Symbol(x, Decl(subtypingWithConstructSignatures2.ts, 145, 41)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures2.ts, 145, 56)) >T : Symbol(T, Decl(subtypingWithConstructSignatures2.ts, 145, 18)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures2.ts, 2, 27)) var r12arg2: new (x: Array, y: Array) => Array; >r12arg2 : Symbol(r12arg2, Decl(subtypingWithConstructSignatures2.ts, 146, 3)) >x : Symbol(x, Decl(subtypingWithConstructSignatures2.ts, 146, 18)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures2.ts, 146, 33)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithConstructSignatures2.ts, 3, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures2.ts, 2, 27)) var r12 = foo12(r12arg1); // any @@ -719,10 +719,10 @@ var r12b = [r12arg2, r12arg1]; var r13arg1: new >(x: Array, y: T) => T; >r13arg1 : Symbol(r13arg1, Decl(subtypingWithConstructSignatures2.ts, 151, 3)) >T : Symbol(T, Decl(subtypingWithConstructSignatures2.ts, 151, 18)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures2.ts, 2, 27)) >x : Symbol(x, Decl(subtypingWithConstructSignatures2.ts, 151, 44)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures2.ts, 151, 59)) >T : Symbol(T, Decl(subtypingWithConstructSignatures2.ts, 151, 18)) @@ -731,12 +731,12 @@ var r13arg1: new >(x: Array, y: T) => T; var r13arg2: new (x: Array, y: Array) => Array; >r13arg2 : Symbol(r13arg2, Decl(subtypingWithConstructSignatures2.ts, 152, 3)) >x : Symbol(x, Decl(subtypingWithConstructSignatures2.ts, 152, 18)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures2.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures2.ts, 152, 33)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures2.ts, 2, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures2.ts, 2, 27)) var r13 = foo13(r13arg1); // any @@ -769,7 +769,7 @@ var r14arg2: new (x: { a: string; b: number }) => Object; >x : Symbol(x, Decl(subtypingWithConstructSignatures2.ts, 158, 18)) >a : Symbol(a, Decl(subtypingWithConstructSignatures2.ts, 158, 22)) >b : Symbol(b, Decl(subtypingWithConstructSignatures2.ts, 158, 33)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r14 = foo14(r14arg1); // any >r14 : Symbol(r14, Decl(subtypingWithConstructSignatures2.ts, 159, 3)) diff --git a/tests/baselines/reference/subtypingWithConstructSignatures3.symbols b/tests/baselines/reference/subtypingWithConstructSignatures3.symbols index ce8eda2dcf6..3adce566f95 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures3.symbols +++ b/tests/baselines/reference/subtypingWithConstructSignatures3.symbols @@ -101,12 +101,12 @@ module Errors { >foo12 : Symbol(foo12, Decl(subtypingWithConstructSignatures3.ts, 22, 41), Decl(subtypingWithConstructSignatures3.ts, 24, 102)) >a2 : Symbol(a2, Decl(subtypingWithConstructSignatures3.ts, 24, 27)) >x : Symbol(x, Decl(subtypingWithConstructSignatures3.ts, 24, 36)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures3.ts, 3, 15)) >y : Symbol(y, Decl(subtypingWithConstructSignatures3.ts, 24, 51)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithConstructSignatures3.ts, 5, 47)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures3.ts, 4, 31)) >a2 : Symbol(a2, Decl(subtypingWithConstructSignatures3.ts, 24, 27)) @@ -386,24 +386,24 @@ module Errors { var r6arg1: new (x: Array, y: Array) => Array; >r6arg1 : Symbol(r6arg1, Decl(subtypingWithConstructSignatures3.ts, 85, 7)) >x : Symbol(x, Decl(subtypingWithConstructSignatures3.ts, 85, 21)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures3.ts, 3, 15)) >y : Symbol(y, Decl(subtypingWithConstructSignatures3.ts, 85, 36)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithConstructSignatures3.ts, 5, 47)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures3.ts, 4, 31)) var r6arg2: new >(x: Array, y: Array) => T; >r6arg2 : Symbol(r6arg2, Decl(subtypingWithConstructSignatures3.ts, 86, 7)) >T : Symbol(T, Decl(subtypingWithConstructSignatures3.ts, 86, 21)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithConstructSignatures3.ts, 5, 47)) >x : Symbol(x, Decl(subtypingWithConstructSignatures3.ts, 86, 48)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures3.ts, 3, 15)) >y : Symbol(y, Decl(subtypingWithConstructSignatures3.ts, 86, 63)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures3.ts, 3, 15)) >T : Symbol(T, Decl(subtypingWithConstructSignatures3.ts, 86, 21)) diff --git a/tests/baselines/reference/subtypingWithConstructSignatures5.symbols b/tests/baselines/reference/subtypingWithConstructSignatures5.symbols index ab20c2b7a3f..634f31ff783 100644 --- a/tests/baselines/reference/subtypingWithConstructSignatures5.symbols +++ b/tests/baselines/reference/subtypingWithConstructSignatures5.symbols @@ -111,23 +111,23 @@ interface A { // T a12: new (x: Array, y: Array) => Array; >a12 : Symbol(a12, Decl(subtypingWithConstructSignatures5.ts, 20, 75)) >x : Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 21, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 21, 29)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived2 : Symbol(Derived2, Decl(subtypingWithConstructSignatures5.ts, 4, 43)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a13: new (x: Array, y: Array) => Array; >a13 : Symbol(a13, Decl(subtypingWithConstructSignatures5.ts, 21, 68)) >x : Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 22, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 22, 29)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a14: new (x: { a: string; b: number }) => Object; @@ -135,7 +135,7 @@ interface A { // T >x : Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 23, 14)) >a : Symbol(a, Decl(subtypingWithConstructSignatures5.ts, 23, 18)) >b : Symbol(b, Decl(subtypingWithConstructSignatures5.ts, 23, 29)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface B extends A { @@ -280,23 +280,23 @@ interface I extends B { a12: new >(x: Array, y: T) => Array; // ok, less specific parameter type >a12 : Symbol(a12, Decl(subtypingWithConstructSignatures5.ts, 43, 47)) >T : Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 44, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >x : Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 44, 37)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 44, 52)) >T : Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 44, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) a13: new >(x: Array, y: T) => T; // ok, T = Array, satisfies constraint, contextual signature instantiation succeeds >a13 : Symbol(a13, Decl(subtypingWithConstructSignatures5.ts, 44, 77)) >T : Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 45, 14)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Derived : Symbol(Derived, Decl(subtypingWithConstructSignatures5.ts, 3, 27)) >x : Symbol(x, Decl(subtypingWithConstructSignatures5.ts, 45, 40)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Base : Symbol(Base, Decl(subtypingWithConstructSignatures5.ts, 0, 0)) >y : Symbol(y, Decl(subtypingWithConstructSignatures5.ts, 45, 55)) >T : Symbol(T, Decl(subtypingWithConstructSignatures5.ts, 45, 14)) diff --git a/tests/baselines/reference/subtypingWithOptionalProperties.symbols b/tests/baselines/reference/subtypingWithOptionalProperties.symbols index 44ebbe99fd7..a7a8b97e9f0 100644 --- a/tests/baselines/reference/subtypingWithOptionalProperties.symbols +++ b/tests/baselines/reference/subtypingWithOptionalProperties.symbols @@ -21,15 +21,15 @@ var r = f({ s: new Object() }); // ok >r : Symbol(r, Decl(subtypingWithOptionalProperties.ts, 8, 3)) >f : Symbol(f, Decl(subtypingWithOptionalProperties.ts, 0, 0)) >s : Symbol(s, Decl(subtypingWithOptionalProperties.ts, 8, 11)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) r.s && r.s.toFixed(); // would blow up at runtime >r.s : Symbol(s, Decl(subtypingWithOptionalProperties.ts, 4, 12)) >r : Symbol(r, Decl(subtypingWithOptionalProperties.ts, 8, 3)) >s : Symbol(s, Decl(subtypingWithOptionalProperties.ts, 4, 12)) ->r.s.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>r.s.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >r.s : Symbol(s, Decl(subtypingWithOptionalProperties.ts, 4, 12)) >r : Symbol(r, Decl(subtypingWithOptionalProperties.ts, 8, 3)) >s : Symbol(s, Decl(subtypingWithOptionalProperties.ts, 4, 12)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/superCallParameterContextualTyping1.symbols b/tests/baselines/reference/superCallParameterContextualTyping1.symbols index 80876e2ee9d..ed845b7cd4e 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping1.symbols +++ b/tests/baselines/reference/superCallParameterContextualTyping1.symbols @@ -22,9 +22,9 @@ class B extends A { constructor() { super(value => String(value.toExponential())); } >super : Symbol(A, Decl(superCallParameterContextualTyping1.ts, 0, 0)) >value : Symbol(value, Decl(superCallParameterContextualTyping1.ts, 9, 26)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) ->value.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>value.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) >value : Symbol(value, Decl(superCallParameterContextualTyping1.ts, 9, 26)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/superCallParameterContextualTyping3.symbols b/tests/baselines/reference/superCallParameterContextualTyping3.symbols index 04bc148ac0f..e51687b4539 100644 --- a/tests/baselines/reference/superCallParameterContextualTyping3.symbols +++ b/tests/baselines/reference/superCallParameterContextualTyping3.symbols @@ -42,9 +42,9 @@ class C extends CBase { >p : Symbol(p, Decl(superCallParameterContextualTyping3.ts, 17, 19)) p.length; ->p.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>p.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(superCallParameterContextualTyping3.ts, 17, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } }); @@ -60,9 +60,9 @@ class C extends CBase { >p : Symbol(p, Decl(superCallParameterContextualTyping3.ts, 25, 19)) p.length; ->p.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>p.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(superCallParameterContextualTyping3.ts, 25, 19)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } }); } diff --git a/tests/baselines/reference/superSymbolIndexedAccess1.symbols b/tests/baselines/reference/superSymbolIndexedAccess1.symbols index 416ac465e24..47131f231cb 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess1.symbols +++ b/tests/baselines/reference/superSymbolIndexedAccess1.symbols @@ -1,9 +1,9 @@ === tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts === var symbol = Symbol.for('myThing'); >symbol : Symbol(symbol, Decl(superSymbolIndexedAccess1.ts, 0, 3)) ->Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 3862, 42)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 3862, 42)) +>Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, --, --)) class Foo { >Foo : Symbol(Foo, Decl(superSymbolIndexedAccess1.ts, 0, 35)) diff --git a/tests/baselines/reference/superSymbolIndexedAccess2.symbols b/tests/baselines/reference/superSymbolIndexedAccess2.symbols index 726abb3fdc5..9b65ce358bb 100644 --- a/tests/baselines/reference/superSymbolIndexedAccess2.symbols +++ b/tests/baselines/reference/superSymbolIndexedAccess2.symbols @@ -4,9 +4,9 @@ class Foo { >Foo : Symbol(Foo, Decl(superSymbolIndexedAccess2.ts, 0, 0)) [Symbol.isConcatSpreadable]() { ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) return 0; } @@ -17,14 +17,14 @@ class Bar extends Foo { >Foo : Symbol(Foo, Decl(superSymbolIndexedAccess2.ts, 0, 0)) [Symbol.isConcatSpreadable]() { ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) return super[Symbol.isConcatSpreadable](); >super : Symbol(Foo, Decl(superSymbolIndexedAccess2.ts, 0, 0)) ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/symbolDeclarationEmit1.symbols b/tests/baselines/reference/symbolDeclarationEmit1.symbols index 9a7d93c7246..0b1999cf606 100644 --- a/tests/baselines/reference/symbolDeclarationEmit1.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit1.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit1.ts, 0, 0)) [Symbol.toPrimitive]: number; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit10.symbols b/tests/baselines/reference/symbolDeclarationEmit10.symbols index 63602f4fd2c..7d7cbf257df 100644 --- a/tests/baselines/reference/symbolDeclarationEmit10.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit10.symbols @@ -3,13 +3,13 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit10.ts, 0, 3)) get [Symbol.isConcatSpreadable]() { return '' }, ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) set [Symbol.isConcatSpreadable](x) { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolDeclarationEmit10.ts, 2, 36)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit11.symbols b/tests/baselines/reference/symbolDeclarationEmit11.symbols index 850bde66c49..a8b9ab0757d 100644 --- a/tests/baselines/reference/symbolDeclarationEmit11.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit11.symbols @@ -3,23 +3,23 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit11.ts, 0, 0)) static [Symbol.iterator] = 0; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) static [Symbol.isConcatSpreadable]() { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) static get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) static set [Symbol.toPrimitive](x) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolDeclarationEmit11.ts, 4, 36)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit13.symbols b/tests/baselines/reference/symbolDeclarationEmit13.symbols index accb92a8c52..9ac140cbcc4 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit13.symbols @@ -3,13 +3,13 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit13.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) set [Symbol.toStringTag](x) { } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolDeclarationEmit13.ts, 2, 29)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit14.symbols b/tests/baselines/reference/symbolDeclarationEmit14.symbols index 91a5cfdd760..4ee1d1d2ebd 100644 --- a/tests/baselines/reference/symbolDeclarationEmit14.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit14.symbols @@ -3,12 +3,12 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit14.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) get [Symbol.toStringTag]() { return ""; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit2.symbols b/tests/baselines/reference/symbolDeclarationEmit2.symbols index 1993e369aea..f3d7253f1af 100644 --- a/tests/baselines/reference/symbolDeclarationEmit2.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit2.symbols @@ -3,7 +3,7 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit2.ts, 0, 0)) [Symbol.toPrimitive] = ""; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit3.symbols b/tests/baselines/reference/symbolDeclarationEmit3.symbols index 84f39f363f1..4a75ecac742 100644 --- a/tests/baselines/reference/symbolDeclarationEmit3.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit3.symbols @@ -3,20 +3,20 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit3.ts, 0, 0)) [Symbol.toPrimitive](x: number); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 1, 25)) [Symbol.toPrimitive](x: string); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 2, 25)) [Symbol.toPrimitive](x: any) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolDeclarationEmit3.ts, 3, 25)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit4.symbols b/tests/baselines/reference/symbolDeclarationEmit4.symbols index 655a91fc88b..eec0912d6ee 100644 --- a/tests/baselines/reference/symbolDeclarationEmit4.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit4.symbols @@ -3,13 +3,13 @@ class C { >C : Symbol(C, Decl(symbolDeclarationEmit4.ts, 0, 0)) get [Symbol.toPrimitive]() { return ""; } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) set [Symbol.toPrimitive](x) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolDeclarationEmit4.ts, 2, 29)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit5.symbols b/tests/baselines/reference/symbolDeclarationEmit5.symbols index 1436f9b9f69..e9ee78e4a7d 100644 --- a/tests/baselines/reference/symbolDeclarationEmit5.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit5.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(symbolDeclarationEmit5.ts, 0, 0)) [Symbol.isConcatSpreadable](): string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit6.symbols b/tests/baselines/reference/symbolDeclarationEmit6.symbols index f07ebd532fa..64da887014c 100644 --- a/tests/baselines/reference/symbolDeclarationEmit6.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit6.symbols @@ -3,7 +3,7 @@ interface I { >I : Symbol(I, Decl(symbolDeclarationEmit6.ts, 0, 0)) [Symbol.isConcatSpreadable]: string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit7.symbols b/tests/baselines/reference/symbolDeclarationEmit7.symbols index 0435dc15df2..3bfaee5316c 100644 --- a/tests/baselines/reference/symbolDeclarationEmit7.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit7.symbols @@ -3,7 +3,7 @@ var obj: { >obj : Symbol(obj, Decl(symbolDeclarationEmit7.ts, 0, 3)) [Symbol.isConcatSpreadable]: string; ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit8.symbols b/tests/baselines/reference/symbolDeclarationEmit8.symbols index 7e95754b1eb..9eead633343 100644 --- a/tests/baselines/reference/symbolDeclarationEmit8.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit8.symbols @@ -3,7 +3,7 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit8.ts, 0, 3)) [Symbol.isConcatSpreadable]: 0 ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolDeclarationEmit9.symbols b/tests/baselines/reference/symbolDeclarationEmit9.symbols index d4f08115a21..ec49c196d02 100644 --- a/tests/baselines/reference/symbolDeclarationEmit9.symbols +++ b/tests/baselines/reference/symbolDeclarationEmit9.symbols @@ -3,7 +3,7 @@ var obj = { >obj : Symbol(obj, Decl(symbolDeclarationEmit9.ts, 0, 3)) [Symbol.isConcatSpreadable]() { } ->Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, 3884, 24)) +>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolProperty11.symbols b/tests/baselines/reference/symbolProperty11.symbols index 3db0f7012cb..b064d11b9de 100644 --- a/tests/baselines/reference/symbolProperty11.symbols +++ b/tests/baselines/reference/symbolProperty11.symbols @@ -6,9 +6,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty11.ts, 0, 11)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty11.ts, 2, 25)) } diff --git a/tests/baselines/reference/symbolProperty13.symbols b/tests/baselines/reference/symbolProperty13.symbols index 62ce887a731..a48f02fdacf 100644 --- a/tests/baselines/reference/symbolProperty13.symbols +++ b/tests/baselines/reference/symbolProperty13.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(symbolProperty13.ts, 0, 0)) [Symbol.iterator]: { x; y }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty13.ts, 1, 24)) >y : Symbol(y, Decl(symbolProperty13.ts, 1, 27)) } @@ -13,9 +13,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty13.ts, 2, 1)) [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty13.ts, 4, 24)) } diff --git a/tests/baselines/reference/symbolProperty14.symbols b/tests/baselines/reference/symbolProperty14.symbols index c48bd271c87..459b2699e42 100644 --- a/tests/baselines/reference/symbolProperty14.symbols +++ b/tests/baselines/reference/symbolProperty14.symbols @@ -3,9 +3,9 @@ class C { >C : Symbol(C, Decl(symbolProperty14.ts, 0, 0)) [Symbol.iterator]: { x; y }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty14.ts, 1, 24)) >y : Symbol(y, Decl(symbolProperty14.ts, 1, 27)) } @@ -13,9 +13,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty14.ts, 2, 1)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty14.ts, 4, 25)) } diff --git a/tests/baselines/reference/symbolProperty15.symbols b/tests/baselines/reference/symbolProperty15.symbols index 56f722c523b..83a3f4630fe 100644 --- a/tests/baselines/reference/symbolProperty15.symbols +++ b/tests/baselines/reference/symbolProperty15.symbols @@ -6,9 +6,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty15.ts, 0, 11)) [Symbol.iterator]?: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty15.ts, 2, 25)) } diff --git a/tests/baselines/reference/symbolProperty16.symbols b/tests/baselines/reference/symbolProperty16.symbols index 092d766034e..d54002167a1 100644 --- a/tests/baselines/reference/symbolProperty16.symbols +++ b/tests/baselines/reference/symbolProperty16.symbols @@ -3,18 +3,18 @@ class C { >C : Symbol(C, Decl(symbolProperty16.ts, 0, 0)) private [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty16.ts, 1, 32)) } interface I { >I : Symbol(I, Decl(symbolProperty16.ts, 2, 1)) [Symbol.iterator]: { x }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty16.ts, 4, 24)) } diff --git a/tests/baselines/reference/symbolProperty18.symbols b/tests/baselines/reference/symbolProperty18.symbols index b5d930b4005..8f863572639 100644 --- a/tests/baselines/reference/symbolProperty18.symbols +++ b/tests/baselines/reference/symbolProperty18.symbols @@ -3,39 +3,39 @@ var i = { >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) [Symbol.iterator]: 0, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) [Symbol.toStringTag]() { return "" }, ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) set [Symbol.toPrimitive](p: boolean) { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(symbolProperty18.ts, 3, 29)) } var it = i[Symbol.iterator]; >it : Symbol(it, Decl(symbolProperty18.ts, 6, 3)) >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) var str = i[Symbol.toStringTag](); >str : Symbol(str, Decl(symbolProperty18.ts, 7, 3)) >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) i[Symbol.toPrimitive] = false; >i : Symbol(i, Decl(symbolProperty18.ts, 0, 3)) ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/symbolProperty19.symbols b/tests/baselines/reference/symbolProperty19.symbols index eae891f2e22..a2c7dd7dcfd 100644 --- a/tests/baselines/reference/symbolProperty19.symbols +++ b/tests/baselines/reference/symbolProperty19.symbols @@ -3,15 +3,15 @@ var i = { >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) [Symbol.iterator]: { p: null }, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(symbolProperty19.ts, 1, 24)) [Symbol.toStringTag]() { return { p: undefined }; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(symbolProperty19.ts, 2, 37)) >undefined : Symbol(undefined) } @@ -19,14 +19,14 @@ var i = { var it = i[Symbol.iterator]; >it : Symbol(it, Decl(symbolProperty19.ts, 5, 3)) >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) var str = i[Symbol.toStringTag](); >str : Symbol(str, Decl(symbolProperty19.ts, 6, 3)) >i : Symbol(i, Decl(symbolProperty19.ts, 0, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/symbolProperty2.symbols b/tests/baselines/reference/symbolProperty2.symbols index d03ca9a4c51..a9bc4a440e0 100644 --- a/tests/baselines/reference/symbolProperty2.symbols +++ b/tests/baselines/reference/symbolProperty2.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/es6/Symbols/symbolProperty2.ts === var s = Symbol(); >s : Symbol(s, Decl(symbolProperty2.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var x = { >x : Symbol(x, Decl(symbolProperty2.ts, 1, 3)) diff --git a/tests/baselines/reference/symbolProperty20.symbols b/tests/baselines/reference/symbolProperty20.symbols index 110067abda5..97bb4164c2f 100644 --- a/tests/baselines/reference/symbolProperty20.symbols +++ b/tests/baselines/reference/symbolProperty20.symbols @@ -3,15 +3,15 @@ interface I { >I : Symbol(I, Decl(symbolProperty20.ts, 0, 0)) [Symbol.iterator]: (s: string) => string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(symbolProperty20.ts, 1, 24)) [Symbol.toStringTag](s: number): number; ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(symbolProperty20.ts, 2, 25)) } @@ -20,16 +20,16 @@ var i: I = { >I : Symbol(I, Decl(symbolProperty20.ts, 0, 0)) [Symbol.iterator]: s => s, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(symbolProperty20.ts, 6, 22)) >s : Symbol(s, Decl(symbolProperty20.ts, 6, 22)) [Symbol.toStringTag](n) { return n; } ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(symbolProperty20.ts, 7, 25)) >n : Symbol(n, Decl(symbolProperty20.ts, 7, 25)) } diff --git a/tests/baselines/reference/symbolProperty22.symbols b/tests/baselines/reference/symbolProperty22.symbols index 2288537456c..1d7f46fa897 100644 --- a/tests/baselines/reference/symbolProperty22.symbols +++ b/tests/baselines/reference/symbolProperty22.symbols @@ -5,9 +5,9 @@ interface I { >U : Symbol(U, Decl(symbolProperty22.ts, 0, 14)) [Symbol.unscopables](x: T): U; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty22.ts, 1, 25)) >T : Symbol(T, Decl(symbolProperty22.ts, 0, 12)) >U : Symbol(U, Decl(symbolProperty22.ts, 0, 14)) @@ -27,11 +27,11 @@ declare function foo(p1: T, p2: I): U; foo("", { [Symbol.unscopables]: s => s.length }); >foo : Symbol(foo, Decl(symbolProperty22.ts, 2, 1)) ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(symbolProperty22.ts, 6, 31)) ->s.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>s.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(symbolProperty22.ts, 6, 31)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/symbolProperty23.symbols b/tests/baselines/reference/symbolProperty23.symbols index 152048a95a8..06fce65875c 100644 --- a/tests/baselines/reference/symbolProperty23.symbols +++ b/tests/baselines/reference/symbolProperty23.symbols @@ -3,9 +3,9 @@ interface I { >I : Symbol(I, Decl(symbolProperty23.ts, 0, 0)) [Symbol.toPrimitive]: () => boolean; ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) } class C implements I { @@ -13,9 +13,9 @@ class C implements I { >I : Symbol(I, Decl(symbolProperty23.ts, 0, 0)) [Symbol.toPrimitive]() { ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) return true; } diff --git a/tests/baselines/reference/symbolProperty26.symbols b/tests/baselines/reference/symbolProperty26.symbols index 7a2e443368f..ae8f95d5859 100644 --- a/tests/baselines/reference/symbolProperty26.symbols +++ b/tests/baselines/reference/symbolProperty26.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty26.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) return ""; } @@ -16,9 +16,9 @@ class C2 extends C1 { >C1 : Symbol(C1, Decl(symbolProperty26.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) return ""; } diff --git a/tests/baselines/reference/symbolProperty27.symbols b/tests/baselines/reference/symbolProperty27.symbols index 306802cdff2..d5fcf7ec224 100644 --- a/tests/baselines/reference/symbolProperty27.symbols +++ b/tests/baselines/reference/symbolProperty27.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty27.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) return {}; } @@ -16,9 +16,9 @@ class C2 extends C1 { >C1 : Symbol(C1, Decl(symbolProperty27.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) return ""; } diff --git a/tests/baselines/reference/symbolProperty28.symbols b/tests/baselines/reference/symbolProperty28.symbols index 77b476c6ea3..d8c9daba0d9 100644 --- a/tests/baselines/reference/symbolProperty28.symbols +++ b/tests/baselines/reference/symbolProperty28.symbols @@ -3,9 +3,9 @@ class C1 { >C1 : Symbol(C1, Decl(symbolProperty28.ts, 0, 0)) [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) return { x: "" }; >x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) @@ -24,8 +24,8 @@ var obj = c[Symbol.toStringTag]().x; >obj : Symbol(obj, Decl(symbolProperty28.ts, 9, 3)) >c[Symbol.toStringTag]().x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) >c : Symbol(c, Decl(symbolProperty28.ts, 8, 3)) ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty28.ts, 2, 16)) diff --git a/tests/baselines/reference/symbolProperty4.symbols b/tests/baselines/reference/symbolProperty4.symbols index c159cc756d8..7817a7c6fd0 100644 --- a/tests/baselines/reference/symbolProperty4.symbols +++ b/tests/baselines/reference/symbolProperty4.symbols @@ -3,13 +3,13 @@ var x = { >x : Symbol(x, Decl(symbolProperty4.ts, 0, 3)) [Symbol()]: 0, ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) [Symbol()]() { }, ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) get [Symbol()]() { ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) return 0; } diff --git a/tests/baselines/reference/symbolProperty40.symbols b/tests/baselines/reference/symbolProperty40.symbols index 29b66c96f1f..26a5dc36ed5 100644 --- a/tests/baselines/reference/symbolProperty40.symbols +++ b/tests/baselines/reference/symbolProperty40.symbols @@ -3,21 +3,21 @@ class C { >C : Symbol(C, Decl(symbolProperty40.ts, 0, 0)) [Symbol.iterator](x: string): string; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty40.ts, 1, 22)) [Symbol.iterator](x: number): number; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty40.ts, 2, 22)) [Symbol.iterator](x: any) { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty40.ts, 3, 22)) return undefined; @@ -31,13 +31,13 @@ var c = new C; c[Symbol.iterator](""); >c : Symbol(c, Decl(symbolProperty40.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) c[Symbol.iterator](0); >c : Symbol(c, Decl(symbolProperty40.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/symbolProperty41.symbols b/tests/baselines/reference/symbolProperty41.symbols index 129c856b804..7db66e5862e 100644 --- a/tests/baselines/reference/symbolProperty41.symbols +++ b/tests/baselines/reference/symbolProperty41.symbols @@ -3,24 +3,24 @@ class C { >C : Symbol(C, Decl(symbolProperty41.ts, 0, 0)) [Symbol.iterator](x: string): { x: string }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty41.ts, 1, 22)) >x : Symbol(x, Decl(symbolProperty41.ts, 1, 35)) [Symbol.iterator](x: "hello"): { x: string; hello: string }; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty41.ts, 2, 22)) >x : Symbol(x, Decl(symbolProperty41.ts, 2, 36)) >hello : Symbol(hello, Decl(symbolProperty41.ts, 2, 47)) [Symbol.iterator](x: any) { ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(symbolProperty41.ts, 3, 22)) return undefined; @@ -34,13 +34,13 @@ var c = new C; c[Symbol.iterator](""); >c : Symbol(c, Decl(symbolProperty41.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) c[Symbol.iterator]("hello"); >c : Symbol(c, Decl(symbolProperty41.ts, 8, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/symbolProperty45.symbols b/tests/baselines/reference/symbolProperty45.symbols index 34bb5ad967f..46ecb0a6414 100644 --- a/tests/baselines/reference/symbolProperty45.symbols +++ b/tests/baselines/reference/symbolProperty45.symbols @@ -3,16 +3,16 @@ class C { >C : Symbol(C, Decl(symbolProperty45.ts, 0, 0)) get [Symbol.hasInstance]() { ->Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 3876, 32)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, 3876, 32)) +>Symbol.hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>hasInstance : Symbol(SymbolConstructor.hasInstance, Decl(lib.d.ts, --, --)) return ""; } get [Symbol.toPrimitive]() { ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) return ""; } diff --git a/tests/baselines/reference/symbolProperty5.symbols b/tests/baselines/reference/symbolProperty5.symbols index 063ae8d3d34..00e47c461ee 100644 --- a/tests/baselines/reference/symbolProperty5.symbols +++ b/tests/baselines/reference/symbolProperty5.symbols @@ -3,19 +3,19 @@ var x = { >x : Symbol(x, Decl(symbolProperty5.ts, 0, 3)) [Symbol.iterator]: 0, ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) [Symbol.toPrimitive]() { }, ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) get [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) return 0; } diff --git a/tests/baselines/reference/symbolProperty50.symbols b/tests/baselines/reference/symbolProperty50.symbols index 64472f3c71a..f5197627846 100644 --- a/tests/baselines/reference/symbolProperty50.symbols +++ b/tests/baselines/reference/symbolProperty50.symbols @@ -9,8 +9,8 @@ module M { >C : Symbol(C, Decl(symbolProperty50.ts, 1, 24)) [Symbol.iterator]() { } ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/symbolProperty51.symbols b/tests/baselines/reference/symbolProperty51.symbols index 45a56260828..4be31dd0a56 100644 --- a/tests/baselines/reference/symbolProperty51.symbols +++ b/tests/baselines/reference/symbolProperty51.symbols @@ -9,8 +9,8 @@ module M { >C : Symbol(C, Decl(symbolProperty51.ts, 1, 21)) [Symbol.iterator]() { } ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/symbolProperty55.symbols b/tests/baselines/reference/symbolProperty55.symbols index 98f4a7769b2..e6a9c304abe 100644 --- a/tests/baselines/reference/symbolProperty55.symbols +++ b/tests/baselines/reference/symbolProperty55.symbols @@ -3,9 +3,9 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) }; @@ -14,13 +14,13 @@ module M { var Symbol: SymbolConstructor; >Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7)) ->SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.d.ts, 3850, 1)) +>SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.d.ts, --, --)) // The following should be of type 'any'. This is because even though obj has a property keyed by Symbol.iterator, // the key passed in here is the *wrong* Symbol.iterator. It is not the iterator property of the global Symbol. obj[Symbol.iterator]; >obj : Symbol(obj, Decl(symbolProperty55.ts, 0, 3)) ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(symbolProperty55.ts, 5, 7)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolProperty56.symbols b/tests/baselines/reference/symbolProperty56.symbols index fe73fb9f330..6ff465daa98 100644 --- a/tests/baselines/reference/symbolProperty56.symbols +++ b/tests/baselines/reference/symbolProperty56.symbols @@ -3,9 +3,9 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty56.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) }; diff --git a/tests/baselines/reference/symbolProperty57.symbols b/tests/baselines/reference/symbolProperty57.symbols index eaf5be2a07c..b256ba651c4 100644 --- a/tests/baselines/reference/symbolProperty57.symbols +++ b/tests/baselines/reference/symbolProperty57.symbols @@ -3,14 +3,14 @@ var obj = { >obj : Symbol(obj, Decl(symbolProperty57.ts, 0, 3)) [Symbol.iterator]: 0 ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) }; // Should give type 'any'. obj[Symbol["nonsense"]]; >obj : Symbol(obj, Decl(symbolProperty57.ts, 0, 3)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/symbolProperty6.symbols b/tests/baselines/reference/symbolProperty6.symbols index 04b89f43652..d0eedccf4fa 100644 --- a/tests/baselines/reference/symbolProperty6.symbols +++ b/tests/baselines/reference/symbolProperty6.symbols @@ -3,24 +3,24 @@ class C { >C : Symbol(C, Decl(symbolProperty6.ts, 0, 0)) [Symbol.iterator] = 0; ->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, 3890, 31)) +>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.d.ts, --, --)) [Symbol.unscopables]: number; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) [Symbol.toPrimitive]() { } ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) get [Symbol.toStringTag]() { ->Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, 3932, 24)) +>Symbol.toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toStringTag : Symbol(SymbolConstructor.toStringTag, Decl(lib.d.ts, --, --)) return 0; } diff --git a/tests/baselines/reference/symbolProperty8.symbols b/tests/baselines/reference/symbolProperty8.symbols index 541833d686a..8d26d193ef5 100644 --- a/tests/baselines/reference/symbolProperty8.symbols +++ b/tests/baselines/reference/symbolProperty8.symbols @@ -3,12 +3,12 @@ interface I { >I : Symbol(I, Decl(symbolProperty8.ts, 0, 0)) [Symbol.unscopables]: number; ->Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, 3938, 24)) +>Symbol.unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>unscopables : Symbol(SymbolConstructor.unscopables, Decl(lib.d.ts, --, --)) [Symbol.toPrimitive](); ->Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, 3926, 18)) +>Symbol.toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>toPrimitive : Symbol(SymbolConstructor.toPrimitive, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/symbolType11.symbols b/tests/baselines/reference/symbolType11.symbols index bbccd2a0f8b..d5c19af7844 100644 --- a/tests/baselines/reference/symbolType11.symbols +++ b/tests/baselines/reference/symbolType11.symbols @@ -1,9 +1,9 @@ === tests/cases/conformance/es6/Symbols/symbolType11.ts === var s = Symbol.for("logical"); >s : Symbol(s, Decl(symbolType11.ts, 0, 3)) ->Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 3862, 42)) ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11)) ->for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, 3862, 42)) +>Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>for : Symbol(SymbolConstructor.for, Decl(lib.d.ts, --, --)) s && s; >s : Symbol(s, Decl(symbolType11.ts, 0, 3)) diff --git a/tests/baselines/reference/symbolType16.symbols b/tests/baselines/reference/symbolType16.symbols index 9a25d9ad152..a31a4e5c677 100644 --- a/tests/baselines/reference/symbolType16.symbols +++ b/tests/baselines/reference/symbolType16.symbols @@ -1,6 +1,6 @@ === tests/cases/conformance/es6/Symbols/symbolType16.ts === interface Symbol { ->Symbol : Symbol(Symbol, Decl(lib.d.ts, 3840, 52), Decl(lib.d.ts, 3946, 11), Decl(symbolType16.ts, 0, 0)) +>Symbol : Symbol(Symbol, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(symbolType16.ts, 0, 0)) newSymbolProp: number; >newSymbolProp : Symbol(newSymbolProp, Decl(symbolType16.ts, 0, 18)) diff --git a/tests/baselines/reference/taggedTemplateContextualTyping1.symbols b/tests/baselines/reference/taggedTemplateContextualTyping1.symbols index f042978fa8c..2de45d16379 100644 --- a/tests/baselines/reference/taggedTemplateContextualTyping1.symbols +++ b/tests/baselines/reference/taggedTemplateContextualTyping1.symbols @@ -13,7 +13,7 @@ function tempTag1(templateStrs: TemplateStringsArray, f: FuncType, x: T): T; >tempTag1 : Symbol(tempTag1, Decl(taggedTemplateContextualTyping1.ts, 1, 48), Decl(taggedTemplateContextualTyping1.ts, 3, 79), Decl(taggedTemplateContextualTyping1.ts, 4, 92)) >T : Symbol(T, Decl(taggedTemplateContextualTyping1.ts, 3, 18)) >templateStrs : Symbol(templateStrs, Decl(taggedTemplateContextualTyping1.ts, 3, 21)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >f : Symbol(f, Decl(taggedTemplateContextualTyping1.ts, 3, 56)) >FuncType : Symbol(FuncType, Decl(taggedTemplateContextualTyping1.ts, 0, 0)) >x : Symbol(x, Decl(taggedTemplateContextualTyping1.ts, 3, 69)) @@ -24,7 +24,7 @@ function tempTag1(templateStrs: TemplateStringsArray, f: FuncType, h: FuncTyp >tempTag1 : Symbol(tempTag1, Decl(taggedTemplateContextualTyping1.ts, 1, 48), Decl(taggedTemplateContextualTyping1.ts, 3, 79), Decl(taggedTemplateContextualTyping1.ts, 4, 92)) >T : Symbol(T, Decl(taggedTemplateContextualTyping1.ts, 4, 18)) >templateStrs : Symbol(templateStrs, Decl(taggedTemplateContextualTyping1.ts, 4, 21)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >f : Symbol(f, Decl(taggedTemplateContextualTyping1.ts, 4, 56)) >FuncType : Symbol(FuncType, Decl(taggedTemplateContextualTyping1.ts, 0, 0)) >h : Symbol(h, Decl(taggedTemplateContextualTyping1.ts, 4, 69)) diff --git a/tests/baselines/reference/taggedTemplateContextualTyping2.symbols b/tests/baselines/reference/taggedTemplateContextualTyping2.symbols index 6918c5606a8..240cc344de7 100644 --- a/tests/baselines/reference/taggedTemplateContextualTyping2.symbols +++ b/tests/baselines/reference/taggedTemplateContextualTyping2.symbols @@ -22,7 +22,7 @@ type FuncType2 = (x: (p: T) => T) => typeof x; function tempTag2(templateStrs: TemplateStringsArray, f: FuncType1, x: number): number; >tempTag2 : Symbol(tempTag2, Decl(taggedTemplateContextualTyping2.ts, 2, 52), Decl(taggedTemplateContextualTyping2.ts, 4, 87), Decl(taggedTemplateContextualTyping2.ts, 5, 101)) >templateStrs : Symbol(templateStrs, Decl(taggedTemplateContextualTyping2.ts, 4, 18)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >f : Symbol(f, Decl(taggedTemplateContextualTyping2.ts, 4, 53)) >FuncType1 : Symbol(FuncType1, Decl(taggedTemplateContextualTyping2.ts, 0, 0)) >x : Symbol(x, Decl(taggedTemplateContextualTyping2.ts, 4, 67)) @@ -30,7 +30,7 @@ function tempTag2(templateStrs: TemplateStringsArray, f: FuncType1, x: number): function tempTag2(templateStrs: TemplateStringsArray, f: FuncType2, h: FuncType2, x: string): string; >tempTag2 : Symbol(tempTag2, Decl(taggedTemplateContextualTyping2.ts, 2, 52), Decl(taggedTemplateContextualTyping2.ts, 4, 87), Decl(taggedTemplateContextualTyping2.ts, 5, 101)) >templateStrs : Symbol(templateStrs, Decl(taggedTemplateContextualTyping2.ts, 5, 18)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >f : Symbol(f, Decl(taggedTemplateContextualTyping2.ts, 5, 53)) >FuncType2 : Symbol(FuncType2, Decl(taggedTemplateContextualTyping2.ts, 1, 49)) >h : Symbol(h, Decl(taggedTemplateContextualTyping2.ts, 5, 67)) diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.symbols b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.symbols index c4f538d3254..52b8f3ab6f0 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2.symbols @@ -3,7 +3,7 @@ function foo1(strs: TemplateStringsArray, x: number): string; >foo1 : Symbol(foo1, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 0, 0), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 1, 61), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 2, 49)) >strs : Symbol(strs, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 1, 14)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 1, 41)) function foo1(strs: string[], x: number): number; @@ -35,7 +35,7 @@ function foo2(strs: string[], x: number): number; function foo2(strs: TemplateStringsArray, x: number): string; >foo2 : Symbol(foo2, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 8, 20), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 10, 49), Decl(taggedTemplateStringsWithOverloadResolution2.ts, 11, 61)) >strs : Symbol(strs, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 11, 14)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(taggedTemplateStringsWithOverloadResolution2.ts, 11, 41)) function foo2(...stuff: any[]): any { diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.symbols b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.symbols index 0da33002d31..e96912ec3bb 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.symbols +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution2_ES6.symbols @@ -2,7 +2,7 @@ function foo1(strs: TemplateStringsArray, x: number): string; >foo1 : Symbol(foo1, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 0, 0), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 0, 61), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 1, 49)) >strs : Symbol(strs, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 0, 14)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 0, 41)) function foo1(strs: string[], x: number): number; @@ -34,7 +34,7 @@ function foo2(strs: string[], x: number): number; function foo2(strs: TemplateStringsArray, x: number): string; >foo2 : Symbol(foo2, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 7, 20), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 9, 49), Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 10, 61)) >strs : Symbol(strs, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 10, 14)) ->TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, 518, 38)) +>TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(taggedTemplateStringsWithOverloadResolution2_ES6.ts, 10, 41)) function foo2(...stuff: any[]): any { diff --git a/tests/baselines/reference/targetTypeArgs.symbols b/tests/baselines/reference/targetTypeArgs.symbols index 6c1b2cd9cfe..b0d825ddd50 100644 --- a/tests/baselines/reference/targetTypeArgs.symbols +++ b/tests/baselines/reference/targetTypeArgs.symbols @@ -14,44 +14,44 @@ foo(function(x) { x }); >x : Symbol(x, Decl(targetTypeArgs.ts, 4, 13)) [1].forEach(function(v,i,a) { v }); ->[1].forEach : Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) +>[1].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 6, 21)) >i : Symbol(i, Decl(targetTypeArgs.ts, 6, 23)) >a : Symbol(a, Decl(targetTypeArgs.ts, 6, 25)) >v : Symbol(v, Decl(targetTypeArgs.ts, 6, 21)) ["hello"].every(function(v,i,a) {return true;}); ->["hello"].every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) ->every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) +>["hello"].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 7, 25)) >i : Symbol(i, Decl(targetTypeArgs.ts, 7, 27)) >a : Symbol(a, Decl(targetTypeArgs.ts, 7, 29)) [1].every(function(v,i,a) {return true;}); ->[1].every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) ->every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) +>[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 8, 19)) >i : Symbol(i, Decl(targetTypeArgs.ts, 8, 21)) >a : Symbol(a, Decl(targetTypeArgs.ts, 8, 23)) [1].every(function(v,i,a) {return true;}); ->[1].every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) ->every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) +>[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 9, 19)) >i : Symbol(i, Decl(targetTypeArgs.ts, 9, 21)) >a : Symbol(a, Decl(targetTypeArgs.ts, 9, 23)) ["s"].every(function(v,i,a) {return true;}); ->["s"].every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) ->every : Symbol(Array.every, Decl(lib.d.ts, 1094, 62)) +>["s"].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 10, 21)) >i : Symbol(i, Decl(targetTypeArgs.ts, 10, 23)) >a : Symbol(a, Decl(targetTypeArgs.ts, 10, 25)) ["s"].forEach(function(v,i,a) { v }); ->["s"].forEach : Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) +>["s"].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 11, 23)) >i : Symbol(i, Decl(targetTypeArgs.ts, 11, 25)) >a : Symbol(a, Decl(targetTypeArgs.ts, 11, 27)) diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols b/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols index dbac3b57366..6df8d8ac2ad 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols @@ -9,9 +9,9 @@ function suggest(){ >result : Symbol(result, Decl(targetTypeObjectLiteralToAny.ts, 2, 4)) TypeScriptKeywords.forEach(function(keyword) { ->TypeScriptKeywords.forEach : Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) +>TypeScriptKeywords.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >TypeScriptKeywords : Symbol(TypeScriptKeywords, Decl(targetTypeObjectLiteralToAny.ts, 1, 4)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, 1108, 95)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) >keyword : Symbol(keyword, Decl(targetTypeObjectLiteralToAny.ts, 4, 37)) result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any diff --git a/tests/baselines/reference/targetTypingOnFunctions.symbols b/tests/baselines/reference/targetTypingOnFunctions.symbols index ccf669ffa67..19dfda36f79 100644 --- a/tests/baselines/reference/targetTypingOnFunctions.symbols +++ b/tests/baselines/reference/targetTypingOnFunctions.symbols @@ -3,15 +3,15 @@ var fu: (s: string) => string = function (s) { return s.toLowerCase() }; >fu : Symbol(fu, Decl(targetTypingOnFunctions.ts, 0, 3)) >s : Symbol(s, Decl(targetTypingOnFunctions.ts, 0, 9)) >s : Symbol(s, Decl(targetTypingOnFunctions.ts, 0, 42)) ->s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(targetTypingOnFunctions.ts, 0, 42)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) var zu = fu = function (s) { return s.toLowerCase() }; >zu : Symbol(zu, Decl(targetTypingOnFunctions.ts, 2, 3)) >fu : Symbol(fu, Decl(targetTypingOnFunctions.ts, 0, 3)) >s : Symbol(s, Decl(targetTypingOnFunctions.ts, 2, 24)) ->s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(targetTypingOnFunctions.ts, 2, 24)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.symbols b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.symbols index ef18ef3df64..ed7ef9dbc63 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperator.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperator.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperator.ts === var x = `abc${ new String("Hi") }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedNewOperator.ts, 0, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols index 9d8b6024e0c..a7240d4fd22 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedNewOperatorES6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedNewOperatorES6.ts === var x = `abc${ new String("Hi") }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedNewOperatorES6.ts, 0, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11), Decl(lib.d.ts, 4236, 1)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.symbols b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.symbols index 7deee379f23..22af33732cf 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlus.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlus.ts === var x = `abc${ +Infinity }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedUnaryPlus.ts, 0, 3)) ->Infinity : Symbol(Infinity, Decl(lib.d.ts, 22, 11)) +>Infinity : Symbol(Infinity, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.symbols b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.symbols index 39f2cf60c8a..5d27cedede1 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.symbols +++ b/tests/baselines/reference/templateStringWithEmbeddedUnaryPlusES6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/templates/templateStringWithEmbeddedUnaryPlusES6.ts === var x = `abc${ +Infinity }def`; >x : Symbol(x, Decl(templateStringWithEmbeddedUnaryPlusES6.ts, 0, 3)) ->Infinity : Symbol(Infinity, Decl(lib.d.ts, 22, 11)) +>Infinity : Symbol(Infinity, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/templateStringWithPropertyAccess.symbols b/tests/baselines/reference/templateStringWithPropertyAccess.symbols index fc5464f1eff..16b090fe5ff 100644 --- a/tests/baselines/reference/templateStringWithPropertyAccess.symbols +++ b/tests/baselines/reference/templateStringWithPropertyAccess.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/templates/templateStringWithPropertyAccess.ts === `abc${0}abc`.indexOf(`abc`); ->`abc${0}abc`.indexOf : Symbol(String.indexOf, Decl(lib.d.ts, 297, 41)) ->indexOf : Symbol(String.indexOf, Decl(lib.d.ts, 297, 41)) +>`abc${0}abc`.indexOf : Symbol(String.indexOf, Decl(lib.d.ts, --, --)) +>indexOf : Symbol(String.indexOf, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/templateStringWithPropertyAccessES6.symbols b/tests/baselines/reference/templateStringWithPropertyAccessES6.symbols index 22518032fc4..9259aff2a31 100644 --- a/tests/baselines/reference/templateStringWithPropertyAccessES6.symbols +++ b/tests/baselines/reference/templateStringWithPropertyAccessES6.symbols @@ -1,5 +1,5 @@ === tests/cases/conformance/es6/templates/templateStringWithPropertyAccessES6.ts === `abc${0}abc`.indexOf(`abc`); ->`abc${0}abc`.indexOf : Symbol(String.indexOf, Decl(lib.d.ts, 297, 41)) ->indexOf : Symbol(String.indexOf, Decl(lib.d.ts, 297, 41)) +>`abc${0}abc`.indexOf : Symbol(String.indexOf, Decl(lib.d.ts, --, --)) +>indexOf : Symbol(String.indexOf, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/thisInPropertyBoundDeclarations.symbols b/tests/baselines/reference/thisInPropertyBoundDeclarations.symbols index b10113ff43b..9d405b8f6f6 100644 --- a/tests/baselines/reference/thisInPropertyBoundDeclarations.symbols +++ b/tests/baselines/reference/thisInPropertyBoundDeclarations.symbols @@ -7,7 +7,7 @@ class Bug { private static func: Function[] = [ >func : Symbol(Bug.func, Decl(thisInPropertyBoundDeclarations.ts, 1, 25)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) (that: Bug, name: string) => { >that : Symbol(that, Decl(thisInPropertyBoundDeclarations.ts, 4, 6)) diff --git a/tests/baselines/reference/thisTypeInClasses.symbols b/tests/baselines/reference/thisTypeInClasses.symbols index 6383bb01b8d..04ed47b09ff 100644 --- a/tests/baselines/reference/thisTypeInClasses.symbols +++ b/tests/baselines/reference/thisTypeInClasses.symbols @@ -44,11 +44,11 @@ class C3 { c: this | Date; >c : Symbol(c, Decl(thisTypeInClasses.ts, 17, 20)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) d: this & Date; >d : Symbol(d, Decl(thisTypeInClasses.ts, 18, 19)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) e: (((this))); >e : Symbol(e, Decl(thisTypeInClasses.ts, 19, 19)) diff --git a/tests/baselines/reference/thisTypeInInterfaces.symbols b/tests/baselines/reference/thisTypeInInterfaces.symbols index 498fbcc8796..4ab896ae6f6 100644 --- a/tests/baselines/reference/thisTypeInInterfaces.symbols +++ b/tests/baselines/reference/thisTypeInInterfaces.symbols @@ -46,11 +46,11 @@ interface I3 { c: this | Date; >c : Symbol(c, Decl(thisTypeInInterfaces.ts, 18, 20)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) d: this & Date; >d : Symbol(d, Decl(thisTypeInInterfaces.ts, 19, 19)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) e: (((this))); >e : Symbol(e, Decl(thisTypeInInterfaces.ts, 20, 19)) diff --git a/tests/baselines/reference/thisTypeInTuples.symbols b/tests/baselines/reference/thisTypeInTuples.symbols index 5b9965510a7..256f182dd69 100644 --- a/tests/baselines/reference/thisTypeInTuples.symbols +++ b/tests/baselines/reference/thisTypeInTuples.symbols @@ -1,10 +1,10 @@ === tests/cases/conformance/types/thisType/thisTypeInTuples.ts === interface Array { ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11), Decl(thisTypeInTuples.ts, 0, 0)) ->T : Symbol(T, Decl(lib.d.ts, 1007, 16), Decl(thisTypeInTuples.ts, 0, 16)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(thisTypeInTuples.ts, 0, 0)) +>T : Symbol(T, Decl(lib.d.ts, --, --), Decl(thisTypeInTuples.ts, 0, 16)) slice(): this; ->slice : Symbol(slice, Decl(lib.d.ts, 1048, 15), Decl(thisTypeInTuples.ts, 0, 20)) +>slice : Symbol(slice, Decl(lib.d.ts, --, --), Decl(thisTypeInTuples.ts, 0, 20)) } let t: [number, string] = [42, "hello"]; @@ -12,19 +12,19 @@ let t: [number, string] = [42, "hello"]; let a = t.slice(); >a : Symbol(a, Decl(thisTypeInTuples.ts, 5, 3)) ->t.slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15), Decl(thisTypeInTuples.ts, 0, 20)) +>t.slice : Symbol(Array.slice, Decl(lib.d.ts, --, --), Decl(thisTypeInTuples.ts, 0, 20)) >t : Symbol(t, Decl(thisTypeInTuples.ts, 4, 3)) ->slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15), Decl(thisTypeInTuples.ts, 0, 20)) +>slice : Symbol(Array.slice, Decl(lib.d.ts, --, --), Decl(thisTypeInTuples.ts, 0, 20)) let b = t.slice(1); >b : Symbol(b, Decl(thisTypeInTuples.ts, 6, 3)) ->t.slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15), Decl(thisTypeInTuples.ts, 0, 20)) +>t.slice : Symbol(Array.slice, Decl(lib.d.ts, --, --), Decl(thisTypeInTuples.ts, 0, 20)) >t : Symbol(t, Decl(thisTypeInTuples.ts, 4, 3)) ->slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15), Decl(thisTypeInTuples.ts, 0, 20)) +>slice : Symbol(Array.slice, Decl(lib.d.ts, --, --), Decl(thisTypeInTuples.ts, 0, 20)) let c = t.slice(0, 1); >c : Symbol(c, Decl(thisTypeInTuples.ts, 7, 3)) ->t.slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15), Decl(thisTypeInTuples.ts, 0, 20)) +>t.slice : Symbol(Array.slice, Decl(lib.d.ts, --, --), Decl(thisTypeInTuples.ts, 0, 20)) >t : Symbol(t, Decl(thisTypeInTuples.ts, 4, 3)) ->slice : Symbol(Array.slice, Decl(lib.d.ts, 1048, 15), Decl(thisTypeInTuples.ts, 0, 20)) +>slice : Symbol(Array.slice, Decl(lib.d.ts, --, --), Decl(thisTypeInTuples.ts, 0, 20)) diff --git a/tests/baselines/reference/throwStatements.symbols b/tests/baselines/reference/throwStatements.symbols index cb65755a145..508bdcb9f3f 100644 --- a/tests/baselines/reference/throwStatements.symbols +++ b/tests/baselines/reference/throwStatements.symbols @@ -53,9 +53,9 @@ module M { export function F2(x: number): string { return x.toString(); } >F2 : Symbol(F2, Decl(throwStatements.ts, 21, 5)) >x : Symbol(x, Decl(throwStatements.ts, 23, 23)) ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(throwStatements.ts, 23, 23)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } var aNumber = 9.9; @@ -72,14 +72,14 @@ throw aString; var aDate = new Date(12); >aDate : Symbol(aDate, Decl(throwStatements.ts, 30, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) throw aDate; >aDate : Symbol(aDate, Decl(throwStatements.ts, 30, 3)) var anObject = new Object(); >anObject : Symbol(anObject, Decl(throwStatements.ts, 32, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) throw anObject; >anObject : Symbol(anObject, Decl(throwStatements.ts, 32, 3)) @@ -202,13 +202,13 @@ throw []; throw ['a', ['b']]; throw /[a-z]/; throw new Date(); ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) throw new C(); >C : Symbol(C, Decl(throwStatements.ts, 4, 1)) throw new Object(); ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) throw new D(); >D : Symbol(D, Decl(throwStatements.ts, 8, 1)) diff --git a/tests/baselines/reference/toStringOnPrimitives.symbols b/tests/baselines/reference/toStringOnPrimitives.symbols index f0cdf2c7050..96fb16bf4ca 100644 --- a/tests/baselines/reference/toStringOnPrimitives.symbols +++ b/tests/baselines/reference/toStringOnPrimitives.symbols @@ -1,17 +1,17 @@ === tests/cases/compiler/toStringOnPrimitives.ts === true.toString() ->true.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>true.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) var aBool = false; >aBool : Symbol(aBool, Decl(toStringOnPrimitives.ts, 1, 3)) aBool.toString(); ->aBool.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>aBool.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >aBool : Symbol(aBool, Decl(toStringOnPrimitives.ts, 1, 3)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) 1..toString(); ->1..toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>1..toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.symbols b/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.symbols index 79d5bc3e7a7..752e75d4901 100644 --- a/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.symbols +++ b/tests/baselines/reference/tooFewArgumentsInGenericFunctionTypedArgument.symbols @@ -73,16 +73,16 @@ var r1a = _.map(c2, (x) => { return x.toFixed() }); >map : Symbol(Combinators.map, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 5, 23), Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 6, 77)) >c2 : Symbol(c2, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 9, 3)) >x : Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 11, 21)) ->x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 11, 21)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) var rf1 = (x: number) => { return x.toFixed() }; >rf1 : Symbol(rf1, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 12, 3)) >x : Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 12, 11)) ->x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>x.toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 12, 11)) ->toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, 463, 37)) +>toFixed : Symbol(Number.toFixed, Decl(lib.d.ts, --, --)) var r1b = _.map(c2, rf1); >r1b : Symbol(r1b, Decl(tooFewArgumentsInGenericFunctionTypedArgument.ts, 13, 3)) diff --git a/tests/baselines/reference/topLevelExports.symbols b/tests/baselines/reference/topLevelExports.symbols index 56a32820228..733a98bcde5 100644 --- a/tests/baselines/reference/topLevelExports.symbols +++ b/tests/baselines/reference/topLevelExports.symbols @@ -8,8 +8,8 @@ function log(n:number) { return n;} >n : Symbol(n, Decl(topLevelExports.ts, 2, 13)) void log(foo).toString(); ->log(foo).toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>log(foo).toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >log : Symbol(log, Decl(topLevelExports.ts, 0, 19)) >foo : Symbol(foo, Decl(topLevelExports.ts, 0, 10)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/twoMergedInterfacesWithDifferingOverloads.symbols b/tests/baselines/reference/twoMergedInterfacesWithDifferingOverloads.symbols index 9fe6e31259e..5d46be73518 100644 --- a/tests/baselines/reference/twoMergedInterfacesWithDifferingOverloads.symbols +++ b/tests/baselines/reference/twoMergedInterfacesWithDifferingOverloads.symbols @@ -19,8 +19,8 @@ interface A { foo(x: Date): Date; >foo : Symbol(foo, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 2, 13), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 3, 27), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 7, 13)) >x : Symbol(x, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 8, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } interface B { @@ -45,12 +45,12 @@ interface B { >foo : Symbol(foo, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 11, 16), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 12, 22), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 16, 16), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 17, 20)) >x : Symbol(x, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 17, 8)) >T : Symbol(T, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 11, 12), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 16, 12)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo(x: Date): string; >foo : Symbol(foo, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 11, 16), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 12, 22), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 16, 16), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 17, 20)) >x : Symbol(x, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 18, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } var b: B; @@ -100,7 +100,7 @@ interface C { var c: C; >c : Symbol(c, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 34, 3)) >C : Symbol(C, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 22, 20), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 28, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r2 = c.foo(1, 2); // number >r2 : Symbol(r2, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 35, 3)) @@ -150,7 +150,7 @@ interface D { var d: D; >d : Symbol(d, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 48, 3)) >D : Symbol(D, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 35, 21), Decl(twoMergedInterfacesWithDifferingOverloads.ts, 42, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var r3 = d.foo(1, 1); // boolean, last definition wins >r3 : Symbol(r3, Decl(twoMergedInterfacesWithDifferingOverloads.ts, 49, 3)) diff --git a/tests/baselines/reference/typeAliasDoesntMakeModuleInstantiated.symbols b/tests/baselines/reference/typeAliasDoesntMakeModuleInstantiated.symbols index a94890b51be..c990d3de59d 100644 --- a/tests/baselines/reference/typeAliasDoesntMakeModuleInstantiated.symbols +++ b/tests/baselines/reference/typeAliasDoesntMakeModuleInstantiated.symbols @@ -5,7 +5,7 @@ declare module m { // type alias declaration here shouldnt make the module declaration instantiated type Selector = string| string[] |Function; >Selector : Symbol(Selector, Decl(typeAliasDoesntMakeModuleInstantiated.ts, 0, 18)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) export interface IStatic { >IStatic : Symbol(IStatic, Decl(typeAliasDoesntMakeModuleInstantiated.ts, 2, 47)) diff --git a/tests/baselines/reference/typeAliases.symbols b/tests/baselines/reference/typeAliases.symbols index 5bbc77c735d..02cc5027b04 100644 --- a/tests/baselines/reference/typeAliases.symbols +++ b/tests/baselines/reference/typeAliases.symbols @@ -200,12 +200,12 @@ declare function f15(a: Meters): string; >Meters : Symbol(Meters, Decl(typeAliases.ts, 63, 39)) f15(E.x).toLowerCase(); ->f15(E.x).toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>f15(E.x).toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >f15 : Symbol(f15, Decl(typeAliases.ts, 67, 17), Decl(typeAliases.ts, 69, 41)) >E.x : Symbol(E.x, Decl(typeAliases.ts, 67, 8)) >E : Symbol(E, Decl(typeAliases.ts, 65, 20)) >x : Symbol(E.x, Decl(typeAliases.ts, 67, 8)) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) type StringAndBoolean = [string, boolean] >StringAndBoolean : Symbol(StringAndBoolean, Decl(typeAliases.ts, 71, 23)) @@ -227,8 +227,8 @@ var y: StringAndBoolean = ["1", false]; >StringAndBoolean : Symbol(StringAndBoolean, Decl(typeAliases.ts, 71, 23)) y[0].toLowerCase(); ->y[0].toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>y[0].toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(typeAliases.ts, 78, 3)) >0 : Symbol(0) ->toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, 399, 51)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/typeArgumentInferenceApparentType1.symbols b/tests/baselines/reference/typeArgumentInferenceApparentType1.symbols index 557175473da..00de7ec64c9 100644 --- a/tests/baselines/reference/typeArgumentInferenceApparentType1.symbols +++ b/tests/baselines/reference/typeArgumentInferenceApparentType1.symbols @@ -3,7 +3,7 @@ function method(iterable: Iterable): T { >method : Symbol(method, Decl(typeArgumentInferenceApparentType1.ts, 0, 0)) >T : Symbol(T, Decl(typeArgumentInferenceApparentType1.ts, 0, 16)) >iterable : Symbol(iterable, Decl(typeArgumentInferenceApparentType1.ts, 0, 19)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(typeArgumentInferenceApparentType1.ts, 0, 16)) >T : Symbol(T, Decl(typeArgumentInferenceApparentType1.ts, 0, 16)) diff --git a/tests/baselines/reference/typeArgumentInferenceApparentType2.symbols b/tests/baselines/reference/typeArgumentInferenceApparentType2.symbols index f25ca2bba6b..4626aabb605 100644 --- a/tests/baselines/reference/typeArgumentInferenceApparentType2.symbols +++ b/tests/baselines/reference/typeArgumentInferenceApparentType2.symbols @@ -3,14 +3,14 @@ function method(iterable: Iterable): T { >method : Symbol(method, Decl(typeArgumentInferenceApparentType2.ts, 0, 0)) >T : Symbol(T, Decl(typeArgumentInferenceApparentType2.ts, 0, 16)) >iterable : Symbol(iterable, Decl(typeArgumentInferenceApparentType2.ts, 0, 19)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(typeArgumentInferenceApparentType2.ts, 0, 16)) >T : Symbol(T, Decl(typeArgumentInferenceApparentType2.ts, 0, 16)) function inner>() { >inner : Symbol(inner, Decl(typeArgumentInferenceApparentType2.ts, 0, 46)) >U : Symbol(U, Decl(typeArgumentInferenceApparentType2.ts, 1, 19)) ->Iterable : Symbol(Iterable, Decl(lib.d.ts, 4396, 1)) +>Iterable : Symbol(Iterable, Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(typeArgumentInferenceApparentType2.ts, 0, 16)) var u: U; diff --git a/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.symbols b/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.symbols index ceb97a73af8..7c24840b5ab 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.symbols +++ b/tests/baselines/reference/typeArgumentInferenceWithClassExpression1.symbols @@ -12,8 +12,8 @@ function foo(x = class { static prop: T }): T { } foo(class { static prop = "hello" }).length; ->foo(class { static prop = "hello" }).length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>foo(class { static prop = "hello" }).length : Symbol(String.length, Decl(lib.d.ts, --, --)) >foo : Symbol(foo, Decl(typeArgumentInferenceWithClassExpression1.ts, 0, 0)) >prop : Symbol((Anonymous class).prop, Decl(typeArgumentInferenceWithClassExpression1.ts, 4, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/typeArgumentInferenceWithClassExpression3.symbols b/tests/baselines/reference/typeArgumentInferenceWithClassExpression3.symbols index aedb0230fd6..3f25fd0682f 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithClassExpression3.symbols +++ b/tests/baselines/reference/typeArgumentInferenceWithClassExpression3.symbols @@ -12,8 +12,8 @@ function foo(x = class { prop: T }): T { } foo(class { prop = "hello" }).length; ->foo(class { prop = "hello" }).length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>foo(class { prop = "hello" }).length : Symbol(String.length, Decl(lib.d.ts, --, --)) >foo : Symbol(foo, Decl(typeArgumentInferenceWithClassExpression3.ts, 0, 0)) >prop : Symbol((Anonymous class).prop, Decl(typeArgumentInferenceWithClassExpression3.ts, 4, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols index 08b61492a54..b73bd8882d2 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols @@ -15,9 +15,9 @@ var nodes: TreeNode[]; >TreeNode : Symbol(TreeNode, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 0, 0)) nodes.map(n => n.name); ->nodes.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >nodes : Symbol(nodes, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 5, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 6, 10)) >n.name : Symbol(name, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 0, 17)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 6, 10)) diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols index cb2e8e94656..7cec46cb4b6 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols @@ -26,9 +26,9 @@ var nodes: TreeNodeMiddleman[]; >TreeNodeMiddleman : Symbol(TreeNodeMiddleman, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 3, 1)) nodes.map(n => n.name); ->nodes.map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >nodes : Symbol(nodes, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 10, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, 1115, 92)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 11, 10)) >n.name : Symbol(name, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 5, 26)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 11, 10)) diff --git a/tests/baselines/reference/typeGuardsDefeat.symbols b/tests/baselines/reference/typeGuardsDefeat.symbols index e5b2b4b2047..388b69b5789 100644 --- a/tests/baselines/reference/typeGuardsDefeat.symbols +++ b/tests/baselines/reference/typeGuardsDefeat.symbols @@ -18,9 +18,9 @@ function foo(x: number | string) { >f : Symbol(f, Decl(typeGuardsDefeat.ts, 2, 34)) return x.length; // string ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsDefeat.ts, 2, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } else { return x++; // number @@ -35,9 +35,9 @@ function foo2(x: number | string) { >x : Symbol(x, Decl(typeGuardsDefeat.ts, 14, 14)) return x.length; // string ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsDefeat.ts, 14, 14)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } else { var f = function () { @@ -63,9 +63,9 @@ function foo3(x: number | string) { >x : Symbol(x, Decl(typeGuardsDefeat.ts, 26, 14)) return x.length; // string ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsDefeat.ts, 26, 14)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } else { var f = () => x * x; diff --git a/tests/baselines/reference/typeGuardsInClassAccessors.symbols b/tests/baselines/reference/typeGuardsInClassAccessors.symbols index 17754779ecf..d38c3040e01 100644 --- a/tests/baselines/reference/typeGuardsInClassAccessors.symbols +++ b/tests/baselines/reference/typeGuardsInClassAccessors.symbols @@ -24,9 +24,9 @@ class ClassWithAccessors { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -35,9 +35,9 @@ class ClassWithAccessors { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 15, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 15, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return strOrNum; >strOrNum : Symbol(strOrNum, Decl(typeGuardsInClassAccessors.ts, 6, 3)) @@ -51,17 +51,17 @@ class ClassWithAccessors { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameter of function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >param : Symbol(param, Decl(typeGuardsInClassAccessors.ts, 21, 11)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInClassAccessors.ts, 21, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -70,9 +70,9 @@ class ClassWithAccessors { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 29, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 29, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } // Inside private accessor getter private get pp1() { @@ -82,9 +82,9 @@ class ClassWithAccessors { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -93,9 +93,9 @@ class ClassWithAccessors { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 38, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 38, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return strOrNum; >strOrNum : Symbol(strOrNum, Decl(typeGuardsInClassAccessors.ts, 6, 3)) @@ -109,17 +109,17 @@ class ClassWithAccessors { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameter of function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >param : Symbol(param, Decl(typeGuardsInClassAccessors.ts, 44, 20)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInClassAccessors.ts, 44, 20)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -128,9 +128,9 @@ class ClassWithAccessors { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 52, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 52, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } // Inside static accessor getter static get s1() { @@ -140,9 +140,9 @@ class ClassWithAccessors { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -151,9 +151,9 @@ class ClassWithAccessors { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 61, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 61, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return strOrNum; >strOrNum : Symbol(strOrNum, Decl(typeGuardsInClassAccessors.ts, 6, 3)) @@ -167,17 +167,17 @@ class ClassWithAccessors { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameter of function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >param : Symbol(param, Decl(typeGuardsInClassAccessors.ts, 67, 18)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInClassAccessors.ts, 67, 18)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -186,9 +186,9 @@ class ClassWithAccessors { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 75, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 75, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } // Inside private static accessor getter private static get ss1() { @@ -198,9 +198,9 @@ class ClassWithAccessors { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -209,9 +209,9 @@ class ClassWithAccessors { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 84, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 84, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return strOrNum; >strOrNum : Symbol(strOrNum, Decl(typeGuardsInClassAccessors.ts, 6, 3)) @@ -225,17 +225,17 @@ class ClassWithAccessors { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassAccessors.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameter of function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >param : Symbol(param, Decl(typeGuardsInClassAccessors.ts, 90, 27)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInClassAccessors.ts, 90, 27)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -244,9 +244,9 @@ class ClassWithAccessors { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassAccessors.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 98, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassAccessors.ts, 98, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/typeGuardsInClassMethods.symbols b/tests/baselines/reference/typeGuardsInClassMethods.symbols index c0d88ff414f..30f01d3619f 100644 --- a/tests/baselines/reference/typeGuardsInClassMethods.symbols +++ b/tests/baselines/reference/typeGuardsInClassMethods.symbols @@ -19,9 +19,9 @@ class C1 { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -30,17 +30,17 @@ class C1 { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 12, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 12, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 7, 16)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 7, 16)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } // Inside function declaration private p1(param: string | number) { @@ -51,9 +51,9 @@ class C1 { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -62,17 +62,17 @@ class C1 { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 24, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 24, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 19, 15)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 19, 15)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } // Inside function declaration p2(param: string | number) { @@ -83,9 +83,9 @@ class C1 { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -94,17 +94,17 @@ class C1 { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 36, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 36, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 31, 7)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 31, 7)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } // Inside function declaration private static s1(param: string | number) { @@ -115,9 +115,9 @@ class C1 { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -126,17 +126,17 @@ class C1 { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 48, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 48, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 43, 22)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 43, 22)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } // Inside function declaration static s2(param: string | number) { @@ -147,9 +147,9 @@ class C1 { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInClassMethods.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -158,17 +158,17 @@ class C1 { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 60, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInClassMethods.ts, 60, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInClassMethods.ts, 4, 3)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 55, 14)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInClassMethods.ts, 55, 14)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/typeGuardsInConditionalExpression.symbols b/tests/baselines/reference/typeGuardsInConditionalExpression.symbols index ac35c1f18b9..7de63d90bf9 100644 --- a/tests/baselines/reference/typeGuardsInConditionalExpression.symbols +++ b/tests/baselines/reference/typeGuardsInConditionalExpression.symbols @@ -14,9 +14,9 @@ function foo(x: number | string) { >x : Symbol(x, Decl(typeGuardsInConditionalExpression.ts, 7, 13)) ? x.length // string ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInConditionalExpression.ts, 7, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) : x++; // number >x : Symbol(x, Decl(typeGuardsInConditionalExpression.ts, 7, 13)) @@ -157,9 +157,9 @@ function foo9(x: number | string) { ? ((y = x.length) && x === "hello") // string >y : Symbol(y, Decl(typeGuardsInConditionalExpression.ts, 61, 7)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInConditionalExpression.ts, 60, 14)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInConditionalExpression.ts, 60, 14)) : x === 10; // number @@ -187,9 +187,9 @@ function foo10(x: number | string | boolean) { >x : Symbol(x, Decl(typeGuardsInConditionalExpression.ts, 67, 15)) && x.toString()); // x is number ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInConditionalExpression.ts, 67, 15)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } function foo11(x: number | string | boolean) { >foo11 : Symbol(foo11, Decl(typeGuardsInConditionalExpression.ts, 75, 1)) @@ -233,11 +233,11 @@ function foo12(x: number | string | boolean) { ? (x = 10 && x.toString().length) // number | boolean | string - changed here >x : Symbol(x, Decl(typeGuardsInConditionalExpression.ts, 87, 15)) ->x.toString().length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) ->x.toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>x.toString().length : Symbol(String.length, Decl(lib.d.ts, --, --)) +>x.toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInConditionalExpression.ts, 87, 15)) ->toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) : ((b = x) // x is number | boolean | string - changed in true branch >b : Symbol(b, Decl(typeGuardsInConditionalExpression.ts, 90, 7)) diff --git a/tests/baselines/reference/typeGuardsInExternalModule.symbols b/tests/baselines/reference/typeGuardsInExternalModule.symbols index 290fe0bf80c..c9e5791f101 100644 --- a/tests/baselines/reference/typeGuardsInExternalModule.symbols +++ b/tests/baselines/reference/typeGuardsInExternalModule.symbols @@ -14,9 +14,9 @@ if (typeof var1 === "string") { num = var1.length; // string >num : Symbol(num, Decl(typeGuardsInExternalModule.ts, 4, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInExternalModule.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } else { num = var1; // number diff --git a/tests/baselines/reference/typeGuardsInFunction.symbols b/tests/baselines/reference/typeGuardsInFunction.symbols index 32a37f62a07..452e69435ff 100644 --- a/tests/baselines/reference/typeGuardsInFunction.symbols +++ b/tests/baselines/reference/typeGuardsInFunction.symbols @@ -18,9 +18,9 @@ function f(param: string | number) { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInFunction.ts, 5, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInFunction.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -29,17 +29,17 @@ function f(param: string | number) { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInFunction.ts, 12, 7)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInFunction.ts, 12, 7)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >param : Symbol(param, Decl(typeGuardsInFunction.ts, 7, 11)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInFunction.ts, 7, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } // local function declaration function f1(param: string | number) { @@ -57,25 +57,25 @@ function f1(param: string | number) { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInFunction.ts, 5, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInFunction.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables from outer function declaration num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInFunction.ts, 20, 7)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInFunction.ts, 20, 7)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in outer declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >param : Symbol(param, Decl(typeGuardsInFunction.ts, 19, 12)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInFunction.ts, 19, 12)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // local var var3: string | number; @@ -84,16 +84,16 @@ function f1(param: string | number) { num = typeof var3 === "string" && var3.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var3 : Symbol(var3, Decl(typeGuardsInFunction.ts, 32, 11)) ->var3.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var3.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var3 : Symbol(var3, Decl(typeGuardsInFunction.ts, 32, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) num = typeof param1 === "string" && param1.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >param1 : Symbol(param1, Decl(typeGuardsInFunction.ts, 21, 16)) ->param1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param1 : Symbol(param1, Decl(typeGuardsInFunction.ts, 21, 16)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } } // Function expression @@ -114,25 +114,25 @@ function f2(param: string | number) { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInFunction.ts, 5, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInFunction.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables from outer function declaration num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInFunction.ts, 40, 7)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInFunction.ts, 40, 7)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in outer declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >param : Symbol(param, Decl(typeGuardsInFunction.ts, 38, 12)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInFunction.ts, 38, 12)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // local var var3: string | number; @@ -141,16 +141,16 @@ function f2(param: string | number) { num = typeof var3 === "string" && var3.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var3 : Symbol(var3, Decl(typeGuardsInFunction.ts, 53, 11)) ->var3.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var3.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var3 : Symbol(var3, Decl(typeGuardsInFunction.ts, 53, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) num = typeof param1 === "string" && param1.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >param1 : Symbol(param1, Decl(typeGuardsInFunction.ts, 42, 22)) ->param1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param1 : Symbol(param1, Decl(typeGuardsInFunction.ts, 42, 22)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } (param); >param : Symbol(param, Decl(typeGuardsInFunction.ts, 38, 12)) @@ -173,25 +173,25 @@ function f3(param: string | number) { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInFunction.ts, 5, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInFunction.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables from outer function declaration num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInFunction.ts, 61, 7)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInFunction.ts, 61, 7)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in outer declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >param : Symbol(param, Decl(typeGuardsInFunction.ts, 59, 12)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsInFunction.ts, 59, 12)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // local var var3: string | number; @@ -200,16 +200,16 @@ function f3(param: string | number) { num = typeof var3 === "string" && var3.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >var3 : Symbol(var3, Decl(typeGuardsInFunction.ts, 74, 11)) ->var3.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var3.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var3 : Symbol(var3, Decl(typeGuardsInFunction.ts, 74, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) num = typeof param1 === "string" && param1.length; // string >num : Symbol(num, Decl(typeGuardsInFunction.ts, 4, 3)) >param1 : Symbol(param1, Decl(typeGuardsInFunction.ts, 63, 14)) ->param1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param1 : Symbol(param1, Decl(typeGuardsInFunction.ts, 63, 14)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) })(param); >param : Symbol(param, Decl(typeGuardsInFunction.ts, 59, 12)) diff --git a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.symbols b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.symbols index d1140e3af60..2f3232b0225 100644 --- a/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.symbols +++ b/tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.symbols @@ -22,14 +22,14 @@ function foo(x: number | string | boolean) { >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 2, 13)) ? x.toString() // boolean ->x.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 2, 13)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) : x.toString(); // number ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 2, 13)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } (); } @@ -55,14 +55,14 @@ function foo2(x: number | string | boolean) { >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 12, 14)) ? x.toString() // boolean ->x.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 12, 14)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) : x.toString(); // number ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 12, 14)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } (x); // x here is narrowed to number | boolean >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 12, 14)) @@ -86,14 +86,14 @@ function foo3(x: number | string | boolean) { >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 22, 14)) ? x.toString() // boolean ->x.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 22, 14)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) : x.toString(); // number ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 22, 14)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) })(); } @@ -118,14 +118,14 @@ function foo4(x: number | string | boolean) { >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 32, 14)) ? x.toString() // boolean ->x.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 32, 14)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) : x.toString(); // number ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 32, 14)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) })(x); // x here is narrowed to number | boolean >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 32, 14)) @@ -180,14 +180,14 @@ module m { >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 52, 7)) ? x.toString() // boolean ->x.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 52, 7)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) : x.toString(); // number ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 52, 7)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } } } @@ -221,14 +221,14 @@ module m1 { >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 66, 7)) ? x.toString() // boolean ->x.toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 66, 7)) ->toString : Symbol(Object.toString, Decl(lib.d.ts, 96, 26)) +>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --)) : x.toString(); // number ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 66, 7)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) } } } diff --git a/tests/baselines/reference/typeGuardsInGlobal.symbols b/tests/baselines/reference/typeGuardsInGlobal.symbols index 0ae6e75ce17..e052a068651 100644 --- a/tests/baselines/reference/typeGuardsInGlobal.symbols +++ b/tests/baselines/reference/typeGuardsInGlobal.symbols @@ -14,9 +14,9 @@ if (typeof var1 === "string") { num = var1.length; // string >num : Symbol(num, Decl(typeGuardsInGlobal.ts, 4, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInGlobal.ts, 5, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } else { num = var1; // number diff --git a/tests/baselines/reference/typeGuardsInIfStatement.symbols b/tests/baselines/reference/typeGuardsInIfStatement.symbols index 798fe18cf5a..54a65f0693b 100644 --- a/tests/baselines/reference/typeGuardsInIfStatement.symbols +++ b/tests/baselines/reference/typeGuardsInIfStatement.symbols @@ -13,9 +13,9 @@ function foo(x: number | string) { >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 6, 13)) return x.length; // string ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 6, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } else { return x++; // number @@ -181,9 +181,9 @@ function foo9(x: number | string) { // usage of x or assignment to separate variable shouldn't cause narrowing of type to stop y = x.length; >y : Symbol(y, Decl(typeGuardsInIfStatement.ts, 91, 7)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 90, 14)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return x === "hello"; // string >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 90, 14)) @@ -249,9 +249,9 @@ function foo11(x: number | string | boolean) { // change value of x x = 10 && x.toString() // number | boolean | string >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 114, 15)) ->x.toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 114, 15)) ->toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ) : ( @@ -259,9 +259,9 @@ function foo11(x: number | string | boolean) { y = x && x.toString() // number | boolean | string >y : Symbol(y, Decl(typeGuardsInIfStatement.ts, 121, 11)) >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 114, 15)) ->x.toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 114, 15)) ->toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ); } @@ -276,9 +276,9 @@ function foo12(x: number | string | boolean) { >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 134, 15)) return x.toString(); // string | number | boolean - x changed in else branch ->x.toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 134, 15)) ->toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } else { x = 10; @@ -292,13 +292,13 @@ function foo12(x: number | string | boolean) { >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 134, 15)) ? x.toString() // number ->x.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 134, 15)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) : x.toString(); // boolean | string ->x.toString : Symbol(toString, Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 134, 15)) ->toString : Symbol(toString, Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } } diff --git a/tests/baselines/reference/typeGuardsInModule.symbols b/tests/baselines/reference/typeGuardsInModule.symbols index 581bb26d805..9c501e9c22f 100644 --- a/tests/baselines/reference/typeGuardsInModule.symbols +++ b/tests/baselines/reference/typeGuardsInModule.symbols @@ -20,9 +20,9 @@ module m1 { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInModule.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInModule.ts, 6, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInModule.ts, 6, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in module declaration var var2: string | number; @@ -33,9 +33,9 @@ module m1 { num = var2.length; // string >num : Symbol(num, Decl(typeGuardsInModule.ts, 4, 3)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInModule.ts, 13, 7)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } else { num = var2; // number @@ -77,17 +77,17 @@ module m2 { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInModule.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInModule.ts, 6, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInModule.ts, 6, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // local variables from outer module declaration num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsInModule.ts, 4, 3)) >var2 : Symbol(var2, Decl(typeGuardsInModule.ts, 32, 7)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInModule.ts, 32, 7)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // exported variable from outer the module strOrNum = typeof var3 === "string" && var3; // string | number @@ -104,9 +104,9 @@ module m2 { num = var4.length; // string >num : Symbol(num, Decl(typeGuardsInModule.ts, 4, 3)) ->var4.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var4.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var4 : Symbol(var4, Decl(typeGuardsInModule.ts, 45, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } else { num = var4; // number @@ -141,9 +141,9 @@ module m3.m4 { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsInModule.ts, 4, 3)) >var1 : Symbol(var1, Decl(typeGuardsInModule.ts, 6, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsInModule.ts, 6, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in module declaration var var2: string | number; @@ -154,9 +154,9 @@ module m3.m4 { num = var2.length; // string >num : Symbol(num, Decl(typeGuardsInModule.ts, 4, 3)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsInModule.ts, 69, 7)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } else { num = var2; // number diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.symbols b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.symbols index 59f51d21e71..21e3dd3701f 100644 --- a/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.symbols +++ b/tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.symbols @@ -8,9 +8,9 @@ function foo(x: number | string) { return typeof x === "string" && x.length === 10; // string >x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 3, 13)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 3, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } function foo2(x: number | string) { >foo2 : Symbol(foo2, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 5, 1)) @@ -106,17 +106,17 @@ function foo7(x: number | string | boolean) { // change value of x ? (x = 10 && x.toString()) // number | boolean | string >x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 33, 14)) ->x.toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 33, 14)) ->toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) // do not change value : (y = x && x.toString()))); // number | boolean | string >y : Symbol(y, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 34, 7)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 33, 14)) ->x.toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 33, 14)) ->toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } function foo8(x: number | string) { >foo8 : Symbol(foo8, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 45, 1)) @@ -137,7 +137,7 @@ function foo8(x: number | string) { >x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 46, 14)) : x.length); // string ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 46, 14)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.symbols b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.symbols index d33f0b6877b..de9b4396d3d 100644 --- a/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.symbols +++ b/tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.symbols @@ -8,9 +8,9 @@ function foo(x: number | string) { return typeof x !== "string" || x.length === 10; // string >x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 3, 13)) ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 3, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } function foo2(x: number | string) { >foo2 : Symbol(foo2, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 5, 1)) @@ -106,17 +106,17 @@ function foo7(x: number | string | boolean) { // change value of x ? (x = 10 && x.toString()) // number | boolean | string >x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 33, 14)) ->x.toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 33, 14)) ->toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) // do not change value : (y = x && x.toString()))); // number | boolean | string >y : Symbol(y, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 34, 7)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 33, 14)) ->x.toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>x.toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 33, 14)) ->toString : Symbol(toString, Decl(lib.d.ts, 458, 18), Decl(lib.d.ts, 277, 18), Decl(lib.d.ts, 96, 26)) +>toString : Symbol(toString, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } function foo8(x: number | string) { >foo8 : Symbol(foo8, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 45, 1)) @@ -137,7 +137,7 @@ function foo8(x: number | string) { >x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 46, 14)) : x.length); // string ->x.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 46, 14)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/typeGuardsObjectMethods.symbols b/tests/baselines/reference/typeGuardsObjectMethods.symbols index 3f585c1e4c6..2afbb3a8467 100644 --- a/tests/baselines/reference/typeGuardsObjectMethods.symbols +++ b/tests/baselines/reference/typeGuardsObjectMethods.symbols @@ -25,9 +25,9 @@ var obj1 = { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsObjectMethods.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsObjectMethods.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsObjectMethods.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -36,17 +36,17 @@ var obj1 = { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsObjectMethods.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsObjectMethods.ts, 15, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsObjectMethods.ts, 15, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsObjectMethods.ts, 5, 3)) >param : Symbol(param, Decl(typeGuardsObjectMethods.ts, 10, 11)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsObjectMethods.ts, 10, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return strOrNum; >strOrNum : Symbol(strOrNum, Decl(typeGuardsObjectMethods.ts, 6, 3)) @@ -59,9 +59,9 @@ var obj1 = { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsObjectMethods.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsObjectMethods.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsObjectMethods.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -70,9 +70,9 @@ var obj1 = { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsObjectMethods.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsObjectMethods.ts, 28, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsObjectMethods.ts, 28, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) return strOrNum; >strOrNum : Symbol(strOrNum, Decl(typeGuardsObjectMethods.ts, 6, 3)) @@ -86,9 +86,9 @@ var obj1 = { num = typeof var1 === "string" && var1.length; // string >num : Symbol(num, Decl(typeGuardsObjectMethods.ts, 5, 3)) >var1 : Symbol(var1, Decl(typeGuardsObjectMethods.ts, 7, 3)) ->var1.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var1.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var1 : Symbol(var1, Decl(typeGuardsObjectMethods.ts, 7, 3)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // variables in function declaration var var2: string | number; @@ -97,17 +97,17 @@ var obj1 = { num = typeof var2 === "string" && var2.length; // string >num : Symbol(num, Decl(typeGuardsObjectMethods.ts, 5, 3)) >var2 : Symbol(var2, Decl(typeGuardsObjectMethods.ts, 38, 11)) ->var2.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>var2.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >var2 : Symbol(var2, Decl(typeGuardsObjectMethods.ts, 38, 11)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) // parameters in function declaration num = typeof param === "string" && param.length; // string >num : Symbol(num, Decl(typeGuardsObjectMethods.ts, 5, 3)) >param : Symbol(param, Decl(typeGuardsObjectMethods.ts, 33, 13)) ->param.length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>param.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >param : Symbol(param, Decl(typeGuardsObjectMethods.ts, 33, 13)) ->length : Symbol(String.length, Decl(lib.d.ts, 414, 19)) +>length : Symbol(String.length, Decl(lib.d.ts, --, --)) } }; // return expression of the method diff --git a/tests/baselines/reference/typeGuardsWithInstanceOf.symbols b/tests/baselines/reference/typeGuardsWithInstanceOf.symbols index b010ef12692..81efb5d5b1d 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOf.symbols +++ b/tests/baselines/reference/typeGuardsWithInstanceOf.symbols @@ -13,7 +13,7 @@ var result2: I; if (!(result instanceof RegExp)) { >result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) result = result2; >result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3)) diff --git a/tests/baselines/reference/typeInferenceWithTupleType.symbols b/tests/baselines/reference/typeInferenceWithTupleType.symbols index a78cd0d490b..6f3279db8c2 100644 --- a/tests/baselines/reference/typeInferenceWithTupleType.symbols +++ b/tests/baselines/reference/typeInferenceWithTupleType.symbols @@ -41,12 +41,12 @@ function zip(array1: T[], array2: U[]): [[T, U]] { >U : Symbol(U, Decl(typeInferenceWithTupleType.ts, 8, 15)) if (array1.length != array2.length) { ->array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(typeInferenceWithTupleType.ts, 8, 19)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) ->array2.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) +>array2.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array2 : Symbol(array2, Decl(typeInferenceWithTupleType.ts, 8, 31)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) return [[undefined, undefined]]; >undefined : Symbol(undefined) @@ -54,9 +54,9 @@ function zip(array1: T[], array2: U[]): [[T, U]] { } var length = array1.length; >length : Symbol(length, Decl(typeInferenceWithTupleType.ts, 12, 7)) ->array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(typeInferenceWithTupleType.ts, 8, 19)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) var zipResult: [[T, U]]; >zipResult : Symbol(zipResult, Decl(typeInferenceWithTupleType.ts, 13, 7)) @@ -70,9 +70,9 @@ function zip(array1: T[], array2: U[]): [[T, U]] { >i : Symbol(i, Decl(typeInferenceWithTupleType.ts, 14, 12)) zipResult.push([array1[i], array2[i]]); ->zipResult.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>zipResult.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >zipResult : Symbol(zipResult, Decl(typeInferenceWithTupleType.ts, 13, 7)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(typeInferenceWithTupleType.ts, 8, 19)) >i : Symbol(i, Decl(typeInferenceWithTupleType.ts, 14, 12)) >array2 : Symbol(array2, Decl(typeInferenceWithTupleType.ts, 8, 31)) diff --git a/tests/baselines/reference/typeOfThisInMemberFunctions.symbols b/tests/baselines/reference/typeOfThisInMemberFunctions.symbols index 31b04a52f86..c0a860af4f7 100644 --- a/tests/baselines/reference/typeOfThisInMemberFunctions.symbols +++ b/tests/baselines/reference/typeOfThisInMemberFunctions.symbols @@ -47,7 +47,7 @@ class D { class E { >E : Symbol(E, Decl(typeOfThisInMemberFunctions.ts, 19, 1)) >T : Symbol(T, Decl(typeOfThisInMemberFunctions.ts, 21, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) x: T; >x : Symbol(x, Decl(typeOfThisInMemberFunctions.ts, 21, 25)) diff --git a/tests/baselines/reference/typeParameterAndArgumentOfSameName1.symbols b/tests/baselines/reference/typeParameterAndArgumentOfSameName1.symbols index 450b291708f..e38953fe8a2 100644 --- a/tests/baselines/reference/typeParameterAndArgumentOfSameName1.symbols +++ b/tests/baselines/reference/typeParameterAndArgumentOfSameName1.symbols @@ -2,16 +2,16 @@ function f(A: A): A { >f : Symbol(f, Decl(typeParameterAndArgumentOfSameName1.ts, 0, 0)) >A : Symbol(A, Decl(typeParameterAndArgumentOfSameName1.ts, 0, 11), Decl(typeParameterAndArgumentOfSameName1.ts, 0, 29)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >A : Symbol(A, Decl(typeParameterAndArgumentOfSameName1.ts, 0, 11), Decl(typeParameterAndArgumentOfSameName1.ts, 0, 29)) >A : Symbol(A, Decl(typeParameterAndArgumentOfSameName1.ts, 0, 11), Decl(typeParameterAndArgumentOfSameName1.ts, 0, 29)) >A : Symbol(A, Decl(typeParameterAndArgumentOfSameName1.ts, 0, 11), Decl(typeParameterAndArgumentOfSameName1.ts, 0, 29)) var r = A.toExponential(123); >r : Symbol(r, Decl(typeParameterAndArgumentOfSameName1.ts, 1, 7)) ->A.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>A.toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) >A : Symbol(A, Decl(typeParameterAndArgumentOfSameName1.ts, 0, 11), Decl(typeParameterAndArgumentOfSameName1.ts, 0, 29)) ->toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, 469, 45)) +>toExponential : Symbol(Number.toExponential, Decl(lib.d.ts, --, --)) return null; } diff --git a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.symbols b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.symbols index c9b06d0d68f..e50bce9e043 100644 --- a/tests/baselines/reference/typeParametersAreIdenticalToThemselves.symbols +++ b/tests/baselines/reference/typeParametersAreIdenticalToThemselves.symbols @@ -144,21 +144,21 @@ class C { foo4(x: T); >foo4 : Symbol(foo4, Decl(typeParametersAreIdenticalToThemselves.ts, 31, 21), Decl(typeParametersAreIdenticalToThemselves.ts, 33, 31), Decl(typeParametersAreIdenticalToThemselves.ts, 34, 31)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 33, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeParametersAreIdenticalToThemselves.ts, 33, 25)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 33, 9)) foo4(x: T); // no error, different declaration for each T >foo4 : Symbol(foo4, Decl(typeParametersAreIdenticalToThemselves.ts, 31, 21), Decl(typeParametersAreIdenticalToThemselves.ts, 33, 31), Decl(typeParametersAreIdenticalToThemselves.ts, 34, 31)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 34, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeParametersAreIdenticalToThemselves.ts, 34, 25)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 34, 9)) foo4(x: T) { } >foo4 : Symbol(foo4, Decl(typeParametersAreIdenticalToThemselves.ts, 31, 21), Decl(typeParametersAreIdenticalToThemselves.ts, 33, 31), Decl(typeParametersAreIdenticalToThemselves.ts, 34, 31)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 35, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeParametersAreIdenticalToThemselves.ts, 35, 25)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 35, 9)) } @@ -166,7 +166,7 @@ class C { class C2 { >C2 : Symbol(C2, Decl(typeParametersAreIdenticalToThemselves.ts, 36, 1)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 38, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo1(x: T); >foo1 : Symbol(foo1, Decl(typeParametersAreIdenticalToThemselves.ts, 38, 26), Decl(typeParametersAreIdenticalToThemselves.ts, 39, 15), Decl(typeParametersAreIdenticalToThemselves.ts, 40, 15)) @@ -271,14 +271,14 @@ interface I { foo4(x: T); >foo4 : Symbol(foo4, Decl(typeParametersAreIdenticalToThemselves.ts, 60, 18), Decl(typeParametersAreIdenticalToThemselves.ts, 62, 31)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 62, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeParametersAreIdenticalToThemselves.ts, 62, 25)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 62, 9)) foo4(x: T); // no error, different declaration for each T >foo4 : Symbol(foo4, Decl(typeParametersAreIdenticalToThemselves.ts, 60, 18), Decl(typeParametersAreIdenticalToThemselves.ts, 62, 31)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 63, 9)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(typeParametersAreIdenticalToThemselves.ts, 63, 25)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 63, 9)) } @@ -286,7 +286,7 @@ interface I { interface I2 { >I2 : Symbol(I2, Decl(typeParametersAreIdenticalToThemselves.ts, 64, 1)) >T : Symbol(T, Decl(typeParametersAreIdenticalToThemselves.ts, 66, 13)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo1(x: T); >foo1 : Symbol(foo1, Decl(typeParametersAreIdenticalToThemselves.ts, 66, 30), Decl(typeParametersAreIdenticalToThemselves.ts, 67, 15)) diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index 41fbab91e3c..cf5e68b956a 100644 --- a/tests/baselines/reference/typedArrays.symbols +++ b/tests/baselines/reference/typedArrays.symbols @@ -8,39 +8,39 @@ function CreateTypedArrayTypes() { typedArrays[0] = Int8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 1379, 42), Decl(lib.d.ts, 1652, 11), Decl(lib.d.ts, 4731, 1)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) typedArrays[1] = Uint8Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 1652, 44), Decl(lib.d.ts, 1926, 11), Decl(lib.d.ts, 4763, 1)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) typedArrays[2] = Int16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2199, 60), Decl(lib.d.ts, 2473, 11), Decl(lib.d.ts, 4831, 1)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) typedArrays[3] = Uint16Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 2473, 46), Decl(lib.d.ts, 2747, 11), Decl(lib.d.ts, 4867, 1)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) typedArrays[4] = Int32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 2747, 48), Decl(lib.d.ts, 3019, 11), Decl(lib.d.ts, 4899, 1)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) typedArrays[5] = Uint32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3019, 46), Decl(lib.d.ts, 3292, 11), Decl(lib.d.ts, 4931, 1)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) typedArrays[6] = Float32Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 3292, 48), Decl(lib.d.ts, 3566, 11), Decl(lib.d.ts, 4963, 1)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) typedArrays[7] = Float64Array; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 3566, 50), Decl(lib.d.ts, 3839, 11), Decl(lib.d.ts, 4995, 1)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) typedArrays[8] = Uint8ClampedArray; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 1926, 46), Decl(lib.d.ts, 2199, 11), Decl(lib.d.ts, 4795, 1)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) return typedArrays; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 2, 7)) @@ -55,47 +55,47 @@ function CreateTypedArrayInstancesFromLength(obj: number) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 1379, 42), Decl(lib.d.ts, 1652, 11), Decl(lib.d.ts, 4731, 1)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 1652, 44), Decl(lib.d.ts, 1926, 11), Decl(lib.d.ts, 4763, 1)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2199, 60), Decl(lib.d.ts, 2473, 11), Decl(lib.d.ts, 4831, 1)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 2473, 46), Decl(lib.d.ts, 2747, 11), Decl(lib.d.ts, 4867, 1)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 2747, 48), Decl(lib.d.ts, 3019, 11), Decl(lib.d.ts, 4899, 1)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3019, 46), Decl(lib.d.ts, 3292, 11), Decl(lib.d.ts, 4931, 1)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 3292, 48), Decl(lib.d.ts, 3566, 11), Decl(lib.d.ts, 4963, 1)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 3566, 50), Decl(lib.d.ts, 3839, 11), Decl(lib.d.ts, 4995, 1)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 17, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 1926, 46), Decl(lib.d.ts, 2199, 11), Decl(lib.d.ts, 4795, 1)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 16, 45)) return typedArrays; @@ -111,47 +111,47 @@ function CreateTypedArrayInstancesFromArray(obj: number[]) { typedArrays[0] = new Int8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 1379, 42), Decl(lib.d.ts, 1652, 11), Decl(lib.d.ts, 4731, 1)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[1] = new Uint8Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 1652, 44), Decl(lib.d.ts, 1926, 11), Decl(lib.d.ts, 4763, 1)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[2] = new Int16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2199, 60), Decl(lib.d.ts, 2473, 11), Decl(lib.d.ts, 4831, 1)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[3] = new Uint16Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 2473, 46), Decl(lib.d.ts, 2747, 11), Decl(lib.d.ts, 4867, 1)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[4] = new Int32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 2747, 48), Decl(lib.d.ts, 3019, 11), Decl(lib.d.ts, 4899, 1)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[5] = new Uint32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3019, 46), Decl(lib.d.ts, 3292, 11), Decl(lib.d.ts, 4931, 1)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[6] = new Float32Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 3292, 48), Decl(lib.d.ts, 3566, 11), Decl(lib.d.ts, 4963, 1)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[7] = new Float64Array(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 3566, 50), Decl(lib.d.ts, 3839, 11), Decl(lib.d.ts, 4995, 1)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) typedArrays[8] = new Uint8ClampedArray(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 32, 7)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 1926, 46), Decl(lib.d.ts, 2199, 11), Decl(lib.d.ts, 4795, 1)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 31, 44)) return typedArrays; @@ -167,65 +167,65 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 1641, 38), Decl(lib.d.ts, 4754, 48)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 1379, 42), Decl(lib.d.ts, 1652, 11), Decl(lib.d.ts, 4731, 1)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 1641, 38), Decl(lib.d.ts, 4754, 48)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 1915, 39), Decl(lib.d.ts, 4786, 49)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 1652, 44), Decl(lib.d.ts, 1926, 11), Decl(lib.d.ts, 4763, 1)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 1915, 39), Decl(lib.d.ts, 4786, 49)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 2462, 39), Decl(lib.d.ts, 4858, 49)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2199, 60), Decl(lib.d.ts, 2473, 11), Decl(lib.d.ts, 4831, 1)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 2462, 39), Decl(lib.d.ts, 4858, 49)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 2736, 40), Decl(lib.d.ts, 4890, 50)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 2473, 46), Decl(lib.d.ts, 2747, 11), Decl(lib.d.ts, 4867, 1)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 2736, 40), Decl(lib.d.ts, 4890, 50)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3009, 39), Decl(lib.d.ts, 4922, 49)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 2747, 48), Decl(lib.d.ts, 3019, 11), Decl(lib.d.ts, 4899, 1)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3009, 39), Decl(lib.d.ts, 4922, 49)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 3282, 40), Decl(lib.d.ts, 4954, 50)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3019, 46), Decl(lib.d.ts, 3292, 11), Decl(lib.d.ts, 4931, 1)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 3282, 40), Decl(lib.d.ts, 4954, 50)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 3555, 41), Decl(lib.d.ts, 4986, 51)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 3292, 48), Decl(lib.d.ts, 3566, 11), Decl(lib.d.ts, 4963, 1)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 3555, 41), Decl(lib.d.ts, 4986, 51)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 3829, 41), Decl(lib.d.ts, 5018, 51)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 3566, 50), Decl(lib.d.ts, 3839, 11), Decl(lib.d.ts, 4995, 1)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 3829, 41), Decl(lib.d.ts, 5018, 51)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2189, 46), Decl(lib.d.ts, 4821, 56)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 1926, 46), Decl(lib.d.ts, 2199, 11), Decl(lib.d.ts, 4795, 1)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2189, 46), Decl(lib.d.ts, 4821, 56)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) return typedArrays; @@ -235,72 +235,72 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >CreateIntegerTypedArraysFromArrayLike : Symbol(CreateIntegerTypedArraysFromArrayLike, Decl(typedArrays.ts, 59, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1198, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, --, --)) var typedArrays = []; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 1641, 38), Decl(lib.d.ts, 4754, 48)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 1379, 42), Decl(lib.d.ts, 1652, 11), Decl(lib.d.ts, 4731, 1)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 1641, 38), Decl(lib.d.ts, 4754, 48)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 1915, 39), Decl(lib.d.ts, 4786, 49)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 1652, 44), Decl(lib.d.ts, 1926, 11), Decl(lib.d.ts, 4763, 1)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 1915, 39), Decl(lib.d.ts, 4786, 49)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 2462, 39), Decl(lib.d.ts, 4858, 49)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2199, 60), Decl(lib.d.ts, 2473, 11), Decl(lib.d.ts, 4831, 1)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 2462, 39), Decl(lib.d.ts, 4858, 49)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 2736, 40), Decl(lib.d.ts, 4890, 50)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 2473, 46), Decl(lib.d.ts, 2747, 11), Decl(lib.d.ts, 4867, 1)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 2736, 40), Decl(lib.d.ts, 4890, 50)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3009, 39), Decl(lib.d.ts, 4922, 49)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 2747, 48), Decl(lib.d.ts, 3019, 11), Decl(lib.d.ts, 4899, 1)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3009, 39), Decl(lib.d.ts, 4922, 49)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 3282, 40), Decl(lib.d.ts, 4954, 50)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3019, 46), Decl(lib.d.ts, 3292, 11), Decl(lib.d.ts, 4931, 1)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 3282, 40), Decl(lib.d.ts, 4954, 50)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 3555, 41), Decl(lib.d.ts, 4986, 51)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 3292, 48), Decl(lib.d.ts, 3566, 11), Decl(lib.d.ts, 4963, 1)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 3555, 41), Decl(lib.d.ts, 4986, 51)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 3829, 41), Decl(lib.d.ts, 5018, 51)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 3566, 50), Decl(lib.d.ts, 3839, 11), Decl(lib.d.ts, 4995, 1)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 3829, 41), Decl(lib.d.ts, 5018, 51)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2189, 46), Decl(lib.d.ts, 4821, 56)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 1926, 46), Decl(lib.d.ts, 2199, 11), Decl(lib.d.ts, 4795, 1)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2189, 46), Decl(lib.d.ts, 4821, 56)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) return typedArrays; @@ -332,57 +332,57 @@ function CreateTypedArraysOf2() { typedArrays[0] = Int8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 1635, 30)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 1379, 42), Decl(lib.d.ts, 1652, 11), Decl(lib.d.ts, 4731, 1)) ->of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, 1635, 30)) +>Int8Array.of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>of : Symbol(Int8ArrayConstructor.of, Decl(lib.d.ts, --, --)) typedArrays[1] = Uint8Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 1909, 30)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 1652, 44), Decl(lib.d.ts, 1926, 11), Decl(lib.d.ts, 4763, 1)) ->of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, 1909, 30)) +>Uint8Array.of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>of : Symbol(Uint8ArrayConstructor.of, Decl(lib.d.ts, --, --)) typedArrays[2] = Int16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 2456, 30)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2199, 60), Decl(lib.d.ts, 2473, 11), Decl(lib.d.ts, 4831, 1)) ->of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, 2456, 30)) +>Int16Array.of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>of : Symbol(Int16ArrayConstructor.of, Decl(lib.d.ts, --, --)) typedArrays[3] = Uint16Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 2730, 30)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 2473, 46), Decl(lib.d.ts, 2747, 11), Decl(lib.d.ts, 4867, 1)) ->of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, 2730, 30)) +>Uint16Array.of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>of : Symbol(Uint16ArrayConstructor.of, Decl(lib.d.ts, --, --)) typedArrays[4] = Int32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3003, 30)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 2747, 48), Decl(lib.d.ts, 3019, 11), Decl(lib.d.ts, 4899, 1)) ->of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, 3003, 30)) +>Int32Array.of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>of : Symbol(Int32ArrayConstructor.of, Decl(lib.d.ts, --, --)) typedArrays[5] = Uint32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 3276, 30)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3019, 46), Decl(lib.d.ts, 3292, 11), Decl(lib.d.ts, 4931, 1)) ->of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, 3276, 30)) +>Uint32Array.of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>of : Symbol(Uint32ArrayConstructor.of, Decl(lib.d.ts, --, --)) typedArrays[6] = Float32Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 3549, 30)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 3292, 48), Decl(lib.d.ts, 3566, 11), Decl(lib.d.ts, 4963, 1)) ->of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, 3549, 30)) +>Float32Array.of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>of : Symbol(Float32ArrayConstructor.of, Decl(lib.d.ts, --, --)) typedArrays[7] = Float64Array.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 3823, 30)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 3566, 50), Decl(lib.d.ts, 3839, 11), Decl(lib.d.ts, 4995, 1)) ->of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, 3823, 30)) +>Float64Array.of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>of : Symbol(Float64ArrayConstructor.of, Decl(lib.d.ts, --, --)) typedArrays[8] = Uint8ClampedArray.of(1,2,3,4); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) ->Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2183, 30)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 1926, 46), Decl(lib.d.ts, 2199, 11), Decl(lib.d.ts, 4795, 1)) ->of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, 2183, 30)) +>Uint8ClampedArray.of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>of : Symbol(Uint8ClampedArrayConstructor.of, Decl(lib.d.ts, --, --)) return typedArrays; >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 94, 7)) @@ -391,7 +391,7 @@ function CreateTypedArraysOf2() { function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:number)=> number) { >CreateTypedArraysFromMapFn : Symbol(CreateTypedArraysFromMapFn, Decl(typedArrays.ts, 106, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1198, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, --, --)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) >n : Symbol(n, Decl(typedArrays.ts, 108, 67)) >v : Symbol(v, Decl(typedArrays.ts, 108, 76)) @@ -401,73 +401,73 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[0] = Int8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 1641, 38), Decl(lib.d.ts, 4754, 48)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 1379, 42), Decl(lib.d.ts, 1652, 11), Decl(lib.d.ts, 4731, 1)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 1641, 38), Decl(lib.d.ts, 4754, 48)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[1] = Uint8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 1915, 39), Decl(lib.d.ts, 4786, 49)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 1652, 44), Decl(lib.d.ts, 1926, 11), Decl(lib.d.ts, 4763, 1)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 1915, 39), Decl(lib.d.ts, 4786, 49)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[2] = Int16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 2462, 39), Decl(lib.d.ts, 4858, 49)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2199, 60), Decl(lib.d.ts, 2473, 11), Decl(lib.d.ts, 4831, 1)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 2462, 39), Decl(lib.d.ts, 4858, 49)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[3] = Uint16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 2736, 40), Decl(lib.d.ts, 4890, 50)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 2473, 46), Decl(lib.d.ts, 2747, 11), Decl(lib.d.ts, 4867, 1)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 2736, 40), Decl(lib.d.ts, 4890, 50)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[4] = Int32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3009, 39), Decl(lib.d.ts, 4922, 49)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 2747, 48), Decl(lib.d.ts, 3019, 11), Decl(lib.d.ts, 4899, 1)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3009, 39), Decl(lib.d.ts, 4922, 49)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[5] = Uint32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 3282, 40), Decl(lib.d.ts, 4954, 50)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3019, 46), Decl(lib.d.ts, 3292, 11), Decl(lib.d.ts, 4931, 1)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 3282, 40), Decl(lib.d.ts, 4954, 50)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[6] = Float32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 3555, 41), Decl(lib.d.ts, 4986, 51)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 3292, 48), Decl(lib.d.ts, 3566, 11), Decl(lib.d.ts, 4963, 1)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 3555, 41), Decl(lib.d.ts, 4986, 51)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[7] = Float64Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 3829, 41), Decl(lib.d.ts, 5018, 51)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 3566, 50), Decl(lib.d.ts, 3839, 11), Decl(lib.d.ts, 4995, 1)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 3829, 41), Decl(lib.d.ts, 5018, 51)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 109, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2189, 46), Decl(lib.d.ts, 4821, 56)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 1926, 46), Decl(lib.d.ts, 2199, 11), Decl(lib.d.ts, 4795, 1)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2189, 46), Decl(lib.d.ts, 4821, 56)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 108, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 108, 58)) @@ -478,7 +478,7 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v:number)=> number, thisArg: {}) { >CreateTypedArraysFromThisObj : Symbol(CreateTypedArraysFromThisObj, Decl(typedArrays.ts, 121, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) ->ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, 1198, 1)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.d.ts, --, --)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >n : Symbol(n, Decl(typedArrays.ts, 123, 69)) >v : Symbol(v, Decl(typedArrays.ts, 123, 78)) @@ -489,81 +489,81 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 1641, 38), Decl(lib.d.ts, 4754, 48)) ->Int8Array : Symbol(Int8Array, Decl(lib.d.ts, 1379, 42), Decl(lib.d.ts, 1652, 11), Decl(lib.d.ts, 4731, 1)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, 1641, 38), Decl(lib.d.ts, 4754, 48)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int8Array : Symbol(Int8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 1915, 39), Decl(lib.d.ts, 4786, 49)) ->Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, 1652, 44), Decl(lib.d.ts, 1926, 11), Decl(lib.d.ts, 4763, 1)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, 1915, 39), Decl(lib.d.ts, 4786, 49)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 2462, 39), Decl(lib.d.ts, 4858, 49)) ->Int16Array : Symbol(Int16Array, Decl(lib.d.ts, 2199, 60), Decl(lib.d.ts, 2473, 11), Decl(lib.d.ts, 4831, 1)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, 2462, 39), Decl(lib.d.ts, 4858, 49)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int16Array : Symbol(Int16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 2736, 40), Decl(lib.d.ts, 4890, 50)) ->Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, 2473, 46), Decl(lib.d.ts, 2747, 11), Decl(lib.d.ts, 4867, 1)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, 2736, 40), Decl(lib.d.ts, 4890, 50)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3009, 39), Decl(lib.d.ts, 4922, 49)) ->Int32Array : Symbol(Int32Array, Decl(lib.d.ts, 2747, 48), Decl(lib.d.ts, 3019, 11), Decl(lib.d.ts, 4899, 1)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, 3009, 39), Decl(lib.d.ts, 4922, 49)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 3282, 40), Decl(lib.d.ts, 4954, 50)) ->Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, 3019, 46), Decl(lib.d.ts, 3292, 11), Decl(lib.d.ts, 4931, 1)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, 3282, 40), Decl(lib.d.ts, 4954, 50)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 3555, 41), Decl(lib.d.ts, 4986, 51)) ->Float32Array : Symbol(Float32Array, Decl(lib.d.ts, 3292, 48), Decl(lib.d.ts, 3566, 11), Decl(lib.d.ts, 4963, 1)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, 3555, 41), Decl(lib.d.ts, 4986, 51)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Float32Array : Symbol(Float32Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 3829, 41), Decl(lib.d.ts, 5018, 51)) ->Float64Array : Symbol(Float64Array, Decl(lib.d.ts, 3566, 50), Decl(lib.d.ts, 3839, 11), Decl(lib.d.ts, 4995, 1)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, 3829, 41), Decl(lib.d.ts, 5018, 51)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Float64Array : Symbol(Float64Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 124, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2189, 46), Decl(lib.d.ts, 4821, 56)) ->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, 1926, 46), Decl(lib.d.ts, 2199, 11), Decl(lib.d.ts, 4795, 1)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, 2189, 46), Decl(lib.d.ts, 4821, 56)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 123, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 123, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 123, 98)) diff --git a/tests/baselines/reference/typeofOperatorWithStringType.symbols b/tests/baselines/reference/typeofOperatorWithStringType.symbols index 6da22469f83..090e0958e60 100644 --- a/tests/baselines/reference/typeofOperatorWithStringType.symbols +++ b/tests/baselines/reference/typeofOperatorWithStringType.symbols @@ -88,9 +88,9 @@ var ResultIsString11 = typeof (STRING + STRING); var ResultIsString12 = typeof STRING.charAt(0); >ResultIsString12 : Symbol(ResultIsString12, Decl(typeofOperatorWithStringType.ts, 32, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(typeofOperatorWithStringType.ts, 1, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) // multiple typeof operators var ResultIsString13 = typeof typeof STRING; diff --git a/tests/baselines/reference/undefinedAssignableToEveryType.symbols b/tests/baselines/reference/undefinedAssignableToEveryType.symbols index da2b3ff7c83..f511231515e 100644 --- a/tests/baselines/reference/undefinedAssignableToEveryType.symbols +++ b/tests/baselines/reference/undefinedAssignableToEveryType.symbols @@ -41,7 +41,7 @@ var d: boolean = undefined; var e: Date = undefined; >e : Symbol(e, Decl(undefinedAssignableToEveryType.ts, 15, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >undefined : Symbol(undefined) var f: any = undefined; @@ -54,7 +54,7 @@ var g: void = undefined; var h: Object = undefined; >h : Symbol(h, Decl(undefinedAssignableToEveryType.ts, 18, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >undefined : Symbol(undefined) var i: {} = undefined; @@ -67,7 +67,7 @@ var j: () => {} = undefined; var k: Function = undefined; >k : Symbol(k, Decl(undefinedAssignableToEveryType.ts, 21, 3)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >undefined : Symbol(undefined) var l: (x: number) => string = undefined; @@ -106,12 +106,12 @@ var o: (x: T) => T = undefined; var p: Number = undefined; >p : Symbol(p, Decl(undefinedAssignableToEveryType.ts, 29, 3)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >undefined : Symbol(undefined) var q: String = undefined; >q : Symbol(q, Decl(undefinedAssignableToEveryType.ts, 30, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >undefined : Symbol(undefined) function foo(x: T, y: U, z: V) { @@ -119,7 +119,7 @@ function foo(x: T, y: U, z: V) { >T : Symbol(T, Decl(undefinedAssignableToEveryType.ts, 32, 13)) >U : Symbol(U, Decl(undefinedAssignableToEveryType.ts, 32, 15)) >V : Symbol(V, Decl(undefinedAssignableToEveryType.ts, 32, 18)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(undefinedAssignableToEveryType.ts, 32, 35)) >T : Symbol(T, Decl(undefinedAssignableToEveryType.ts, 32, 13)) >y : Symbol(y, Decl(undefinedAssignableToEveryType.ts, 32, 40)) diff --git a/tests/baselines/reference/undefinedIsSubtypeOfEverything.symbols b/tests/baselines/reference/undefinedIsSubtypeOfEverything.symbols index 1b786e9e524..de4f6f0da05 100644 --- a/tests/baselines/reference/undefinedIsSubtypeOfEverything.symbols +++ b/tests/baselines/reference/undefinedIsSubtypeOfEverything.symbols @@ -40,7 +40,7 @@ class D1A extends Base { foo: String; >foo : Symbol(foo, Decl(undefinedIsSubtypeOfEverything.ts, 18, 24)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } @@ -58,7 +58,7 @@ class D2A extends Base { foo: Number; >foo : Symbol(foo, Decl(undefinedIsSubtypeOfEverything.ts, 27, 24)) ->Number : Symbol(Number, Decl(lib.d.ts, 456, 40), Decl(lib.d.ts, 518, 11)) +>Number : Symbol(Number, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } @@ -76,7 +76,7 @@ class D3A extends Base { foo: Boolean; >foo : Symbol(foo, Decl(undefinedIsSubtypeOfEverything.ts, 36, 24)) ->Boolean : Symbol(Boolean, Decl(lib.d.ts, 443, 38), Decl(lib.d.ts, 456, 11)) +>Boolean : Symbol(Boolean, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } @@ -86,7 +86,7 @@ class D4 extends Base { foo: RegExp; >foo : Symbol(foo, Decl(undefinedIsSubtypeOfEverything.ts, 41, 23)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } class D5 extends Base { @@ -95,7 +95,7 @@ class D5 extends Base { foo: Date; >foo : Symbol(foo, Decl(undefinedIsSubtypeOfEverything.ts, 45, 23)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } @@ -235,7 +235,7 @@ class D16 extends Base { foo: Object; >foo : Symbol(foo, Decl(undefinedIsSubtypeOfEverything.ts, 112, 24)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } diff --git a/tests/baselines/reference/underscoreTest1.symbols b/tests/baselines/reference/underscoreTest1.symbols index 1ba7c97d331..9de509de417 100644 --- a/tests/baselines/reference/underscoreTest1.symbols +++ b/tests/baselines/reference/underscoreTest1.symbols @@ -14,9 +14,9 @@ _.each([1, 2, 3], (num) => alert(num.toString())); >each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 395, 43), Decl(underscoreTest1_underscore.ts, 397, 77)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 5, 19)) >alert : Symbol(alert, Decl(underscoreTest1_underscoreTests.ts, 2, 14)) ->num.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>num.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 5, 19)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) _.each({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => alert(value.toString())); >_.each : Symbol(Underscore.Static.each, Decl(underscoreTest1_underscore.ts, 395, 43), Decl(underscoreTest1_underscore.ts, 397, 77)) @@ -28,9 +28,9 @@ _.each({ one: 1, two: 2, three: 3 }, (value: number, key?: string) => alert(valu >value : Symbol(value, Decl(underscoreTest1_underscoreTests.ts, 6, 38)) >key : Symbol(key, Decl(underscoreTest1_underscoreTests.ts, 6, 52)) >alert : Symbol(alert, Decl(underscoreTest1_underscoreTests.ts, 2, 14)) ->value.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>value.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) >value : Symbol(value, Decl(underscoreTest1_underscoreTests.ts, 6, 38)) ->toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18)) +>toString : Symbol(Number.toString, Decl(lib.d.ts, --, --)) _.map([1, 2, 3], (num) => num * 3); >_.map : Symbol(Underscore.Static.map, Decl(underscoreTest1_underscore.ts, 400, 90), Decl(underscoreTest1_underscore.ts, 402, 75)) @@ -71,9 +71,9 @@ var flat = _.reduceRight(list, (a, b) => a.concat(b), []); >list : Symbol(list, Decl(underscoreTest1_underscoreTests.ts, 13, 3)) >a : Symbol(a, Decl(underscoreTest1_underscoreTests.ts, 14, 32)) >b : Symbol(b, Decl(underscoreTest1_underscoreTests.ts, 14, 34)) ->a.concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>a.concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(underscoreTest1_underscoreTests.ts, 14, 32)) ->concat : Symbol(Array.concat, Decl(lib.d.ts, 1025, 13), Decl(lib.d.ts, 1030, 46)) +>concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(underscoreTest1_underscoreTests.ts, 14, 34)) var even = _.find([1, 2, 3, 4, 5, 6], (num) => num % 2 == 0); @@ -182,9 +182,9 @@ _.sortBy([1, 2, 3, 4, 5, 6], (num) => Math.sin(num)); >_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) >sortBy : Symbol(Underscore.Static.sortBy, Decl(underscoreTest1_underscore.ts, 473, 83), Decl(underscoreTest1_underscore.ts, 475, 77), Decl(underscoreTest1_underscore.ts, 476, 87), Decl(underscoreTest1_underscore.ts, 477, 56)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 41, 30)) ->Math.sin : Symbol(Math.sin, Decl(lib.d.ts, 615, 29)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->sin : Symbol(Math.sin, Decl(lib.d.ts, 615, 29)) +>Math.sin : Symbol(Math.sin, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>sin : Symbol(Math.sin, Decl(lib.d.ts, --, --)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 41, 30)) @@ -196,9 +196,9 @@ _([1.3, 2.1, 2.4]).groupBy((e: number, i?: number, list?: number[]) => Math.floo >e : Symbol(e, Decl(underscoreTest1_underscoreTests.ts, 45, 28)) >i : Symbol(i, Decl(underscoreTest1_underscoreTests.ts, 45, 38)) >list : Symbol(list, Decl(underscoreTest1_underscoreTests.ts, 45, 50)) ->Math.floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) +>Math.floor : Symbol(Math.floor, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>floor : Symbol(Math.floor, Decl(lib.d.ts, --, --)) >e : Symbol(e, Decl(underscoreTest1_underscoreTests.ts, 45, 28)) _.groupBy([1.3, 2.1, 2.4], (num: number) => Math.floor(num)); @@ -206,9 +206,9 @@ _.groupBy([1.3, 2.1, 2.4], (num: number) => Math.floor(num)); >_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) >groupBy : Symbol(Underscore.Static.groupBy, Decl(underscoreTest1_underscore.ts, 478, 66), Decl(underscoreTest1_underscore.ts, 480, 91), Decl(underscoreTest1_underscore.ts, 481, 101), Decl(underscoreTest1_underscore.ts, 482, 69)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 46, 28)) ->Math.floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) +>Math.floor : Symbol(Math.floor, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>floor : Symbol(Math.floor, Decl(lib.d.ts, --, --)) >num : Symbol(num, Decl(underscoreTest1_underscoreTests.ts, 46, 28)) _.groupBy(['one', 'two', 'three'], 'length'); @@ -437,7 +437,7 @@ var log = _.bind((message?: string, ...rest: string[]) => { }, Date); >bind : Symbol(Underscore.Static.bind, Decl(underscoreTest1_underscore.ts, 548, 68), Decl(underscoreTest1_underscore.ts, 550, 58)) >message : Symbol(message, Decl(underscoreTest1_underscoreTests.ts, 108, 18)) >rest : Symbol(rest, Decl(underscoreTest1_underscoreTests.ts, 108, 35)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) _.delay(log, 1000, 'logged later'); >_.delay : Symbol(Underscore.Static.delay, Decl(underscoreTest1_underscore.ts, 557, 73)) @@ -510,9 +510,9 @@ var renderNotes = _.after(notes.length, render); >_.after : Symbol(Underscore.Static.after, Decl(underscoreTest1_underscore.ts, 567, 45)) >_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) >after : Symbol(Underscore.Static.after, Decl(underscoreTest1_underscore.ts, 567, 45)) ->notes.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>notes.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >notes : Symbol(notes, Decl(underscoreTest1_underscoreTests.ts, 126, 3)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >render : Symbol(render, Decl(underscoreTest1_underscoreTests.ts, 127, 3)) _.each(notes, (note) => note.asyncSave({ success: renderNotes })); @@ -771,7 +771,7 @@ _.isFinite(-Infinity); >_.isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 609, 39)) >_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) >isFinite : Symbol(Underscore.Static.isFinite, Decl(underscoreTest1_underscore.ts, 609, 39)) ->Infinity : Symbol(Infinity, Decl(lib.d.ts, 22, 11)) +>Infinity : Symbol(Infinity, Decl(lib.d.ts, --, --)) _.isBoolean(null); >_.isBoolean : Symbol(Underscore.Static.isBoolean, Decl(underscoreTest1_underscore.ts, 610, 39)) @@ -782,7 +782,7 @@ _.isDate(new Date()); >_.isDate : Symbol(Underscore.Static.isDate, Decl(underscoreTest1_underscore.ts, 611, 40)) >_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) >isDate : Symbol(Underscore.Static.isDate, Decl(underscoreTest1_underscore.ts, 611, 40)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) _.isRegExp(/moe/); >_.isRegExp : Symbol(Underscore.Static.isRegExp, Decl(underscoreTest1_underscore.ts, 612, 37)) @@ -793,10 +793,10 @@ _.isNaN(NaN); >_.isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 613, 39)) >_ : Symbol(_, Decl(underscoreTest1_underscore.ts, 645, 11)) >isNaN : Symbol(Underscore.Static.isNaN, Decl(underscoreTest1_underscore.ts, 613, 39)) ->NaN : Symbol(NaN, Decl(lib.d.ts, 21, 11)) +>NaN : Symbol(NaN, Decl(lib.d.ts, --, --)) isNaN(undefined); ->isNaN : Symbol(isNaN, Decl(lib.d.ts, 43, 52)) +>isNaN : Symbol(isNaN, Decl(lib.d.ts, --, --)) >undefined : Symbol(undefined) _.isNaN(undefined); @@ -1008,7 +1008,7 @@ interface Tuple2 extends Array { >Tuple2 : Symbol(Tuple2, Decl(underscoreTest1_underscore.ts, 10, 1)) >T0 : Symbol(T0, Decl(underscoreTest1_underscore.ts, 12, 17)) >T1 : Symbol(T1, Decl(underscoreTest1_underscore.ts, 12, 20)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: T0; >T0 : Symbol(T0, Decl(underscoreTest1_underscore.ts, 12, 17)) @@ -1022,7 +1022,7 @@ interface Tuple3 extends Array { >T0 : Symbol(T0, Decl(underscoreTest1_underscore.ts, 17, 17)) >T1 : Symbol(T1, Decl(underscoreTest1_underscore.ts, 17, 20)) >T2 : Symbol(T2, Decl(underscoreTest1_underscore.ts, 17, 24)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: T0; >T0 : Symbol(T0, Decl(underscoreTest1_underscore.ts, 17, 17)) @@ -1040,7 +1040,7 @@ interface Tuple4 extends Array { >T1 : Symbol(T1, Decl(underscoreTest1_underscore.ts, 23, 20)) >T2 : Symbol(T2, Decl(underscoreTest1_underscore.ts, 23, 24)) >T3 : Symbol(T3, Decl(underscoreTest1_underscore.ts, 23, 28)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) 0: T0; >T0 : Symbol(T0, Decl(underscoreTest1_underscore.ts, 23, 17)) @@ -1173,7 +1173,7 @@ module Underscore { export interface WrappedFunction extends WrappedObject { >WrappedFunction : Symbol(WrappedFunction, Decl(underscoreTest1_underscore.ts, 62, 5)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 64, 37)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >WrappedObject : Symbol(WrappedObject, Decl(underscoreTest1_underscore.ts, 30, 19)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 64, 37)) @@ -1186,7 +1186,7 @@ module Underscore { >bind : Symbol(bind, Decl(underscoreTest1_underscore.ts, 64, 83), Decl(underscoreTest1_underscore.ts, 65, 29)) >object : Symbol(object, Decl(underscoreTest1_underscore.ts, 66, 13)) >args : Symbol(args, Decl(underscoreTest1_underscore.ts, 66, 25)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) bindAll(...methodNames: string[]): T; >bindAll : Symbol(bindAll, Decl(underscoreTest1_underscore.ts, 66, 52)) @@ -1196,12 +1196,12 @@ module Underscore { partial(...args: any[]): Function; >partial : Symbol(partial, Decl(underscoreTest1_underscore.ts, 67, 45)) >args : Symbol(args, Decl(underscoreTest1_underscore.ts, 68, 16)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) memoize(hashFunction?: Function): T; >memoize : Symbol(memoize, Decl(underscoreTest1_underscore.ts, 68, 42)) >hashFunction : Symbol(hashFunction, Decl(underscoreTest1_underscore.ts, 69, 16)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 64, 37)) delay(wait: number, ...args: any[]): number; @@ -1239,15 +1239,15 @@ module Underscore { compose(...funcs: Function[]): Function; >compose : Symbol(compose, Decl(underscoreTest1_underscore.ts, 75, 59)) >funcs : Symbol(funcs, Decl(underscoreTest1_underscore.ts, 76, 16)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) } export interface WrappedArray extends WrappedObject> { >WrappedArray : Symbol(WrappedArray, Decl(underscoreTest1_underscore.ts, 77, 5)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 79, 34)) >WrappedObject : Symbol(WrappedObject, Decl(underscoreTest1_underscore.ts, 30, 19)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 79, 34)) each(iterator: Iterator, context?: any): void; @@ -1434,13 +1434,13 @@ module Underscore { where(properties: Object): T[]; >where : Symbol(where, Decl(underscoreTest1_underscore.ts, 97, 67)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 98, 14)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 79, 34)) findWhere(properties: Object): T; >findWhere : Symbol(findWhere, Decl(underscoreTest1_underscore.ts, 98, 39)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 99, 18)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 79, 34)) reject(iterator: Iterator, context?: any): T[]; @@ -1973,13 +1973,13 @@ module Underscore { where(properties: Object): T[]; >where : Symbol(where, Decl(underscoreTest1_underscore.ts, 180, 67)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 181, 14)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 162, 39)) findWhere(properties: Object): T; >findWhere : Symbol(findWhere, Decl(underscoreTest1_underscore.ts, 181, 39)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 182, 18)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 162, 39)) reject(iterator: Iterator, context?: any): T[]; @@ -2251,7 +2251,7 @@ module Underscore { >ChainedArray : Symbol(ChainedArray, Decl(underscoreTest1_underscore.ts, 236, 5)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 238, 34)) >ChainedObject : Symbol(ChainedObject, Decl(underscoreTest1_underscore.ts, 203, 5)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 238, 34)) each(iterator: Iterator, context?: any): ChainedObject; @@ -2456,14 +2456,14 @@ module Underscore { where(properties: Object): ChainedArray; >where : Symbol(where, Decl(underscoreTest1_underscore.ts, 256, 79)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 257, 14)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >ChainedArray : Symbol(ChainedArray, Decl(underscoreTest1_underscore.ts, 236, 5)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 238, 34)) findWhere(properties: Object): ChainedObject; >findWhere : Symbol(findWhere, Decl(underscoreTest1_underscore.ts, 257, 51)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 258, 18)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >ChainedObject : Symbol(ChainedObject, Decl(underscoreTest1_underscore.ts, 203, 5)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 238, 34)) @@ -3107,14 +3107,14 @@ module Underscore { where(properties: Object): ChainedArray; >where : Symbol(where, Decl(underscoreTest1_underscore.ts, 347, 79)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 348, 14)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >ChainedArray : Symbol(ChainedArray, Decl(underscoreTest1_underscore.ts, 236, 5)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 329, 39)) findWhere(properties: Object): ChainedObject; >findWhere : Symbol(findWhere, Decl(underscoreTest1_underscore.ts, 348, 51)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 349, 18)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >ChainedObject : Symbol(ChainedObject, Decl(underscoreTest1_underscore.ts, 203, 5)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 329, 39)) @@ -3301,15 +3301,15 @@ module Underscore { evaluate?: RegExp; >evaluate : Symbol(evaluate, Decl(underscoreTest1_underscore.ts, 380, 39)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) interpolate?: RegExp; >interpolate : Symbol(interpolate, Decl(underscoreTest1_underscore.ts, 381, 26)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) escape?: RegExp; >escape : Symbol(escape, Decl(underscoreTest1_underscore.ts, 382, 29)) ->RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) variable?: string; >variable : Symbol(variable, Decl(underscoreTest1_underscore.ts, 383, 24)) @@ -3335,7 +3335,7 @@ module Underscore { (func: T): WrappedFunction; >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 390, 9)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 390, 29)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 390, 9)) >WrappedFunction : Symbol(WrappedFunction, Decl(underscoreTest1_underscore.ts, 62, 5)) @@ -3867,7 +3867,7 @@ module Underscore { >list : Symbol(list, Decl(underscoreTest1_underscore.ts, 439, 17)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 439, 14)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 439, 27)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 439, 14)) where(list: Dictionary, properties: Object): T[]; @@ -3877,7 +3877,7 @@ module Underscore { >Dictionary : Symbol(Dictionary, Decl(underscoreTest1_underscore.ts, 0, 0)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 440, 14)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 440, 37)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 440, 14)) findWhere(list: T[], properties: Object): T; @@ -3886,7 +3886,7 @@ module Underscore { >list : Symbol(list, Decl(underscoreTest1_underscore.ts, 442, 21)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 442, 18)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 442, 31)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 442, 18)) findWhere(list: Dictionary, properties: Object): T; @@ -3896,7 +3896,7 @@ module Underscore { >Dictionary : Symbol(Dictionary, Decl(underscoreTest1_underscore.ts, 0, 0)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 443, 18)) >properties : Symbol(properties, Decl(underscoreTest1_underscore.ts, 443, 41)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 443, 18)) reject(list: T[], iterator: Iterator, context?: any): T[]; @@ -4570,7 +4570,7 @@ module Underscore { bind(func: T, object: any): T; >bind : Symbol(bind, Decl(underscoreTest1_underscore.ts, 548, 68), Decl(underscoreTest1_underscore.ts, 550, 58)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 550, 13)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 550, 33)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 550, 13)) >object : Symbol(object, Decl(underscoreTest1_underscore.ts, 550, 41)) @@ -4579,10 +4579,10 @@ module Underscore { bind(func: Function, object: any, ...args: any[]): Function; >bind : Symbol(bind, Decl(underscoreTest1_underscore.ts, 548, 68), Decl(underscoreTest1_underscore.ts, 550, 58)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 551, 13)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >object : Symbol(object, Decl(underscoreTest1_underscore.ts, 551, 28)) >args : Symbol(args, Decl(underscoreTest1_underscore.ts, 551, 41)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) bindAll(object: T, ...methodNames: string[]): T; >bindAll : Symbol(bindAll, Decl(underscoreTest1_underscore.ts, 551, 68)) @@ -4595,37 +4595,37 @@ module Underscore { partial(func: Function, ...args: any[]): Function; >partial : Symbol(partial, Decl(underscoreTest1_underscore.ts, 553, 59)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 555, 16)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >args : Symbol(args, Decl(underscoreTest1_underscore.ts, 555, 31)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) memoize(func: T, hashFunction?: Function): T; >memoize : Symbol(memoize, Decl(underscoreTest1_underscore.ts, 555, 58)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 557, 16)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 557, 36)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 557, 16)) >hashFunction : Symbol(hashFunction, Decl(underscoreTest1_underscore.ts, 557, 44)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 557, 16)) delay(func: Function, wait: number, ...args: any[]): number; >delay : Symbol(delay, Decl(underscoreTest1_underscore.ts, 557, 73)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 559, 14)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >wait : Symbol(wait, Decl(underscoreTest1_underscore.ts, 559, 29)) >args : Symbol(args, Decl(underscoreTest1_underscore.ts, 559, 43)) defer(func: Function, ...args: any[]): number; >defer : Symbol(defer, Decl(underscoreTest1_underscore.ts, 559, 68)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 561, 14)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >args : Symbol(args, Decl(underscoreTest1_underscore.ts, 561, 29)) throttle(func: T, wait: number): T; >throttle : Symbol(throttle, Decl(underscoreTest1_underscore.ts, 561, 54)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 563, 17)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 563, 37)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 563, 17)) >wait : Symbol(wait, Decl(underscoreTest1_underscore.ts, 563, 45)) @@ -4634,7 +4634,7 @@ module Underscore { debounce(func: T, wait: number, immediate?: boolean): T; >debounce : Symbol(debounce, Decl(underscoreTest1_underscore.ts, 563, 63)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 565, 17)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 565, 37)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 565, 17)) >wait : Symbol(wait, Decl(underscoreTest1_underscore.ts, 565, 45)) @@ -4644,7 +4644,7 @@ module Underscore { once(func: T): T; >once : Symbol(once, Decl(underscoreTest1_underscore.ts, 565, 84)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 567, 13)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 567, 33)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 567, 13)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 567, 13)) @@ -4652,7 +4652,7 @@ module Underscore { after(count: number, func: T): T; >after : Symbol(after, Decl(underscoreTest1_underscore.ts, 567, 45)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 569, 14)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >count : Symbol(count, Decl(underscoreTest1_underscore.ts, 569, 34)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 569, 48)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 569, 14)) @@ -4661,7 +4661,7 @@ module Underscore { wrap(func: T, wrapper: (func: T, ...args: any[]) => any): T; >wrap : Symbol(wrap, Decl(underscoreTest1_underscore.ts, 569, 61)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 571, 13)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >func : Symbol(func, Decl(underscoreTest1_underscore.ts, 571, 33)) >T : Symbol(T, Decl(underscoreTest1_underscore.ts, 571, 13)) >wrapper : Symbol(wrapper, Decl(underscoreTest1_underscore.ts, 571, 41)) @@ -4673,8 +4673,8 @@ module Underscore { compose(...funcs: Function[]): Function; >compose : Symbol(compose, Decl(underscoreTest1_underscore.ts, 571, 88)) >funcs : Symbol(funcs, Decl(underscoreTest1_underscore.ts, 573, 16)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) ->Function : Symbol(Function, Decl(lib.d.ts, 223, 38), Decl(lib.d.ts, 269, 11)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) keys(object: any): string[]; >keys : Symbol(keys, Decl(underscoreTest1_underscore.ts, 573, 48)) diff --git a/tests/baselines/reference/unionTypeCallSignatures2.symbols b/tests/baselines/reference/unionTypeCallSignatures2.symbols index 35ba9464df0..32ce4c352b8 100644 --- a/tests/baselines/reference/unionTypeCallSignatures2.symbols +++ b/tests/baselines/reference/unionTypeCallSignatures2.symbols @@ -11,7 +11,7 @@ interface A { (x: Date): void; >x : Symbol(x, Decl(unionTypeCallSignatures2.ts, 3, 5)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) (x: T[]): T[]; >T : Symbol(T, Decl(unionTypeCallSignatures2.ts, 4, 5)) @@ -31,7 +31,7 @@ interface B { (x: Date): void; >x : Symbol(x, Decl(unionTypeCallSignatures2.ts, 10, 5)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) (x: T[]): T[]; >T : Symbol(T, Decl(unionTypeCallSignatures2.ts, 11, 5)) diff --git a/tests/baselines/reference/unionTypeIndexSignature.symbols b/tests/baselines/reference/unionTypeIndexSignature.symbols index e0228308c16..7295b860f3f 100644 --- a/tests/baselines/reference/unionTypeIndexSignature.symbols +++ b/tests/baselines/reference/unionTypeIndexSignature.symbols @@ -1,7 +1,7 @@ === tests/cases/conformance/types/union/unionTypeIndexSignature.ts === var numOrDate: number | Date; >numOrDate : Symbol(numOrDate, Decl(unionTypeIndexSignature.ts, 0, 3)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var anyVar: number; >anyVar : Symbol(anyVar, Decl(unionTypeIndexSignature.ts, 1, 3)) @@ -13,7 +13,7 @@ var unionOfDifferentReturnType: { [a: string]: number; } | { [a: string]: Date; >unionOfDifferentReturnType : Symbol(unionOfDifferentReturnType, Decl(unionTypeIndexSignature.ts, 6, 3)) >a : Symbol(a, Decl(unionTypeIndexSignature.ts, 6, 35)) >a : Symbol(a, Decl(unionTypeIndexSignature.ts, 6, 62)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) numOrDate = unionOfDifferentReturnType["hello"]; // number | Date >numOrDate : Symbol(numOrDate, Decl(unionTypeIndexSignature.ts, 0, 3)) @@ -41,7 +41,7 @@ var unionOfDifferentReturnType1: { [a: number]: number; } | { [a: number]: Date; >unionOfDifferentReturnType1 : Symbol(unionOfDifferentReturnType1, Decl(unionTypeIndexSignature.ts, 16, 3)) >a : Symbol(a, Decl(unionTypeIndexSignature.ts, 16, 36)) >a : Symbol(a, Decl(unionTypeIndexSignature.ts, 16, 63)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) numOrDate = unionOfDifferentReturnType1["hello"]; // any >numOrDate : Symbol(numOrDate, Decl(unionTypeIndexSignature.ts, 0, 3)) diff --git a/tests/baselines/reference/validBooleanAssignments.symbols b/tests/baselines/reference/validBooleanAssignments.symbols index a13a02a09cc..b7ba6be03c1 100644 --- a/tests/baselines/reference/validBooleanAssignments.symbols +++ b/tests/baselines/reference/validBooleanAssignments.symbols @@ -8,12 +8,12 @@ var a: any = x; var b: Object = x; >b : Symbol(b, Decl(validBooleanAssignments.ts, 3, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(validBooleanAssignments.ts, 0, 3)) var c: Boolean = x; >c : Symbol(c, Decl(validBooleanAssignments.ts, 4, 3)) ->Boolean : Symbol(Boolean, Decl(lib.d.ts, 443, 38), Decl(lib.d.ts, 456, 11)) +>Boolean : Symbol(Boolean, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(validBooleanAssignments.ts, 0, 3)) var d: boolean = x; diff --git a/tests/baselines/reference/validMultipleVariableDeclarations.symbols b/tests/baselines/reference/validMultipleVariableDeclarations.symbols index 467c061c6fa..1c3a1feb75c 100644 --- a/tests/baselines/reference/validMultipleVariableDeclarations.symbols +++ b/tests/baselines/reference/validMultipleVariableDeclarations.symbols @@ -110,7 +110,7 @@ var a: string[] = []; var a = new Array(); >a : Symbol(a, Decl(validMultipleVariableDeclarations.ts, 32, 3), Decl(validMultipleVariableDeclarations.ts, 33, 3), Decl(validMultipleVariableDeclarations.ts, 34, 3), Decl(validMultipleVariableDeclarations.ts, 35, 3), Decl(validMultipleVariableDeclarations.ts, 36, 3), Decl(validMultipleVariableDeclarations.ts, 37, 3)) ->Array : Symbol(Array, Decl(lib.d.ts, 1000, 23), Decl(lib.d.ts, 1171, 11)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var a: typeof a; >a : Symbol(a, Decl(validMultipleVariableDeclarations.ts, 32, 3), Decl(validMultipleVariableDeclarations.ts, 33, 3), Decl(validMultipleVariableDeclarations.ts, 34, 3), Decl(validMultipleVariableDeclarations.ts, 35, 3), Decl(validMultipleVariableDeclarations.ts, 36, 3), Decl(validMultipleVariableDeclarations.ts, 37, 3)) diff --git a/tests/baselines/reference/validNumberAssignments.symbols b/tests/baselines/reference/validNumberAssignments.symbols index 44ab24e33e0..7cb763bc89b 100644 --- a/tests/baselines/reference/validNumberAssignments.symbols +++ b/tests/baselines/reference/validNumberAssignments.symbols @@ -8,7 +8,7 @@ var a: any = x; var b: Object = x; >b : Symbol(b, Decl(validNumberAssignments.ts, 3, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(validNumberAssignments.ts, 0, 3)) var c: number = x; diff --git a/tests/baselines/reference/validStringAssignments.symbols b/tests/baselines/reference/validStringAssignments.symbols index 750dadefebd..bb24a6c1574 100644 --- a/tests/baselines/reference/validStringAssignments.symbols +++ b/tests/baselines/reference/validStringAssignments.symbols @@ -8,7 +8,7 @@ var a: any = x; var b: Object = x; >b : Symbol(b, Decl(validStringAssignments.ts, 3, 3)) ->Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(validStringAssignments.ts, 0, 3)) var c: string = x; @@ -17,6 +17,6 @@ var c: string = x; var d: String = x; >d : Symbol(d, Decl(validStringAssignments.ts, 5, 3)) ->String : Symbol(String, Decl(lib.d.ts, 275, 1), Decl(lib.d.ts, 443, 11)) +>String : Symbol(String, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(validStringAssignments.ts, 0, 3)) diff --git a/tests/baselines/reference/vardecl.symbols b/tests/baselines/reference/vardecl.symbols index 979790877c1..0860fc19500 100644 --- a/tests/baselines/reference/vardecl.symbols +++ b/tests/baselines/reference/vardecl.symbols @@ -41,9 +41,9 @@ var complicatedArrayVar: { x: number; y: string; }[] ; >y : Symbol(y, Decl(vardecl.ts, 18, 37)) complicatedArrayVar.push({ x: 30, y : 'hello world' }); ->complicatedArrayVar.push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>complicatedArrayVar.push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >complicatedArrayVar : Symbol(complicatedArrayVar, Decl(vardecl.ts, 18, 3)) ->push : Symbol(Array.push, Decl(lib.d.ts, 1016, 29)) +>push : Symbol(Array.push, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(vardecl.ts, 19, 26)) >y : Symbol(y, Decl(vardecl.ts, 19, 33)) diff --git a/tests/baselines/reference/voidOperatorWithStringType.symbols b/tests/baselines/reference/voidOperatorWithStringType.symbols index ab834bf1243..64fb0e600e8 100644 --- a/tests/baselines/reference/voidOperatorWithStringType.symbols +++ b/tests/baselines/reference/voidOperatorWithStringType.symbols @@ -88,9 +88,9 @@ var ResultIsAny11 = void (STRING + STRING); var ResultIsAny12 = void STRING.charAt(0); >ResultIsAny12 : Symbol(ResultIsAny12, Decl(voidOperatorWithStringType.ts, 32, 3)) ->STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>STRING.charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) >STRING : Symbol(STRING, Decl(voidOperatorWithStringType.ts, 1, 3)) ->charAt : Symbol(String.charAt, Decl(lib.d.ts, 279, 23)) +>charAt : Symbol(String.charAt, Decl(lib.d.ts, --, --)) // multiple void operators var ResultIsAny13 = void void STRING; diff --git a/tests/baselines/reference/wrappedAndRecursiveConstraints.symbols b/tests/baselines/reference/wrappedAndRecursiveConstraints.symbols index 5f3f2d6f854..b0128b37797 100644 --- a/tests/baselines/reference/wrappedAndRecursiveConstraints.symbols +++ b/tests/baselines/reference/wrappedAndRecursiveConstraints.symbols @@ -4,7 +4,7 @@ class C { >C : Symbol(C, Decl(wrappedAndRecursiveConstraints.ts, 0, 0)) >T : Symbol(T, Decl(wrappedAndRecursiveConstraints.ts, 2, 8)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) constructor(public data: T) { } >data : Symbol(data, Decl(wrappedAndRecursiveConstraints.ts, 3, 16)) @@ -24,7 +24,7 @@ class C { interface Foo extends Date { >Foo : Symbol(Foo, Decl(wrappedAndRecursiveConstraints.ts, 7, 1)) ->Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) foo: string; >foo : Symbol(foo, Decl(wrappedAndRecursiveConstraints.ts, 9, 28)) From 69dc707c1455081166329c82468cf3048dad4857 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 18:56:08 -0700 Subject: [PATCH 047/121] Update parse to use new grammar --- src/compiler/parser.ts | 48 ++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 8cbe82c7c01..6141e3ba047 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3188,8 +3188,14 @@ namespace ts { } /** - * Comment - * @param node + * Check if the current token can possibly be in an ES7 increment expression. + * + * Increment Expression: + * LeftHandSideExpression[?Yield] + * LeftHandSideExpression[?Yield][no LineTerminator here]++ + * LeftHandSideExpression[?Yield][no LineTerminator here]-- + * ++LeftHandSideExpression[?Yield] + * --LeftHandSideExpression[?Yield] */ function isIncrementExpression(): boolean{ // TODO(yuisu): Comment why we have to do what are we doing here @@ -3208,7 +3214,18 @@ namespace ts { } } + /** + * Parse ES7 unary expression and await expression + * + * ES7 UnaryExpression: + * 1) SimpleUnaryExpression[?yield] + * 2) IncrementExpression[?yield] ** UnaryExpression[?yield] + */ function parseUnaryExpressionOrHigher(): UnaryExpression | BinaryExpression { + if (isAwaitExpression()) { + return parseAwaitExpression(); + } + if (isIncrementExpression()) { let incrementExpression = parseIncrementExpression(); return token === SyntaxKind.AsteriskAsteriskToken ? @@ -3224,24 +3241,19 @@ namespace ts { } /** - * Parse SimpleUnaryExpression or higher: - * In ES7 grammar, - * UnaryExpression: - * 1) IncrementExpression[?yield] - * 2) delete UnaryExpression[?yield] - * 3) void UnaryExpression[?yield] - * 4) typeof UnaryExpression[?yield] - * 5) + UnaryExpression[?yield] - * 6) - UnaryExpression[?yield] - * 7) ~ UnaryExpression[?yield] - * 8) ! UnaryExpression[?yield] - * 9) IncrementExpression[?yield] ** UnaryExpression[?yield] + * Parse ES7 simple-unary expression or higher: + * + * SimpleUnaryExpression: + * 1) IncrementExpression[?yield] + * 2) delete UnaryExpression[?yield] + * 3) void UnaryExpression[?yield] + * 4) typeof UnaryExpression[?yield] + * 5) + UnaryExpression[?yield] + * 6) - UnaryExpression[?yield] + * 7) ~ UnaryExpression[?yield] + * 8) ! UnaryExpression[?yield] */ function parseSimpleUnaryExpression(): UnaryExpression { - if (isAwaitExpression()) { - return parseAwaitExpression(); - } - switch (token) { case SyntaxKind.PlusToken: case SyntaxKind.MinusToken: From 7b3de842a0684889f5baa43129d31bb5493e935f Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 18:56:39 -0700 Subject: [PATCH 048/121] Update test harness to pick up new ScriptTarget of ES7 --- src/compiler/commandLineParser.ts | 2 +- src/harness/harness.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 1670251973a..f63cb36f9ec 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -204,7 +204,7 @@ namespace ts { { name: "target", shortName: "t", - type: { "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, "es6": ScriptTarget.ES6 }, + type: { "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, "es6": ScriptTarget.ES6, "es7": ScriptTarget.ES7 }, description: Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental, paramType: Diagnostics.VERSION, error: Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES6 diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 57eb848ac23..f149ceeb268 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -932,7 +932,16 @@ module Harness { } else { if (fn === defaultLibFileName) { - return languageVersion === ts.ScriptTarget.ES6 ? defaultES6LibSourceFile : defaultLibSourceFile; + switch (languageVersion) { + case ts.ScriptTarget.ES6: + case ts.ScriptTarget.ES7: + // TODO : Update to use ES7 specific lib file + return defaultES6LibSourceFile; + case ts.ScriptTarget.ES3: + case ts.ScriptTarget.ES5: + default: + return defaultLibSourceFile; + } } // Don't throw here -- the compiler might be looking for a test that actually doesn't exist as part of the TC return undefined; From 80cdfd41874a9f7bdbb6f88fdef13fab72f0922d Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 18:57:11 -0700 Subject: [PATCH 049/121] Fix emitting parenthesis when downlevel --- src/compiler/emitter.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index db3cef27aa3..6a09006d3e3 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2508,7 +2508,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } /** - * Emit exponentiation operator down-level using Math.pow + * Emit ES7 exponentiation operator downlevel using Math.pow * @param node {BinaryExpression} a binary expression node containing exponentiationOperator (**, **=) */ function emitExponentiationOperator(node: BinaryExpression) { @@ -2516,12 +2516,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) { let synthesizedLHS: ElementAccessExpression | PropertyAccessExpression; // TODO (yuisu) : comment - let shouldEmitParenthesis = node.parent.kind === SyntaxKind.VariableDeclaration || node.parent.kind === SyntaxKind.BinaryExpression; + let shouldEmitParenthesis = false; if (isElementAccessExpression(leftHandSideExpression)) { + shouldEmitParenthesis = node.parent.kind === SyntaxKind.VariableDeclaration || node.parent.kind === SyntaxKind.BinaryExpression; + if (shouldEmitParenthesis) { write("("); } + synthesizedLHS = createSynthesizedNode(SyntaxKind.ElementAccessExpression, /*startsOnNewLine*/ false); let tempExpression = createAndRecordTempVariable(TempFlags.Auto); emitAssignment(tempExpression, leftHandSideExpression.expression, /*shouldEmitCommaBeforeAssignment*/ false); @@ -2539,9 +2542,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(", "); } else if (isPropertyAccessExpression(leftHandSideExpression)) { + shouldEmitParenthesis = node.parent.kind === SyntaxKind.VariableDeclaration || node.parent.kind === SyntaxKind.BinaryExpression; + if (shouldEmitParenthesis) { write("("); } + synthesizedLHS = createSynthesizedNode(SyntaxKind.PropertyAccessExpression, /*startsOnNewLine*/ false); let tempExpression = createAndRecordTempVariable(TempFlags.Auto); synthesizedLHS.expression = tempExpression From a00e90c1700dfd78222bce7d5033bca224c0dfc2 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 19:03:02 -0700 Subject: [PATCH 050/121] Add and update tests --- ...onentiationAssignmentWithIndexingOnLHS2.ts | 8 +- ...onentiationAssignmentWithIndexingOnLHS4.ts | 2 + ...onAssignmentWithPropertyAccessingOnLHS1.ts | 9 +- .../emitCompoundExponentiationOperator1ES7.ts | 2 +- .../emitExponentiationOperator1.ts | 9 +- .../emitExponentiationOperator1ES7.ts | 9 +- .../emitExponentiationOperator2.ts | 23 +-- .../emitExponentiationOperator2ES7.ts | 23 +-- .../emitExponentiationOperator3.ts | 146 +++++------------- .../emitExponentiationOperator3ES7.ts | 146 +++++------------- .../emitExponentiationOperator4.ts | 37 +++++ .../emitExponentiationOperator4ES7.ts | 37 +++++ ...ExponentiationOperatorInTempalteString4.ts | 28 ++++ ...onentiationOperatorInTempalteString4ES6.ts | 28 ++++ ...ExponentiationOperatorInTemplateString1.ts | 20 +-- ...onentiationOperatorInTemplateString1ES6.ts | 20 +-- ...ExponentiationOperatorInTemplateString2.ts | 20 +-- ...onentiationOperatorInTemplateString2ES6.ts | 20 +-- ...ExponentiationOperatorInTemplateString3.ts | 18 --- ...onentiationOperatorInTemplateString3ES6.ts | 18 --- ...peratorInTemplateStringWithSyntaxError1.ts | 28 ++++ ...peratorInTemplateStringWithSyntaxError2.ts | 28 ++++ ...peratorInTemplateStringWithSyntaxError3.ts | 28 ++++ .../exponentiationOperatorSyntaxError1.ts | 39 +++++ .../exponentiationOperatorSyntaxError2.ts | 63 ++++++++ ...ithInvalidSimpleUnaryExpressionOperands.ts | 36 +++++ 26 files changed, 458 insertions(+), 387 deletions(-) create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts create mode 100644 tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts index 2648b0d6809..6a6fdc662c1 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts @@ -1,10 +1,12 @@ // @target: es5 +var globalCounter = 0; function foo() { - console.log("Call foo()"); + globalCounter += 1; return { 0: 2 }; } +foo()[0] **= foo()[0]; var result_foo1 = foo()[0] **= foo()[0]; - +foo()[0] **= foo()[0] **= 2; var result_foo2 = foo()[0] **= foo()[0] **= 2; - +foo()[0] **= foo()[0] ** 2; var result_foo3 = foo()[0] **= foo()[0] ** 2; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts index 668d6f0a92b..3f4acd74e01 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts @@ -1,6 +1,8 @@ // @target: es5 +var globalCounter = 0; function incrementIdx(max: number) { + globalCounter += 1; let idx = Math.floor(Math.random() * max); return idx; } diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts index bb8530b204f..c4ca205404b 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts @@ -1,6 +1,13 @@ // @target: es5 +var globalCounter = 0; function foo() { + globalCounter += 1; return { prop: 2 }; } -foo().prop **= 2; \ No newline at end of file +foo().prop **= 2; +var result0 = foo().prop **= 2; +foo().prop **= foo().prop **= 2; +var result1 = foo().prop **= foo().prop **= 2; +foo().prop **= foo().prop ** 2; +var result2 = foo().prop **= foo().prop ** 2; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts index 61b057146fc..ca2514b53f9 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts @@ -1,4 +1,4 @@ -// @target:es7 +// @target: es7 var comp: number; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts index 9f8fa8f4d94..2e6c84b6d43 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts @@ -1,12 +1,13 @@ // @target: es5 +1 ** -2; 1 ** 2; +(-1) ** 2 1 ** 2 ** 3; -1 ** -2 ** 3; -1 ** -2 ** -3; --1 ** -2 ** -3; --(1 ** 2) ** 3; +1 ** 2 ** -3; 1 ** -(2 ** 3); +(-(1 ** 2)) ** 3; +(-(1 ** 2)) ** -3; 1 ** 2 + 3; 1 ** 2 - 3; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts index 9007a1e33cb..f99051f6500 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts @@ -1,12 +1,13 @@ // @target: es7 +1 ** -2; 1 ** 2; +(-1) ** 2 1 ** 2 ** 3; -1 ** -2 ** 3; -1 ** -2 ** -3; --1 ** -2 ** -3; --(1 ** 2) ** 3; +1 ** 2 ** -3; 1 ** -(2 ** 3); +(-(1 ** 2)) ** 3; +(-(1 ** 2)) ** -3; 1 ** 2 + 3; 1 ** 2 - 3; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts index 317688bf913..146eab550d2 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts @@ -11,13 +11,10 @@ temp-- ** 3; --temp * temp ** 3; --temp / temp ** 3; --temp % temp ** 3; --++temp ** 3; -+--temp ** 3; - temp-- ** 3; temp++ ** 3; --temp++ ** 3; -+temp-- ** 3; +temp-- ** -temp; +temp++ ** +temp; temp-- + temp ** 3; temp-- - temp ** 3; @@ -40,27 +37,11 @@ temp-- % temp ** 3; 3 ** --temp; 3 ** temp++; 3 ** temp--; --3 ** temp++; --3 ** temp--; --3 ** ++temp; --3 ** --temp; -+3 ** temp++; -+3 ** temp--; -+3 ** ++temp; -+3 ** --temp 3 ** ++temp ** 2; 3 ** --temp ** 2; 3 ** temp++ ** 2; 3 ** temp-- ** 2; --3 ** temp++ ** 2; --3 ** temp-- ** 2; --3 ** ++temp ** 2; --3 ** --temp ** 2; -+3 ** temp++ ** 2; -+3 ** temp-- ** 2; -+3 ** ++temp ** 2; -+3 ** --temp ** 2; 3 ** ++temp + 2; 3 ** ++temp - 2; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts index ded8e7ce631..f5429d1ddd5 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts @@ -11,13 +11,10 @@ temp-- ** 3; --temp * temp ** 3; --temp / temp ** 3; --temp % temp ** 3; --++temp ** 3; -+--temp ** 3; - temp-- ** 3; temp++ ** 3; --temp++ ** 3; -+temp-- ** 3; +temp-- ** -temp; +temp++ ** +temp; temp-- + temp ** 3; temp-- - temp ** 3; @@ -40,27 +37,11 @@ temp-- % temp ** 3; 3 ** --temp; 3 ** temp++; 3 ** temp--; --3 ** temp++; --3 ** temp--; --3 ** ++temp; --3 ** --temp; -+3 ** temp++; -+3 ** temp--; -+3 ** ++temp; -+3 ** --temp 3 ** ++temp ** 2; 3 ** --temp ** 2; 3 ** temp++ ** 2; 3 ** temp-- ** 2; --3 ** temp++ ** 2; --3 ** temp-- ** 2; --3 ** ++temp ** 2; --3 ** --temp ** 2; -+3 ** temp++ ** 2; -+3 ** temp-- ** 2; -+3 ** ++temp ** 2; -+3 ** --temp ** 2; 3 ** ++temp + 2; 3 ** ++temp - 2; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts index f8c05f47e6b..597f253d1b8 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts @@ -1,114 +1,40 @@ -// @target: es5 -var temp: any; +// @target:es5 -delete --temp ** 3; -delete ++temp ** 3; -delete temp-- ** 3; -delete temp++ ** 3; -delete -++temp ** 3; -delete -temp++ ** 3; -delete -temp-- ** 3; +var temp = 10; -delete --temp ** 3 ** 1; -delete ++temp ** 3 ** 1; -delete temp-- ** 3 ** 1; -delete temp++ ** 3 ** 1; -delete -++temp ** 3 ** 1; -delete -temp++ ** 3 ** 1; -delete -temp-- ** 3 ** 1;; +(-++temp) ** 3; +(+--temp) ** 3; +(-temp++) ** 3; +(+temp--) ** 3; +(-(1 ** ++temp)) ** 3; +(-(1 ** --temp)) ** 3; +(-(1 ** temp++)) ** 3; +(-(1 ** temp--)) ** 3; ---temp ** 3; -++temp ** 3; -temp-- ** 3; -temp++ ** 3; --++temp ** 3; --temp++ ** 3; --temp-- ** 3; +(-3) ** temp++; +(-3) ** temp--; +(-3) ** ++temp; +(-3) ** --temp; +(+3) ** temp++; +(+3) ** temp--; +(+3) ** ++temp; +(+3) ** --temp; +(-3) ** temp++ ** 2; +(-3) ** temp-- ** 2; +(-3) ** ++temp ** 2; +(-3) ** --temp ** 2; +(+3) ** temp++ ** 2; +(+3) ** temp-- ** 2; +(+3) ** ++temp ** 2; +(+3) ** --temp ** 2; ---temp ** 3 ** 1; -++temp ** 3 ** 1; -temp-- ** 3 ** 1; -temp++ ** 3 ** 1; --++temp ** 3 ** 1; --temp++ ** 3 ** 1; --temp-- ** 3 ** 1; - -typeof --temp ** 3; -typeof temp-- ** 3; -typeof 3 ** 4; -typeof temp++ ** 4; -typeof temp-- ** 4; -typeof -3 ** 4; -typeof -++temp ** 4; -typeof -temp++ ** 4; -typeof -temp-- ** 4; - -typeof --temp ** 3 ** 1; -typeof temp-- ** 3 ** 1; -typeof 3 ** 4 ** 1; -typeof temp++ ** 4 ** 1; -typeof temp-- ** 4 ** 1; -typeof -3 ** 4 ** 1; -typeof -++temp ** 4 ** 1; -typeof -temp++ ** 4 ** 1; -typeof -temp-- ** 4 ** 1; - -void --temp ** 3; -void temp-- ** 3; -void 3 ** 4; -void temp++ ** 4; -void temp-- ** 4; -void -3 ** 4; -void -++temp ** 4; -void -temp++ ** 4; -void -temp-- ** 4; - -void --temp ** 3 ** 1; -void temp-- ** 3 ** 1; -void 3 ** 4 ** 1; -void temp++ ** 4 ** 1; -void temp-- ** 4 ** 1; -void -3 ** 4 ** 1; -void -++temp ** 4 ** 1; -void -temp++ ** 4 ** 1; -void -temp-- ** 4 ** 1; - -~ --temp ** 3; -~ temp-- ** 3; -~ 3 ** 4; -~ temp++ ** 4; -~ temp-- ** 4; -~ -3 ** 4; -~ -++temp ** 4; -~ -temp++ ** 4; -~ -temp-- ** 4; - -~ --temp ** 3 ** 1; -~ temp-- ** 3 ** 1; -~ 3 ** 4 ** 1; -~ temp++ ** 4 ** 1; -~ temp-- ** 4 ** 1; -~ -3 ** 4 ** 1; -~ -++temp ** 4 ** 1; -~ -temp++ ** 4 ** 1; -~ -temp-- ** 4 ** 1; - -! --temp ** 3; -! temp-- ** 3; -! 3 ** 4; -! temp++ ** 4; -! temp-- ** 4; -! -3 ** 4; -! -++temp ** 4; -! -temp++ ** 4; -! -temp-- ** 4; - -! --temp ** 3 ** 1; -! temp-- ** 3 ** 1; -! 3 ** 4 ** 1; -! temp++ ** 4 ** 1; -! temp-- ** 4 ** 1; -! -3 ** 4 ** 1; -! -++temp ** 4 ** 1; -! -temp++ ** 4 ** 1; -! -temp-- ** 4 ** 1; \ No newline at end of file +3 ** -temp++; +3 ** -temp--; +3 ** -++temp; +3 ** +--temp; +3 ** (-temp++) ** 2; +3 ** (-temp--) ** 2; +3 ** (+temp++) ** 2; +3 ** (+temp--) ** 2; +3 ** (-++temp) ** 2; +3 ** (+--temp) ** 2; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts index 466cab93a51..8ebe25e9be1 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts @@ -1,114 +1,40 @@ -// @target: es7 -var temp: any; +// @target:es7 -delete --temp ** 3; -delete ++temp ** 3; -delete temp-- ** 3; -delete temp++ ** 3; -delete -++temp ** 3; -delete -temp++ ** 3; -delete -temp-- ** 3; +var temp = 10; -delete --temp ** 3 ** 1; -delete ++temp ** 3 ** 1; -delete temp-- ** 3 ** 1; -delete temp++ ** 3 ** 1; -delete -++temp ** 3 ** 1; -delete -temp++ ** 3 ** 1; -delete -temp-- ** 3 ** 1;; +(-++temp) ** 3; +(+--temp) ** 3; +(-temp++) ** 3; +(+temp--) ** 3; +(-(1 ** ++temp)) ** 3; +(-(1 ** --temp)) ** 3; +(-(1 ** temp++)) ** 3; +(-(1 ** temp--)) ** 3; ---temp ** 3; -++temp ** 3; -temp-- ** 3; -temp++ ** 3; --++temp ** 3; --temp++ ** 3; --temp-- ** 3; +(-3) ** temp++; +(-3) ** temp--; +(-3) ** ++temp; +(-3) ** --temp; +(+3) ** temp++; +(+3) ** temp--; +(+3) ** ++temp; +(+3) ** --temp; +(-3) ** temp++ ** 2; +(-3) ** temp-- ** 2; +(-3) ** ++temp ** 2; +(-3) ** --temp ** 2; +(+3) ** temp++ ** 2; +(+3) ** temp-- ** 2; +(+3) ** ++temp ** 2; +(+3) ** --temp ** 2; ---temp ** 3 ** 1; -++temp ** 3 ** 1; -temp-- ** 3 ** 1; -temp++ ** 3 ** 1; --++temp ** 3 ** 1; --temp++ ** 3 ** 1; --temp-- ** 3 ** 1; - -typeof --temp ** 3; -typeof temp-- ** 3; -typeof 3 ** 4; -typeof temp++ ** 4; -typeof temp-- ** 4; -typeof -3 ** 4; -typeof -++temp ** 4; -typeof -temp++ ** 4; -typeof -temp-- ** 4; - -typeof --temp ** 3 ** 1; -typeof temp-- ** 3 ** 1; -typeof 3 ** 4 ** 1; -typeof temp++ ** 4 ** 1; -typeof temp-- ** 4 ** 1; -typeof -3 ** 4 ** 1; -typeof -++temp ** 4 ** 1; -typeof -temp++ ** 4 ** 1; -typeof -temp-- ** 4 ** 1; - -void --temp ** 3; -void temp-- ** 3; -void 3 ** 4; -void temp++ ** 4; -void temp-- ** 4; -void -3 ** 4; -void -++temp ** 4; -void -temp++ ** 4; -void -temp-- ** 4; - -void --temp ** 3 ** 1; -void temp-- ** 3 ** 1; -void 3 ** 4 ** 1; -void temp++ ** 4 ** 1; -void temp-- ** 4 ** 1; -void -3 ** 4 ** 1; -void -++temp ** 4 ** 1; -void -temp++ ** 4 ** 1; -void -temp-- ** 4 ** 1; - -~ --temp ** 3; -~ temp-- ** 3; -~ 3 ** 4; -~ temp++ ** 4; -~ temp-- ** 4; -~ -3 ** 4; -~ -++temp ** 4; -~ -temp++ ** 4; -~ -temp-- ** 4; - -~ --temp ** 3 ** 1; -~ temp-- ** 3 ** 1; -~ 3 ** 4 ** 1; -~ temp++ ** 4 ** 1; -~ temp-- ** 4 ** 1; -~ -3 ** 4 ** 1; -~ -++temp ** 4 ** 1; -~ -temp++ ** 4 ** 1; -~ -temp-- ** 4 ** 1; - -! --temp ** 3; -! temp-- ** 3; -! 3 ** 4; -! temp++ ** 4; -! temp-- ** 4; -! -3 ** 4; -! -++temp ** 4; -! -temp++ ** 4; -! -temp-- ** 4; - -! --temp ** 3 ** 1; -! temp-- ** 3 ** 1; -! 3 ** 4 ** 1; -! temp++ ** 4 ** 1; -! temp-- ** 4 ** 1; -! -3 ** 4 ** 1; -! -++temp ** 4 ** 1; -! -temp++ ** 4 ** 1; -! -temp-- ** 4 ** 1; \ No newline at end of file +3 ** -temp++; +3 ** -temp--; +3 ** -++temp; +3 ** +--temp; +3 ** (-temp++) ** 2; +3 ** (-temp--) ** 2; +3 ** (+temp++) ** 2; +3 ** (+temp--) ** 2; +3 ** (-++temp) ** 2; +3 ** (+--temp) ** 2; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts new file mode 100644 index 00000000000..6788ab36f86 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts @@ -0,0 +1,37 @@ +// @target: es5 +var temp: any; + +--temp ** 3; +++temp ** 3; +temp-- ** 3; +temp++ ** 3; + +1 ** --temp ** 3; +1 ** ++temp ** 3; +1 ** temp-- ** 3; +1 ** temp++ ** 3; + +(void --temp) ** 3; +(void temp--) ** 3; +(void 3) ** 4; +(void temp++) ** 4; +(void temp--) ** 4; + + +1 ** (void --temp) ** 3; +1 ** (void temp--) ** 3; +1 ** (void 3) ** 4; +1 ** (void temp++) ** 4; +1 ** (void temp--) ** 4; + +(~ --temp) ** 3; +(~ temp--) ** 3; +(~ 3) ** 4; +(~ temp++) ** 4; +(~ temp--) ** 4; + +1 ** (~ --temp) ** 3; +1 ** (~ temp--) ** 3; +1 ** (~ 3) ** 4; +1 ** (~ temp++) ** 4; +1 ** (~ temp--) ** 4; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts new file mode 100644 index 00000000000..d3b718a2054 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts @@ -0,0 +1,37 @@ +// @target: es7 +var temp: any; + +--temp ** 3; +++temp ** 3; +temp-- ** 3; +temp++ ** 3; + +1 ** --temp ** 3; +1 ** ++temp ** 3; +1 ** temp-- ** 3; +1 ** temp++ ** 3; + +(void --temp) ** 3; +(void temp--) ** 3; +(void 3) ** 4; +(void temp++) ** 4; +(void temp--) ** 4; + + +1 ** (void --temp) ** 3; +1 ** (void temp--) ** 3; +1 ** (void 3) ** 4; +1 ** (void temp++) ** 4; +1 ** (void temp--) ** 4; + +(~ --temp) ** 3; +(~temp--) ** 3; +(~3) ** 4; +(~temp++) ** 4; +(~temp--) ** 4; + +1 ** (~ --temp) ** 3; +1 ** (~temp--) ** 3; +1 ** (~3) ** 4; +1 ** (~temp++) ** 4; +1 ** (~temp--) ** 4; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4.ts new file mode 100644 index 00000000000..104033ab579 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4.ts @@ -0,0 +1,28 @@ +// @target: es5 + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** -t2} world`; +`${(-t1) ** t2 - t1} world`; +`${(-++t1) ** t2 - t1} world`; +`${(-t1++) ** t2 - t1} world`; +`${(~t1) ** t2 ** --t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +`hello ${(-++t1) ** t2 - t1}`; +`hello ${(-t1++) ** t2 - t1}`; +`hello ${(~t1) ** t2 ** --t1 }`; +`hello ${typeof (t1 ** t2 ** t1)}`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts new file mode 100644 index 00000000000..611860cc5ef --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts @@ -0,0 +1,28 @@ +// @target: es6 + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** -t2} world`; +`${(-t1) ** t2 - t1} world`; +`${(-++t1) ** t2 - t1} world`; +`${(-t1++) ** t2 - t1} world`; +`${(~t1) ** t2 ** --t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +`hello ${(-++t1) ** t2 - t1}`; +`hello ${(-t1++) ** t2 - t1}`; +`hello ${(~t1) ** t2 ** --t1 }`; +`hello ${typeof (t1 ** t2 ** t1)}`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts index 80fe91ee462..744e4ed2698 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts @@ -10,13 +10,7 @@ var s; `${t1 + t2 ** t1}`; `${t1 ** t2 + t1}`; `${t1 + t2 ** t2 + t1 }`; -`${-t1 ** t2 - t1}`; -`${-++t1 ** t2 - t1}`; -`${-t1++ ** t2 - t1}`; -`${!t1 ** t2 ** --t1 }`; -`${typeof t1 ** t2 ** t1}`; `${typeof (t1 ** t2 ** t1) }`; -`${1 + typeof t1 ** t2 ** t1}`; `${1 + typeof (t1 ** t2 ** t1) }`; `${t1 ** t2}${t1 ** t2}`; @@ -24,23 +18,11 @@ var s; `${t1 + t2 ** t1}${t1 + t2 ** t1}`; `${t1 ** t2 + t1}${t1 ** t2 + t1}`; `${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; -`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; -`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; -`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; -`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; -`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; `${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; -`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; `${t1 ** t2} hello world ${t1 ** t2}`; `${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; `${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; `${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; `${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; -`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; -`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; -`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; -`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; -`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; -`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; -`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; \ No newline at end of file +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts index 70cdad5b98f..90a8b9b26f7 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts @@ -10,13 +10,7 @@ var s; `${t1 + t2 ** t1}`; `${t1 ** t2 + t1}`; `${t1 + t2 ** t2 + t1 }`; -`${-t1 ** t2 - t1}`; -`${-++t1 ** t2 - t1}`; -`${-t1++ ** t2 - t1}`; -`${!t1 ** t2 ** --t1 }`; -`${typeof t1 ** t2 ** t1}`; `${typeof (t1 ** t2 ** t1) }`; -`${1 + typeof t1 ** t2 ** t1}`; `${1 + typeof (t1 ** t2 ** t1) }`; `${t1 ** t2}${t1 ** t2}`; @@ -24,23 +18,11 @@ var s; `${t1 + t2 ** t1}${t1 + t2 ** t1}`; `${t1 ** t2 + t1}${t1 ** t2 + t1}`; `${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; -`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; -`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; -`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; -`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; -`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; `${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; -`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; `${t1 ** t2} hello world ${t1 ** t2}`; `${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; `${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; `${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; `${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; -`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; -`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; -`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; -`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; -`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; -`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; -`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; \ No newline at end of file +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts index 3c3349879c3..0d5f2129861 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts @@ -10,13 +10,7 @@ var s; `hello ${t1 + t2 ** t1}`; `hello ${t1 ** t2 + t1}`; `hello ${t1 + t2 ** t2 + t1 }`; -`hello ${-t1 ** t2 - t1}`; -`hello ${-++t1 ** t2 - t1}`; -`hello ${-t1++ ** t2 - t1}`; -`hello ${!t1 ** t2 ** --t1 }`; -`hello ${typeof t1 ** t2 ** t1}`; `hello ${typeof (t1 ** t2 ** t1) }`; -`hello ${1 + typeof t1 ** t2 ** t1}`; `hello ${1 + typeof (t1 ** t2 ** t1) }`; `hello ${t1 ** t2}${t1 ** t2}`; @@ -24,23 +18,11 @@ var s; `hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; `hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; `hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; -`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; -`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; -`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; -`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; -`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; `hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; -`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; `hello ${t1 ** t2} hello world ${t1 ** t2}`; `hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; `hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; `hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; `hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; -`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; -`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; -`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; -`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; -`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; -`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; -`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts index 7268768f417..7f122d505e7 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts @@ -10,13 +10,7 @@ var s; `hello ${t1 + t2 ** t1}`; `hello ${t1 ** t2 + t1}`; `hello ${t1 + t2 ** t2 + t1 }`; -`hello ${-t1 ** t2 - t1}`; -`hello ${-++t1 ** t2 - t1}`; -`hello ${-t1++ ** t2 - t1}`; -`hello ${!t1 ** t2 ** --t1 }`; -`hello ${typeof t1 ** t2 ** t1}`; `hello ${typeof (t1 ** t2 ** t1) }`; -`hello ${1 + typeof t1 ** t2 ** t1}`; `hello ${1 + typeof (t1 ** t2 ** t1) }`; `hello ${t1 ** t2}${t1 ** t2}`; @@ -24,23 +18,11 @@ var s; `hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; `hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; `hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; -`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; -`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; -`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; -`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; -`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; `hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; -`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; `hello ${t1 ** t2} hello world ${t1 ** t2}`; `hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; `hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; `hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; `hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; -`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; -`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; -`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; -`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; -`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; -`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; -`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts index 8affe231586..73fc2fcd3a9 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts @@ -10,13 +10,7 @@ var s; `${t1 + t2 ** t1} world`; `${t1 ** t2 + t1} world`; `${t1 + t2 ** t2 + t1 } world`; -`${-t1 ** t2 - t1} world`; -`${-++t1 ** t2 - t1} world`; -`${-t1++ ** t2 - t1} world`; -`${!t1 ** t2 ** --t1 } world`; -`${typeof t1 ** t2 ** t1} world`; `${typeof (t1 ** t2 ** t1) } world`; -`${1 + typeof t1 ** t2 ** t1} world`; `${1 + typeof (t1 ** t2 ** t1) } world`; `${t1 ** t2}${t1 ** t2} world`; @@ -24,23 +18,11 @@ var s; `${t1 + t2 ** t1}${t1 + t2 ** t1} world`; `${t1 ** t2 + t1}${t1 ** t2 + t1} world`; `${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; -`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; -`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; -`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; -`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; -`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; `${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; -`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; `${t1 ** t2} hello world ${t1 ** t2} !!`; `${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; `${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; `${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; `${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; -`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; -`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; -`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; -`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; -`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; `${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; -`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts index 9c54478708e..724039acfb2 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts @@ -10,13 +10,7 @@ var s; `${t1 + t2 ** t1} world`; `${t1 ** t2 + t1} world`; `${t1 + t2 ** t2 + t1 } world`; -`${-t1 ** t2 - t1} world`; -`${-++t1 ** t2 - t1} world`; -`${-t1++ ** t2 - t1} world`; -`${!t1 ** t2 ** --t1 } world`; -`${typeof t1 ** t2 ** t1} world`; `${typeof (t1 ** t2 ** t1) } world`; -`${1 + typeof t1 ** t2 ** t1} world`; `${1 + typeof (t1 ** t2 ** t1) } world`; `${t1 ** t2}${t1 ** t2} world`; @@ -24,23 +18,11 @@ var s; `${t1 + t2 ** t1}${t1 + t2 ** t1} world`; `${t1 ** t2 + t1}${t1 ** t2 + t1} world`; `${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; -`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; -`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; -`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; -`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; -`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; `${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; -`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; `${t1 ** t2} hello world ${t1 ** t2} !!`; `${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; `${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; `${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; `${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; -`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; -`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; -`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; -`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; -`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; `${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; -`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts new file mode 100644 index 00000000000..d61d3c07450 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts @@ -0,0 +1,28 @@ +// @target: es5 + +var t1 = 10; +var t2 = 10; +var s; + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +// TempateHead & TemplateTail are empty +`${1 + typeof t1 ** t2 ** t1}`; +`${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}`; + +`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; +`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + +`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; +`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts new file mode 100644 index 00000000000..c7ee30a95b8 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts @@ -0,0 +1,28 @@ +// @target: es5 + +var t1 = 10; +var t2 = 10; +var s; + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +// With templateHead +`hello ${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1}`; +`hello ${1 + typeof t1 ** t2 ** t1}`; + +`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; +`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + +`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; +`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts new file mode 100644 index 00000000000..18ba31f8965 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts @@ -0,0 +1,28 @@ +// @target: es5 + +var t1 = 10; +var t2 = 10; +var s; + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +// With TemplateTail +`${-t1 ** t2 - t1} world`; +`${-++t1 ** t2 - t1} world`; +`${-t1++ ** t2 - t1} world`; +`${!t1 ** t2 ** --t1 } world`; +`${typeof t1 ** t2 ** t1} world`; +`${1 + typeof t1 ** t2 ** t1} world`; + +`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; +`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; +`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; +`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; +`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; +`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; + +`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; +`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; +`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; +`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; +`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; +`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts new file mode 100644 index 00000000000..a70948c23e2 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts @@ -0,0 +1,39 @@ +// @target: es5 + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +-1 ** 2; ++1 ** 2 +1 ** -2 ** 3; +1 ** -2 ** -3; +-1 ** -2 ** -3; +-(1 ** 2) ** 3; + +var temp = 10; + +-++temp ** 3; ++--temp ** 3; +-temp++ ** 3; ++temp-- ** 3; +1 ** -++temp ** 3; +1 ** +--temp ** 3; +1 ** -temp++ ** 3; +1 ** +temp-- ** 3; + +-3 ** temp++; +-3 ** temp--; +-3 ** ++temp; +-3 ** --temp; ++3 ** temp++; ++3 ** temp--; ++3 ** ++temp; ++3 ** --temp; +-3 ** temp++ ** 2; +-3 ** temp-- ** 2; +-3 ** ++temp ** 2; +-3 ** --temp ** 2; ++3 ** temp++ ** 2; ++3 ** temp-- ** 2; ++3 ** ++temp ** 2; ++3 ** --temp ** 2; + + diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts new file mode 100644 index 00000000000..da7cf7f0d85 --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts @@ -0,0 +1,63 @@ +// @target: es5 + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +var temp; + +delete --temp ** 3; +delete ++temp ** 3; +delete temp-- ** 3; +delete temp++ ** 3; + + +1 ** delete --temp ** 3; +1 ** delete ++temp ** 3; +1 ** delete temp-- ** 3; +1 ** delete temp++ ** 3; + +typeof --temp ** 3; +typeof temp-- ** 3; +typeof 3 ** 4; +typeof temp++ ** 4; +typeof temp-- ** 4; + +1 ** typeof --temp ** 3; +1 ** typeof temp-- ** 3; +1 ** typeof 3 ** 4; +1 ** typeof temp++ ** 4; +1 ** typeof temp-- ** 4; + +void --temp ** 3; +void temp-- ** 3; +void 3 ** 4; +void temp++ ** 4; +void temp-- ** 4; + +1 ** void --temp ** 3; +1 ** void temp-- ** 3; +1 ** void 3 ** 4; +1 ** void temp++ ** 4; +1 ** void temp-- ** 4 ; + +~ --temp ** 3; +~temp-- ** 3; +~3 ** 4; +~temp++ ** 4; +~temp-- ** 4; + +1 ** ~ --temp ** 3; +1 ** ~temp-- ** 3; +1 ** ~3 ** 4; +1 ** ~temp++ ** 4; +1 ** ~temp-- ** 4; + +! --temp ** 3; +!temp-- ** 3; +!3 ** 4; +!temp++ ** 4; +!temp-- ** 4; + +1 ** ! --temp ** 3; +1 ** !temp-- ** 3; +1 ** !3 ** 4; +1 ** !temp++ ** 4; +1 ** !temp-- ** 4; diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts new file mode 100644 index 00000000000..77d7c8b668a --- /dev/null +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts @@ -0,0 +1,36 @@ +var temp: any; + +// Error: incorrect type on left-hand side +(! --temp) ** 3; +(!temp--) ** 3; +(!3) ** 4; +(!temp++) ** 4; +(!temp--) ** 4; + +(! --temp) ** 3 ** 1; +(!temp--) ** 3 ** 1; +(!3) ** 4 ** 1; +(!temp++) ** 4 ** 1; +(!temp--) ** 4 ** 1; + +(typeof --temp) ** 3; +(typeof temp--) ** 3; +(typeof 3) ** 4; +(typeof temp++) ** 4; +(typeof temp--) ** 4; + +1 ** (typeof --temp) ** 3; +1 ** (typeof temp--) ** 3; +1 ** (typeof 3) ** 4; +1 ** (typeof temp++) ** 4; +1 ** (typeof temp--) ** 4; + +(delete --temp) ** 3; +(delete ++temp) ** 3; +(delete temp--) ** 3; +(delete temp++) ** 3; + +1 ** (delete --temp) ** 3; +1 ** (delete ++temp) ** 3; +1 ** (delete temp--) ** 3; +1 ** (delete temp++) ** 3; \ No newline at end of file From f8d6b344ee5eebcd951c0b2b3c3acd289614c2b3 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 19:03:41 -0700 Subject: [PATCH 051/121] Update baselines for exponentiation compound operator with indexing and property assignment --- ...dExponentiationAssignmentLHSIsReference.js | 5 +- ...poundExponentiationAssignmentLHSIsValue.js | 9 +- ...onentiationAssignmentWithIndexingOnLHS1.js | 32 ++++++ ...iationAssignmentWithIndexingOnLHS1.symbols | 51 +++++++++ ...ntiationAssignmentWithIndexingOnLHS1.types | 100 ++++++++++++++++++ ...onentiationAssignmentWithIndexingOnLHS2.js | 26 +++++ ...iationAssignmentWithIndexingOnLHS2.symbols | 51 +++++++++ ...ntiationAssignmentWithIndexingOnLHS2.types | 94 ++++++++++++++++ ...onentiationAssignmentWithIndexingOnLHS3.js | 29 +++++ ...iationAssignmentWithIndexingOnLHS3.symbols | 37 +++++++ ...ntiationAssignmentWithIndexingOnLHS3.types | 60 +++++++++++ ...onentiationAssignmentWithIndexingOnLHS4.js | 29 +++++ ...iationAssignmentWithIndexingOnLHS4.symbols | 60 +++++++++++ ...ntiationAssignmentWithIndexingOnLHS4.types | 90 ++++++++++++++++ ...onAssignmentWithPropertyAccessingOnLHS1.js | 27 +++++ ...ignmentWithPropertyAccessingOnLHS1.symbols | 59 +++++++++++ ...ssignmentWithPropertyAccessingOnLHS1.types | 90 ++++++++++++++++ 17 files changed, 844 insertions(+), 5 deletions(-) create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.symbols create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.types create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.symbols create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.types create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.symbols create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.types create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.symbols create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.types create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.symbols create mode 100644 tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.types diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js index 1d43494f367..cca4a7b55bf 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js @@ -36,8 +36,8 @@ function fn1(x2) { } // property accesses var x3; -x3.a = Math.pow(x3.a, value); -x3['a'] = Math.pow(x3['a'], value); +_a = x3, _a.a = Math.pow(_a.a, value); +_b = x3, _b['a'] = Math.pow(_b['a'], value); // parentheses, the contained expression is reference (x1) = Math.pow((x1), value); function fn2(x4) { @@ -45,3 +45,4 @@ function fn2(x4) { } (x3.a) = Math.pow((x3.a), value); (x3['a']) = Math.pow((x3['a']), value); +var _a, _b; diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index d638984ec37..ed825904d7a 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -140,13 +140,16 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { _super.call(this); - _super.prototype. = Math.pow(_super.prototype., value); + _a = _super.prototype, _a. = Math.pow(_a., value); + var _a; } Derived.prototype.foo = function () { - _super.prototype. = Math.pow(_super.prototype., value); + _a = _super.prototype, _a. = Math.pow(_a., value); + var _a; }; Derived.sfoo = function () { - _super. = Math.pow(_super., value); + _a = _super, _a. = Math.pow(_a., value); + var _a; }; return Derived; })(C); diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js new file mode 100644 index 00000000000..fb2a7d5a88d --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js @@ -0,0 +1,32 @@ +//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts] + +var array0 = [1, 2, 3] +var i0 = 0; +array0[++i0] **= 2; + +var array1 = [1, 2, 3] +var i1 = 0; +array1[++i1] **= array1[++i1] **= 2; + +var array2 = [1, 2, 3] +var i2 = 0; +array2[++i2] **= array2[++i2] ** 2; + +var array3 = [2, 2, 3]; +var j0 = 0, j1 = 1; +array3[j0++] **= array3[j1++] **= array3[j0++] **= 1; + +//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js] +var array0 = [1, 2, 3]; +var i0 = 0; +_a = array0, _i = ++i0, _a[_i] = Math.pow(_a[_i], 2); +var array1 = [1, 2, 3]; +var i1 = 0; +_b = array1, _c = ++i1, _b[_c] = Math.pow(_b[_c], (_d = array1, _e = ++i1, _d[_e] = Math.pow(_d[_e], 2))); +var array2 = [1, 2, 3]; +var i2 = 0; +_f = array2, _g = ++i2, _f[_g] = Math.pow(_f[_g], Math.pow(array2[++i2], 2)); +var array3 = [2, 2, 3]; +var j0 = 0, j1 = 1; +_h = array3, _j = j0++, _h[_j] = Math.pow(_h[_j], (_k = array3, _l = j1++, _k[_l] = Math.pow(_k[_l], (_m = array3, _o = j0++, _m[_o] = Math.pow(_m[_o], 1))))); +var _a, _i, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.symbols b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.symbols new file mode 100644 index 00000000000..83f71871ec0 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.symbols @@ -0,0 +1,51 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts === + +var array0 = [1, 2, 3] +>array0 : Symbol(array0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 1, 3)) + +var i0 = 0; +>i0 : Symbol(i0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 2, 3)) + +array0[++i0] **= 2; +>array0 : Symbol(array0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 1, 3)) +>i0 : Symbol(i0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 2, 3)) + +var array1 = [1, 2, 3] +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 5, 3)) + +var i1 = 0; +>i1 : Symbol(i1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 6, 3)) + +array1[++i1] **= array1[++i1] **= 2; +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 5, 3)) +>i1 : Symbol(i1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 6, 3)) +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 5, 3)) +>i1 : Symbol(i1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 6, 3)) + +var array2 = [1, 2, 3] +>array2 : Symbol(array2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 9, 3)) + +var i2 = 0; +>i2 : Symbol(i2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 10, 3)) + +array2[++i2] **= array2[++i2] ** 2; +>array2 : Symbol(array2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 9, 3)) +>i2 : Symbol(i2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 10, 3)) +>array2 : Symbol(array2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 9, 3)) +>i2 : Symbol(i2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 10, 3)) + +var array3 = [2, 2, 3]; +>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3)) + +var j0 = 0, j1 = 1; +>j0 : Symbol(j0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 3)) +>j1 : Symbol(j1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 11)) + +array3[j0++] **= array3[j1++] **= array3[j0++] **= 1; +>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3)) +>j0 : Symbol(j0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 3)) +>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3)) +>j1 : Symbol(j1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 11)) +>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3)) +>j0 : Symbol(j0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 3)) + diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.types b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.types new file mode 100644 index 00000000000..393499a931f --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.types @@ -0,0 +1,100 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts === + +var array0 = [1, 2, 3] +>array0 : number[] +>[1, 2, 3] : number[] +>1 : number +>2 : number +>3 : number + +var i0 = 0; +>i0 : number +>0 : number + +array0[++i0] **= 2; +>array0[++i0] **= 2 : number +>array0[++i0] : number +>array0 : number[] +>++i0 : number +>i0 : number +>2 : number + +var array1 = [1, 2, 3] +>array1 : number[] +>[1, 2, 3] : number[] +>1 : number +>2 : number +>3 : number + +var i1 = 0; +>i1 : number +>0 : number + +array1[++i1] **= array1[++i1] **= 2; +>array1[++i1] **= array1[++i1] **= 2 : number +>array1[++i1] : number +>array1 : number[] +>++i1 : number +>i1 : number +>array1[++i1] **= 2 : number +>array1[++i1] : number +>array1 : number[] +>++i1 : number +>i1 : number +>2 : number + +var array2 = [1, 2, 3] +>array2 : number[] +>[1, 2, 3] : number[] +>1 : number +>2 : number +>3 : number + +var i2 = 0; +>i2 : number +>0 : number + +array2[++i2] **= array2[++i2] ** 2; +>array2[++i2] **= array2[++i2] ** 2 : number +>array2[++i2] : number +>array2 : number[] +>++i2 : number +>i2 : number +>array2[++i2] ** 2 : number +>array2[++i2] : number +>array2 : number[] +>++i2 : number +>i2 : number +>2 : number + +var array3 = [2, 2, 3]; +>array3 : number[] +>[2, 2, 3] : number[] +>2 : number +>2 : number +>3 : number + +var j0 = 0, j1 = 1; +>j0 : number +>0 : number +>j1 : number +>1 : number + +array3[j0++] **= array3[j1++] **= array3[j0++] **= 1; +>array3[j0++] **= array3[j1++] **= array3[j0++] **= 1 : number +>array3[j0++] : number +>array3 : number[] +>j0++ : number +>j0 : number +>array3[j1++] **= array3[j0++] **= 1 : number +>array3[j1++] : number +>array3 : number[] +>j1++ : number +>j1 : number +>array3[j0++] **= 1 : number +>array3[j0++] : number +>array3 : number[] +>j0++ : number +>j0 : number +>1 : number + diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js new file mode 100644 index 00000000000..e2392e4074b --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js @@ -0,0 +1,26 @@ +//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts] +var globalCounter = 0; +function foo() { + globalCounter += 1; + return { 0: 2 }; +} +foo()[0] **= foo()[0]; +var result_foo1 = foo()[0] **= foo()[0]; +foo()[0] **= foo()[0] **= 2; +var result_foo2 = foo()[0] **= foo()[0] **= 2; +foo()[0] **= foo()[0] ** 2; +var result_foo3 = foo()[0] **= foo()[0] ** 2; + +//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js] +var globalCounter = 0; +function foo() { + globalCounter += 1; + return { 0: 2 }; +} +_a = foo(), _a[0] = Math.pow(_a[0], foo()[0]); +var result_foo1 = (_b = foo(), _b[0] = Math.pow(_b[0], foo()[0])); +_c = foo(), _c[0] = Math.pow(_c[0], (_d = foo(), _d[0] = Math.pow(_d[0], 2))); +var result_foo2 = (_e = foo(), _e[0] = Math.pow(_e[0], (_f = foo(), _f[0] = Math.pow(_f[0], 2)))); +_g = foo(), _g[0] = Math.pow(_g[0], Math.pow(foo()[0], 2)); +var result_foo3 = (_h = foo(), _h[0] = Math.pow(_h[0], Math.pow(foo()[0], 2))); +var _a, _b, _c, _d, _e, _f, _g, _h; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.symbols b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.symbols new file mode 100644 index 00000000000..923c0bac1ef --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.symbols @@ -0,0 +1,51 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts === +var globalCounter = 0; +>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 3)) + +function foo() { +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) + + globalCounter += 1; +>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 3)) + + return { 0: 2 }; +} +foo()[0] **= foo()[0]; +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) + +var result_foo1 = foo()[0] **= foo()[0]; +>result_foo1 : Symbol(result_foo1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 6, 3)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) + +foo()[0] **= foo()[0] **= 2; +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) + +var result_foo2 = foo()[0] **= foo()[0] **= 2; +>result_foo2 : Symbol(result_foo2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 8, 3)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) + +foo()[0] **= foo()[0] ** 2; +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) + +var result_foo3 = foo()[0] **= foo()[0] ** 2; +>result_foo3 : Symbol(result_foo3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 10, 3)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12)) + diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.types b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.types new file mode 100644 index 00000000000..c47f539baf2 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.types @@ -0,0 +1,94 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts === +var globalCounter = 0; +>globalCounter : number +>0 : number + +function foo() { +>foo : () => { 0: number; } + + globalCounter += 1; +>globalCounter += 1 : number +>globalCounter : number +>1 : number + + return { 0: 2 }; +>{ 0: 2 } : { 0: number; } +>2 : number +} +foo()[0] **= foo()[0]; +>foo()[0] **= foo()[0] : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number + +var result_foo1 = foo()[0] **= foo()[0]; +>result_foo1 : number +>foo()[0] **= foo()[0] : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number + +foo()[0] **= foo()[0] **= 2; +>foo()[0] **= foo()[0] **= 2 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>foo()[0] **= 2 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>2 : number + +var result_foo2 = foo()[0] **= foo()[0] **= 2; +>result_foo2 : number +>foo()[0] **= foo()[0] **= 2 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>foo()[0] **= 2 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>2 : number + +foo()[0] **= foo()[0] ** 2; +>foo()[0] **= foo()[0] ** 2 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>foo()[0] ** 2 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>2 : number + +var result_foo3 = foo()[0] **= foo()[0] ** 2; +>result_foo3 : number +>foo()[0] **= foo()[0] ** 2 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>foo()[0] ** 2 : number +>foo()[0] : number +>foo() : { 0: number; } +>foo : () => { 0: number; } +>0 : number +>2 : number + diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js new file mode 100644 index 00000000000..b4b8a8a1b1f --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js @@ -0,0 +1,29 @@ +//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts] + +var object = { + _0: 2, + get 0() { + return this._0; + }, + set 0(x: number) { + this._0 = x; + }, +} +object[0] **= object[0]; +object[0] **= object[0] **= 2; +object[0] **= object[0] ** 2; + +//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js] +var object = { + _0: 2, + get 0() { + return this._0; + }, + set 0(x) { + this._0 = x; + }, +}; +_a = object, _a[0] = Math.pow(_a[0], object[0]); +_b = object, _b[0] = Math.pow(_b[0], (_c = object, _c[0] = Math.pow(_c[0], 2))); +_d = object, _d[0] = Math.pow(_d[0], Math.pow(object[0], 2)); +var _a, _b, _c, _d; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.symbols b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.symbols new file mode 100644 index 00000000000..dbd5aa150dc --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.symbols @@ -0,0 +1,37 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts === + +var object = { +>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3)) + + _0: 2, +>_0 : Symbol(_0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 14)) + + get 0() { + return this._0; + }, + set 0(x: number) { +>x : Symbol(x, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 6, 10)) + + this._0 = x; +>x : Symbol(x, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 6, 10)) + + }, +} +object[0] **= object[0]; +>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6)) +>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6)) + +object[0] **= object[0] **= 2; +>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6)) +>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6)) + +object[0] **= object[0] ** 2; +>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6)) +>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3)) +>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6)) + diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.types b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.types new file mode 100644 index 00000000000..1877f391207 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.types @@ -0,0 +1,60 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts === + +var object = { +>object : { 0: number; _0: number; } +>{ _0: 2, get 0() { return this._0; }, set 0(x: number) { this._0 = x; },} : { 0: number; _0: number; } + + _0: 2, +>_0 : number +>2 : number + + get 0() { + return this._0; +>this._0 : any +>this : any +>_0 : any + + }, + set 0(x: number) { +>x : number + + this._0 = x; +>this._0 = x : number +>this._0 : any +>this : any +>_0 : any +>x : number + + }, +} +object[0] **= object[0]; +>object[0] **= object[0] : number +>object[0] : number +>object : { 0: number; _0: number; } +>0 : number +>object[0] : number +>object : { 0: number; _0: number; } +>0 : number + +object[0] **= object[0] **= 2; +>object[0] **= object[0] **= 2 : number +>object[0] : number +>object : { 0: number; _0: number; } +>0 : number +>object[0] **= 2 : number +>object[0] : number +>object : { 0: number; _0: number; } +>0 : number +>2 : number + +object[0] **= object[0] ** 2; +>object[0] **= object[0] ** 2 : number +>object[0] : number +>object : { 0: number; _0: number; } +>0 : number +>object[0] ** 2 : number +>object[0] : number +>object : { 0: number; _0: number; } +>0 : number +>2 : number + diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js new file mode 100644 index 00000000000..001f970b0d3 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js @@ -0,0 +1,29 @@ +//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts] + +var globalCounter = 0; +function incrementIdx(max: number) { + globalCounter += 1; + let idx = Math.floor(Math.random() * max); + return idx; +} + +var array1 = [1, 2, 3, 4, 5]; + +array1[incrementIdx(array1.length)] **= 3; + +array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2; + +array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2; + +//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js] +var globalCounter = 0; +function incrementIdx(max) { + globalCounter += 1; + var idx = Math.floor(Math.random() * max); + return idx; +} +var array1 = [1, 2, 3, 4, 5]; +_a = array1, _i = incrementIdx(array1.length), _a[_i] = Math.pow(_a[_i], 3); +_b = array1, _c = incrementIdx(array1.length), _b[_c] = Math.pow(_b[_c], (_d = array1, _e = incrementIdx(array1.length), _d[_e] = Math.pow(_d[_e], 2))); +_f = array1, _g = incrementIdx(array1.length), _f[_g] = Math.pow(_f[_g], Math.pow(array1[incrementIdx(array1.length)], 2)); +var _a, _i, _b, _c, _d, _e, _f, _g; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.symbols b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.symbols new file mode 100644 index 00000000000..5213a451d39 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.symbols @@ -0,0 +1,60 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts === + +var globalCounter = 0; +>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 3)) + +function incrementIdx(max: number) { +>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) +>max : Symbol(max, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 2, 22)) + + globalCounter += 1; +>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 3)) + + let idx = Math.floor(Math.random() * max); +>idx : Symbol(idx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 4, 7)) +>Math.floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) +>floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) +>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>max : Symbol(max, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 2, 22)) + + return idx; +>idx : Symbol(idx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 4, 7)) +} + +var array1 = [1, 2, 3, 4, 5]; +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) + +array1[incrementIdx(array1.length)] **= 3; +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) + +array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2; +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) + +array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2; +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) +>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) + diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.types b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.types new file mode 100644 index 00000000000..abfc69d7ca6 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.types @@ -0,0 +1,90 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts === + +var globalCounter = 0; +>globalCounter : number +>0 : number + +function incrementIdx(max: number) { +>incrementIdx : (max: number) => number +>max : number + + globalCounter += 1; +>globalCounter += 1 : number +>globalCounter : number +>1 : number + + let idx = Math.floor(Math.random() * max); +>idx : number +>Math.floor(Math.random() * max) : number +>Math.floor : (x: number) => number +>Math : Math +>floor : (x: number) => number +>Math.random() * max : number +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number +>max : number + + return idx; +>idx : number +} + +var array1 = [1, 2, 3, 4, 5]; +>array1 : number[] +>[1, 2, 3, 4, 5] : number[] +>1 : number +>2 : number +>3 : number +>4 : number +>5 : number + +array1[incrementIdx(array1.length)] **= 3; +>array1[incrementIdx(array1.length)] **= 3 : number +>array1[incrementIdx(array1.length)] : number +>array1 : number[] +>incrementIdx(array1.length) : number +>incrementIdx : (max: number) => number +>array1.length : number +>array1 : number[] +>length : number +>3 : number + +array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2; +>array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2 : number +>array1[incrementIdx(array1.length)] : number +>array1 : number[] +>incrementIdx(array1.length) : number +>incrementIdx : (max: number) => number +>array1.length : number +>array1 : number[] +>length : number +>array1[incrementIdx(array1.length)] **= 2 : number +>array1[incrementIdx(array1.length)] : number +>array1 : number[] +>incrementIdx(array1.length) : number +>incrementIdx : (max: number) => number +>array1.length : number +>array1 : number[] +>length : number +>2 : number + +array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2; +>array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2 : number +>array1[incrementIdx(array1.length)] : number +>array1 : number[] +>incrementIdx(array1.length) : number +>incrementIdx : (max: number) => number +>array1.length : number +>array1 : number[] +>length : number +>array1[incrementIdx(array1.length)] ** 2 : number +>array1[incrementIdx(array1.length)] : number +>array1 : number[] +>incrementIdx(array1.length) : number +>incrementIdx : (max: number) => number +>array1.length : number +>array1 : number[] +>length : number +>2 : number + diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js new file mode 100644 index 00000000000..5f51b432e20 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js @@ -0,0 +1,27 @@ +//// [emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts] + +var globalCounter = 0; +function foo() { + globalCounter += 1; + return { prop: 2 }; +} +foo().prop **= 2; +var result0 = foo().prop **= 2; +foo().prop **= foo().prop **= 2; +var result1 = foo().prop **= foo().prop **= 2; +foo().prop **= foo().prop ** 2; +var result2 = foo().prop **= foo().prop ** 2; + +//// [emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js] +var globalCounter = 0; +function foo() { + globalCounter += 1; + return { prop: 2 }; +} +_a = foo(), _a.prop = Math.pow(_a.prop, 2); +var result0 = (_b = foo(), _b.prop = Math.pow(_b.prop, 2)); +_c = foo(), _c.prop = Math.pow(_c.prop, (_d = foo(), _d.prop = Math.pow(_d.prop, 2))); +var result1 = (_e = foo(), _e.prop = Math.pow(_e.prop, (_f = foo(), _f.prop = Math.pow(_f.prop, 2)))); +_g = foo(), _g.prop = Math.pow(_g.prop, Math.pow(foo().prop, 2)); +var result2 = (_h = foo(), _h.prop = Math.pow(_h.prop, Math.pow(foo().prop, 2))); +var _a, _b, _c, _d, _e, _f, _g, _h; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.symbols b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.symbols new file mode 100644 index 00000000000..6bdf5f331fb --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.symbols @@ -0,0 +1,59 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts === + +var globalCounter = 0; +>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 3)) + +function foo() { +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) + + globalCounter += 1; +>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 3)) + + return { prop: 2 }; +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +} +foo().prop **= 2; +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) + +var result0 = foo().prop **= 2; +>result0 : Symbol(result0, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 7, 3)) +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) + +foo().prop **= foo().prop **= 2; +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) + +var result1 = foo().prop **= foo().prop **= 2; +>result1 : Symbol(result1, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 9, 3)) +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) + +foo().prop **= foo().prop ** 2; +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) + +var result2 = foo().prop **= foo().prop ** 2; +>result2 : Symbol(result2, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 11, 3)) +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) +>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22)) +>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12)) + diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.types b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.types new file mode 100644 index 00000000000..b57878e9443 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.types @@ -0,0 +1,90 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts === + +var globalCounter = 0; +>globalCounter : number +>0 : number + +function foo() { +>foo : () => { prop: number; } + + globalCounter += 1; +>globalCounter += 1 : number +>globalCounter : number +>1 : number + + return { prop: 2 }; +>{ prop: 2 } : { prop: number; } +>prop : number +>2 : number +} +foo().prop **= 2; +>foo().prop **= 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>2 : number + +var result0 = foo().prop **= 2; +>result0 : number +>foo().prop **= 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>2 : number + +foo().prop **= foo().prop **= 2; +>foo().prop **= foo().prop **= 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>foo().prop **= 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>2 : number + +var result1 = foo().prop **= foo().prop **= 2; +>result1 : number +>foo().prop **= foo().prop **= 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>foo().prop **= 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>2 : number + +foo().prop **= foo().prop ** 2; +>foo().prop **= foo().prop ** 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>foo().prop ** 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>2 : number + +var result2 = foo().prop **= foo().prop ** 2; +>result2 : number +>foo().prop **= foo().prop ** 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>foo().prop ** 2 : number +>foo().prop : number +>foo() : { prop: number; } +>foo : () => { prop: number; } +>prop : number +>2 : number + From bf970be0b3de1674f2d6fe41719fea8d9b613ba4 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 19:05:14 -0700 Subject: [PATCH 052/121] Add baselines for downlevel emit exponentiation and ES7 emit of exponentiation --- .../emitCompoundExponentiationOperator1ES7.js | 43 + ...CompoundExponentiationOperator1ES7.symbols | 83 ++ ...itCompoundExponentiationOperator1ES7.types | 171 +++ .../emitCompoundExponentiationOperator2ES7.js | 47 + ...CompoundExponentiationOperator2ES7.symbols | 76 ++ ...itCompoundExponentiationOperator2ES7.types | 185 +++ .../reference/emitExponentiationOperator1.js | 18 +- .../emitExponentiationOperator1.symbols | 9 +- .../emitExponentiationOperator1.types | 66 +- .../emitExponentiationOperator1ES7.js | 62 + .../emitExponentiationOperator1ES7.symbols | 34 + .../emitExponentiationOperator1ES7.types | 207 ++++ .../reference/emitExponentiationOperator2.js | 45 +- .../emitExponentiationOperator2.symbols | 60 +- .../emitExponentiationOperator2.types | 164 +-- .../emitExponentiationOperator2ES7.js | 104 ++ .../emitExponentiationOperator2ES7.symbols | 152 +++ .../emitExponentiationOperator2ES7.types | 344 ++++++ .../reference/emitExponentiationOperator3.js | 282 ++--- .../emitExponentiationOperator3.symbols | 305 ++--- .../emitExponentiationOperator3.types | 1012 ++++------------- .../emitExponentiationOperator3ES7.js | 78 ++ .../emitExponentiationOperator3ES7.symbols | 107 ++ .../emitExponentiationOperator3ES7.types | 314 +++++ .../reference/emitExponentiationOperator4.js | 68 ++ .../emitExponentiationOperator4.symbols | 81 ++ .../emitExponentiationOperator4.types | 245 ++++ .../emitExponentiationOperator4ES7.js | 68 ++ .../emitExponentiationOperator4ES7.symbols | 81 ++ .../emitExponentiationOperator4ES7.types | 245 ++++ 30 files changed, 3253 insertions(+), 1503 deletions(-) create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator1ES7.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator1ES7.symbols create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator1ES7.types create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator2ES7.js create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator2ES7.symbols create mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator2ES7.types create mode 100644 tests/baselines/reference/emitExponentiationOperator1ES7.js create mode 100644 tests/baselines/reference/emitExponentiationOperator1ES7.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperator1ES7.types create mode 100644 tests/baselines/reference/emitExponentiationOperator2ES7.js create mode 100644 tests/baselines/reference/emitExponentiationOperator2ES7.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperator2ES7.types create mode 100644 tests/baselines/reference/emitExponentiationOperator3ES7.js create mode 100644 tests/baselines/reference/emitExponentiationOperator3ES7.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperator3ES7.types create mode 100644 tests/baselines/reference/emitExponentiationOperator4.js create mode 100644 tests/baselines/reference/emitExponentiationOperator4.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperator4.types create mode 100644 tests/baselines/reference/emitExponentiationOperator4ES7.js create mode 100644 tests/baselines/reference/emitExponentiationOperator4ES7.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperator4ES7.types diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.js b/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.js new file mode 100644 index 00000000000..a1039555694 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.js @@ -0,0 +1,43 @@ +//// [emitCompoundExponentiationOperator1ES7.ts] + +var comp: number; + +comp **= 1; +comp **= comp ** comp; +comp **= comp ** comp ** 2; +comp **= comp ** comp + 2; +comp **= comp ** comp - 2; +comp **= comp ** comp * 2; +comp **= comp ** comp / 2; +comp **= comp ** comp % 2; +comp **= (comp - 2) ** 5; +comp **= (comp + 2) ** 5; +comp **= (comp * 2) ** 5; +comp **= (comp / 2) ** 5; +comp **= (comp % 2) ** 5; +comp **= comp ** (5 + 2); +comp **= comp ** (5 - 2); +comp **= comp ** (5 * 2); +comp **= comp ** (5 / 2); +comp **= comp ** (5 % 2); + +//// [emitCompoundExponentiationOperator1ES7.js] +var comp; +comp **= 1; +comp **= comp ** comp; +comp **= comp ** comp ** 2; +comp **= comp ** comp + 2; +comp **= comp ** comp - 2; +comp **= comp ** comp * 2; +comp **= comp ** comp / 2; +comp **= comp ** comp % 2; +comp **= (comp - 2) ** 5; +comp **= (comp + 2) ** 5; +comp **= (comp * 2) ** 5; +comp **= (comp / 2) ** 5; +comp **= (comp % 2) ** 5; +comp **= comp ** (5 + 2); +comp **= comp ** (5 - 2); +comp **= comp ** (5 * 2); +comp **= comp ** (5 / 2); +comp **= comp ** (5 % 2); diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.symbols b/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.symbols new file mode 100644 index 00000000000..07037222df8 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.symbols @@ -0,0 +1,83 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts === + +var comp: number; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= 1; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** comp; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** comp ** 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** comp + 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** comp - 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** comp * 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** comp / 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** comp % 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= (comp - 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= (comp + 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= (comp * 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= (comp / 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= (comp % 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** (5 + 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** (5 - 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** (5 * 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** (5 / 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + +comp **= comp ** (5 % 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.types b/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.types new file mode 100644 index 00000000000..6937e381a22 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.types @@ -0,0 +1,171 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts === + +var comp: number; +>comp : number + +comp **= 1; +>comp **= 1 : number +>comp : number +>1 : number + +comp **= comp ** comp; +>comp **= comp ** comp : number +>comp : number +>comp ** comp : number +>comp : number +>comp : number + +comp **= comp ** comp ** 2; +>comp **= comp ** comp ** 2 : number +>comp : number +>comp ** comp ** 2 : number +>comp : number +>comp ** 2 : number +>comp : number +>2 : number + +comp **= comp ** comp + 2; +>comp **= comp ** comp + 2 : number +>comp : number +>comp ** comp + 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= comp ** comp - 2; +>comp **= comp ** comp - 2 : number +>comp : number +>comp ** comp - 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= comp ** comp * 2; +>comp **= comp ** comp * 2 : number +>comp : number +>comp ** comp * 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= comp ** comp / 2; +>comp **= comp ** comp / 2 : number +>comp : number +>comp ** comp / 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= comp ** comp % 2; +>comp **= comp ** comp % 2 : number +>comp : number +>comp ** comp % 2 : number +>comp ** comp : number +>comp : number +>comp : number +>2 : number + +comp **= (comp - 2) ** 5; +>comp **= (comp - 2) ** 5 : number +>comp : number +>(comp - 2) ** 5 : number +>(comp - 2) : number +>comp - 2 : number +>comp : number +>2 : number +>5 : number + +comp **= (comp + 2) ** 5; +>comp **= (comp + 2) ** 5 : number +>comp : number +>(comp + 2) ** 5 : number +>(comp + 2) : number +>comp + 2 : number +>comp : number +>2 : number +>5 : number + +comp **= (comp * 2) ** 5; +>comp **= (comp * 2) ** 5 : number +>comp : number +>(comp * 2) ** 5 : number +>(comp * 2) : number +>comp * 2 : number +>comp : number +>2 : number +>5 : number + +comp **= (comp / 2) ** 5; +>comp **= (comp / 2) ** 5 : number +>comp : number +>(comp / 2) ** 5 : number +>(comp / 2) : number +>comp / 2 : number +>comp : number +>2 : number +>5 : number + +comp **= (comp % 2) ** 5; +>comp **= (comp % 2) ** 5 : number +>comp : number +>(comp % 2) ** 5 : number +>(comp % 2) : number +>comp % 2 : number +>comp : number +>2 : number +>5 : number + +comp **= comp ** (5 + 2); +>comp **= comp ** (5 + 2) : number +>comp : number +>comp ** (5 + 2) : number +>comp : number +>(5 + 2) : number +>5 + 2 : number +>5 : number +>2 : number + +comp **= comp ** (5 - 2); +>comp **= comp ** (5 - 2) : number +>comp : number +>comp ** (5 - 2) : number +>comp : number +>(5 - 2) : number +>5 - 2 : number +>5 : number +>2 : number + +comp **= comp ** (5 * 2); +>comp **= comp ** (5 * 2) : number +>comp : number +>comp ** (5 * 2) : number +>comp : number +>(5 * 2) : number +>5 * 2 : number +>5 : number +>2 : number + +comp **= comp ** (5 / 2); +>comp **= comp ** (5 / 2) : number +>comp : number +>comp ** (5 / 2) : number +>comp : number +>(5 / 2) : number +>5 / 2 : number +>5 : number +>2 : number + +comp **= comp ** (5 % 2); +>comp **= comp ** (5 % 2) : number +>comp : number +>comp ** (5 % 2) : number +>comp : number +>(5 % 2) : number +>5 % 2 : number +>5 : number +>2 : number + diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.js b/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.js new file mode 100644 index 00000000000..ac504150bec --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.js @@ -0,0 +1,47 @@ +//// [emitCompoundExponentiationOperator2ES7.ts] + +var comp: number; + +comp **= 1; +comp **= comp **= 1; +comp **= comp **= 1 + 2; +comp **= comp **= 1 - 2; +comp **= comp **= 1 * 2; +comp **= comp **= 1 / 2; + +comp **= comp **= (1 + 2); +comp **= comp **= (1 - 2); +comp **= comp **= (1 * 2); +comp **= comp **= (1 / 2); + +comp **= comp **= 1 + 2 ** 3; +comp **= comp **= 1 - 2 ** 4; +comp **= comp **= 1 * 2 ** 5; +comp **= comp **= 1 / 2 ** 6; + +comp **= comp **= (1 + 2) ** 3; +comp **= comp **= (1 - 2) ** 4; +comp **= comp **= (1 * 2) ** 5; +comp **= comp **= (1 / 2) ** 6; + + +//// [emitCompoundExponentiationOperator2ES7.js] +var comp; +comp **= 1; +comp **= comp **= 1; +comp **= comp **= 1 + 2; +comp **= comp **= 1 - 2; +comp **= comp **= 1 * 2; +comp **= comp **= 1 / 2; +comp **= comp **= (1 + 2); +comp **= comp **= (1 - 2); +comp **= comp **= (1 * 2); +comp **= comp **= (1 / 2); +comp **= comp **= 1 + 2 ** 3; +comp **= comp **= 1 - 2 ** 4; +comp **= comp **= 1 * 2 ** 5; +comp **= comp **= 1 / 2 ** 6; +comp **= comp **= (1 + 2) ** 3; +comp **= comp **= (1 - 2) ** 4; +comp **= comp **= (1 * 2) ** 5; +comp **= comp **= (1 / 2) ** 6; diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.symbols b/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.symbols new file mode 100644 index 00000000000..b3e56cbdbae --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.symbols @@ -0,0 +1,76 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts === + +var comp: number; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= 1; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= 1; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= 1 + 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= 1 - 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= 1 * 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= 1 / 2; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= (1 + 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= (1 - 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= (1 * 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= (1 / 2); +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= 1 + 2 ** 3; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= 1 - 2 ** 4; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= 1 * 2 ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= 1 / 2 ** 6; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= (1 + 2) ** 3; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= (1 - 2) ** 4; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= (1 * 2) ** 5; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + +comp **= comp **= (1 / 2) ** 6; +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) +>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.types b/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.types new file mode 100644 index 00000000000..97a61ec4af4 --- /dev/null +++ b/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.types @@ -0,0 +1,185 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts === + +var comp: number; +>comp : number + +comp **= 1; +>comp **= 1 : number +>comp : number +>1 : number + +comp **= comp **= 1; +>comp **= comp **= 1 : number +>comp : number +>comp **= 1 : number +>comp : number +>1 : number + +comp **= comp **= 1 + 2; +>comp **= comp **= 1 + 2 : number +>comp : number +>comp **= 1 + 2 : number +>comp : number +>1 + 2 : number +>1 : number +>2 : number + +comp **= comp **= 1 - 2; +>comp **= comp **= 1 - 2 : number +>comp : number +>comp **= 1 - 2 : number +>comp : number +>1 - 2 : number +>1 : number +>2 : number + +comp **= comp **= 1 * 2; +>comp **= comp **= 1 * 2 : number +>comp : number +>comp **= 1 * 2 : number +>comp : number +>1 * 2 : number +>1 : number +>2 : number + +comp **= comp **= 1 / 2; +>comp **= comp **= 1 / 2 : number +>comp : number +>comp **= 1 / 2 : number +>comp : number +>1 / 2 : number +>1 : number +>2 : number + +comp **= comp **= (1 + 2); +>comp **= comp **= (1 + 2) : number +>comp : number +>comp **= (1 + 2) : number +>comp : number +>(1 + 2) : number +>1 + 2 : number +>1 : number +>2 : number + +comp **= comp **= (1 - 2); +>comp **= comp **= (1 - 2) : number +>comp : number +>comp **= (1 - 2) : number +>comp : number +>(1 - 2) : number +>1 - 2 : number +>1 : number +>2 : number + +comp **= comp **= (1 * 2); +>comp **= comp **= (1 * 2) : number +>comp : number +>comp **= (1 * 2) : number +>comp : number +>(1 * 2) : number +>1 * 2 : number +>1 : number +>2 : number + +comp **= comp **= (1 / 2); +>comp **= comp **= (1 / 2) : number +>comp : number +>comp **= (1 / 2) : number +>comp : number +>(1 / 2) : number +>1 / 2 : number +>1 : number +>2 : number + +comp **= comp **= 1 + 2 ** 3; +>comp **= comp **= 1 + 2 ** 3 : number +>comp : number +>comp **= 1 + 2 ** 3 : number +>comp : number +>1 + 2 ** 3 : number +>1 : number +>2 ** 3 : number +>2 : number +>3 : number + +comp **= comp **= 1 - 2 ** 4; +>comp **= comp **= 1 - 2 ** 4 : number +>comp : number +>comp **= 1 - 2 ** 4 : number +>comp : number +>1 - 2 ** 4 : number +>1 : number +>2 ** 4 : number +>2 : number +>4 : number + +comp **= comp **= 1 * 2 ** 5; +>comp **= comp **= 1 * 2 ** 5 : number +>comp : number +>comp **= 1 * 2 ** 5 : number +>comp : number +>1 * 2 ** 5 : number +>1 : number +>2 ** 5 : number +>2 : number +>5 : number + +comp **= comp **= 1 / 2 ** 6; +>comp **= comp **= 1 / 2 ** 6 : number +>comp : number +>comp **= 1 / 2 ** 6 : number +>comp : number +>1 / 2 ** 6 : number +>1 : number +>2 ** 6 : number +>2 : number +>6 : number + +comp **= comp **= (1 + 2) ** 3; +>comp **= comp **= (1 + 2) ** 3 : number +>comp : number +>comp **= (1 + 2) ** 3 : number +>comp : number +>(1 + 2) ** 3 : number +>(1 + 2) : number +>1 + 2 : number +>1 : number +>2 : number +>3 : number + +comp **= comp **= (1 - 2) ** 4; +>comp **= comp **= (1 - 2) ** 4 : number +>comp : number +>comp **= (1 - 2) ** 4 : number +>comp : number +>(1 - 2) ** 4 : number +>(1 - 2) : number +>1 - 2 : number +>1 : number +>2 : number +>4 : number + +comp **= comp **= (1 * 2) ** 5; +>comp **= comp **= (1 * 2) ** 5 : number +>comp : number +>comp **= (1 * 2) ** 5 : number +>comp : number +>(1 * 2) ** 5 : number +>(1 * 2) : number +>1 * 2 : number +>1 : number +>2 : number +>5 : number + +comp **= comp **= (1 / 2) ** 6; +>comp **= comp **= (1 / 2) ** 6 : number +>comp : number +>comp **= (1 / 2) ** 6 : number +>comp : number +>(1 / 2) ** 6 : number +>(1 / 2) : number +>1 / 2 : number +>1 : number +>2 : number +>6 : number + diff --git a/tests/baselines/reference/emitExponentiationOperator1.js b/tests/baselines/reference/emitExponentiationOperator1.js index 7c37137b83f..2b270ef708b 100644 --- a/tests/baselines/reference/emitExponentiationOperator1.js +++ b/tests/baselines/reference/emitExponentiationOperator1.js @@ -1,12 +1,13 @@ //// [emitExponentiationOperator1.ts] +1 ** -2; 1 ** 2; +(-1) ** 2 1 ** 2 ** 3; -1 ** -2 ** 3; -1 ** -2 ** -3; --1 ** -2 ** -3; --(1 ** 2) ** 3; +1 ** 2 ** -3; 1 ** -(2 ** 3); +(-(1 ** 2)) ** 3; +(-(1 ** 2)) ** -3; 1 ** 2 + 3; 1 ** 2 - 3; @@ -32,13 +33,14 @@ (2 / 3) ** 4; //// [emitExponentiationOperator1.js] +Math.pow(1, -2); Math.pow(1, 2); +Math.pow((-1), 2); Math.pow(1, Math.pow(2, 3)); -Math.pow(1, -Math.pow(2, 3)); -Math.pow(1, -Math.pow(2, -3)); --Math.pow(1, -Math.pow(2, -3)); --Math.pow((Math.pow(1, 2)), 3); +Math.pow(1, Math.pow(2, -3)); Math.pow(1, -(Math.pow(2, 3))); +Math.pow((-(Math.pow(1, 2))), 3); +Math.pow((-(Math.pow(1, 2))), -3); Math.pow(1, 2) + 3; Math.pow(1, 2) - 3; Math.pow(1, 2) * 3; diff --git a/tests/baselines/reference/emitExponentiationOperator1.symbols b/tests/baselines/reference/emitExponentiationOperator1.symbols index 5e2bd27b02c..5fb3419d419 100644 --- a/tests/baselines/reference/emitExponentiationOperator1.symbols +++ b/tests/baselines/reference/emitExponentiationOperator1.symbols @@ -1,12 +1,13 @@ === tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts === +No type information for this code.1 ** -2; No type information for this code.1 ** 2; +No type information for this code.(-1) ** 2 No type information for this code.1 ** 2 ** 3; -No type information for this code.1 ** -2 ** 3; -No type information for this code.1 ** -2 ** -3; -No type information for this code.-1 ** -2 ** -3; -No type information for this code.-(1 ** 2) ** 3; +No type information for this code.1 ** 2 ** -3; No type information for this code.1 ** -(2 ** 3); +No type information for this code.(-(1 ** 2)) ** 3; +No type information for this code.(-(1 ** 2)) ** -3; No type information for this code. No type information for this code.1 ** 2 + 3; No type information for this code.1 ** 2 - 3; diff --git a/tests/baselines/reference/emitExponentiationOperator1.types b/tests/baselines/reference/emitExponentiationOperator1.types index de81d0b2e8f..a2dc4f16901 100644 --- a/tests/baselines/reference/emitExponentiationOperator1.types +++ b/tests/baselines/reference/emitExponentiationOperator1.types @@ -1,10 +1,23 @@ === tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts === +1 ** -2; +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number + 1 ** 2; >1 ** 2 : number >1 : number >2 : number +(-1) ** 2 +>(-1) ** 2 : number +>(-1) : number +>-1 : number +>1 : number +>2 : number + 1 ** 2 ** 3; >1 ** 2 ** 3 : number >1 : number @@ -12,42 +25,14 @@ >2 : number >3 : number -1 ** -2 ** 3; ->1 ** -2 ** 3 : number +1 ** 2 ** -3; +>1 ** 2 ** -3 : number >1 : number ->-2 ** 3 : number ->2 ** 3 : number ->2 : number ->3 : number - -1 ** -2 ** -3; ->1 ** -2 ** -3 : number ->1 : number ->-2 ** -3 : number >2 ** -3 : number >2 : number >-3 : number >3 : number --1 ** -2 ** -3; ->-1 ** -2 ** -3 : number ->1 ** -2 ** -3 : number ->1 : number ->-2 ** -3 : number ->2 ** -3 : number ->2 : number ->-3 : number ->3 : number - --(1 ** 2) ** 3; ->-(1 ** 2) ** 3 : number ->(1 ** 2) ** 3 : number ->(1 ** 2) : number ->1 ** 2 : number ->1 : number ->2 : number ->3 : number - 1 ** -(2 ** 3); >1 ** -(2 ** 3) : number >1 : number @@ -57,6 +42,27 @@ >2 : number >3 : number +(-(1 ** 2)) ** 3; +>(-(1 ** 2)) ** 3 : number +>(-(1 ** 2)) : number +>-(1 ** 2) : number +>(1 ** 2) : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +(-(1 ** 2)) ** -3; +>(-(1 ** 2)) ** -3 : number +>(-(1 ** 2)) : number +>-(1 ** 2) : number +>(1 ** 2) : number +>1 ** 2 : number +>1 : number +>2 : number +>-3 : number +>3 : number + 1 ** 2 + 3; >1 ** 2 + 3 : number >1 ** 2 : number diff --git a/tests/baselines/reference/emitExponentiationOperator1ES7.js b/tests/baselines/reference/emitExponentiationOperator1ES7.js new file mode 100644 index 00000000000..f9e4924d4b5 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator1ES7.js @@ -0,0 +1,62 @@ +//// [emitExponentiationOperator1ES7.ts] + +1 ** -2; +1 ** 2; +(-1) ** 2 +1 ** 2 ** 3; +1 ** 2 ** -3; +1 ** -(2 ** 3); +(-(1 ** 2)) ** 3; +(-(1 ** 2)) ** -3; + +1 ** 2 + 3; +1 ** 2 - 3; +1 ** 2 * 3; +1 ** 2 / 3; +1 ** 2 % 3; + +1 ** -2 + 3; +1 ** -2 - 3; +1 ** -2 * 3; +1 ** -2 / 3; +1 ** -2 % 3; + +2 + 3 ** 3; +2 - 3 ** 3; +2 * 3 ** 3; +2 / 3 ** 3; +2 % 3 ** 3; + +(2 + 3) ** 4; +(2 - 3) ** 4; +(2 * 3) ** 4; +(2 / 3) ** 4; + +//// [emitExponentiationOperator1ES7.js] +1 ** -2; +1 ** 2; +(-1) ** 2; +1 ** 2 ** 3; +1 ** 2 ** -3; +1 ** -(2 ** 3); +(-(1 ** 2)) ** 3; +(-(1 ** 2)) ** -3; +1 ** 2 + 3; +1 ** 2 - 3; +1 ** 2 * 3; +1 ** 2 / 3; +1 ** 2 % 3; +1 ** -2 + 3; +1 ** -2 - 3; +1 ** -2 * 3; +1 ** -2 / 3; +1 ** -2 % 3; +2 + 3 ** 3; +2 - 3 ** 3; +2 * 3 ** 3; +2 / 3 ** 3; +2 % 3 ** 3; +(2 + 3) ** 4; +(2 - 3) ** 4; +(2 * 3) ** 4; +(2 / 3) ** 4; diff --git a/tests/baselines/reference/emitExponentiationOperator1ES7.symbols b/tests/baselines/reference/emitExponentiationOperator1ES7.symbols new file mode 100644 index 00000000000..c0cc50e7083 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator1ES7.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts === + +No type information for this code.1 ** -2; +No type information for this code.1 ** 2; +No type information for this code.(-1) ** 2 +No type information for this code.1 ** 2 ** 3; +No type information for this code.1 ** 2 ** -3; +No type information for this code.1 ** -(2 ** 3); +No type information for this code.(-(1 ** 2)) ** 3; +No type information for this code.(-(1 ** 2)) ** -3; +No type information for this code. +No type information for this code.1 ** 2 + 3; +No type information for this code.1 ** 2 - 3; +No type information for this code.1 ** 2 * 3; +No type information for this code.1 ** 2 / 3; +No type information for this code.1 ** 2 % 3; +No type information for this code. +No type information for this code.1 ** -2 + 3; +No type information for this code.1 ** -2 - 3; +No type information for this code.1 ** -2 * 3; +No type information for this code.1 ** -2 / 3; +No type information for this code.1 ** -2 % 3; +No type information for this code. +No type information for this code.2 + 3 ** 3; +No type information for this code.2 - 3 ** 3; +No type information for this code.2 * 3 ** 3; +No type information for this code.2 / 3 ** 3; +No type information for this code.2 % 3 ** 3; +No type information for this code. +No type information for this code.(2 + 3) ** 4; +No type information for this code.(2 - 3) ** 4; +No type information for this code.(2 * 3) ** 4; +No type information for this code.(2 / 3) ** 4; +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/emitExponentiationOperator1ES7.types b/tests/baselines/reference/emitExponentiationOperator1ES7.types new file mode 100644 index 00000000000..067d992c446 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator1ES7.types @@ -0,0 +1,207 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts === + +1 ** -2; +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number + +1 ** 2; +>1 ** 2 : number +>1 : number +>2 : number + +(-1) ** 2 +>(-1) ** 2 : number +>(-1) : number +>-1 : number +>1 : number +>2 : number + +1 ** 2 ** 3; +>1 ** 2 ** 3 : number +>1 : number +>2 ** 3 : number +>2 : number +>3 : number + +1 ** 2 ** -3; +>1 ** 2 ** -3 : number +>1 : number +>2 ** -3 : number +>2 : number +>-3 : number +>3 : number + +1 ** -(2 ** 3); +>1 ** -(2 ** 3) : number +>1 : number +>-(2 ** 3) : number +>(2 ** 3) : number +>2 ** 3 : number +>2 : number +>3 : number + +(-(1 ** 2)) ** 3; +>(-(1 ** 2)) ** 3 : number +>(-(1 ** 2)) : number +>-(1 ** 2) : number +>(1 ** 2) : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +(-(1 ** 2)) ** -3; +>(-(1 ** 2)) ** -3 : number +>(-(1 ** 2)) : number +>-(1 ** 2) : number +>(1 ** 2) : number +>1 ** 2 : number +>1 : number +>2 : number +>-3 : number +>3 : number + +1 ** 2 + 3; +>1 ** 2 + 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** 2 - 3; +>1 ** 2 - 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** 2 * 3; +>1 ** 2 * 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** 2 / 3; +>1 ** 2 / 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** 2 % 3; +>1 ** 2 % 3 : number +>1 ** 2 : number +>1 : number +>2 : number +>3 : number + +1 ** -2 + 3; +>1 ** -2 + 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +1 ** -2 - 3; +>1 ** -2 - 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +1 ** -2 * 3; +>1 ** -2 * 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +1 ** -2 / 3; +>1 ** -2 / 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +1 ** -2 % 3; +>1 ** -2 % 3 : number +>1 ** -2 : number +>1 : number +>-2 : number +>2 : number +>3 : number + +2 + 3 ** 3; +>2 + 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +2 - 3 ** 3; +>2 - 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +2 * 3 ** 3; +>2 * 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +2 / 3 ** 3; +>2 / 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +2 % 3 ** 3; +>2 % 3 ** 3 : number +>2 : number +>3 ** 3 : number +>3 : number +>3 : number + +(2 + 3) ** 4; +>(2 + 3) ** 4 : number +>(2 + 3) : number +>2 + 3 : number +>2 : number +>3 : number +>4 : number + +(2 - 3) ** 4; +>(2 - 3) ** 4 : number +>(2 - 3) : number +>2 - 3 : number +>2 : number +>3 : number +>4 : number + +(2 * 3) ** 4; +>(2 * 3) ** 4 : number +>(2 * 3) : number +>2 * 3 : number +>2 : number +>3 : number +>4 : number + +(2 / 3) ** 4; +>(2 / 3) ** 4 : number +>(2 / 3) : number +>2 / 3 : number +>2 : number +>3 : number +>4 : number + diff --git a/tests/baselines/reference/emitExponentiationOperator2.js b/tests/baselines/reference/emitExponentiationOperator2.js index 3a93ee9ec9c..46f80b44bba 100644 --- a/tests/baselines/reference/emitExponentiationOperator2.js +++ b/tests/baselines/reference/emitExponentiationOperator2.js @@ -11,13 +11,10 @@ temp-- ** 3; --temp * temp ** 3; --temp / temp ** 3; --temp % temp ** 3; --++temp ** 3; -+--temp ** 3; - temp-- ** 3; temp++ ** 3; --temp++ ** 3; -+temp-- ** 3; +temp-- ** -temp; +temp++ ** +temp; temp-- + temp ** 3; temp-- - temp ** 3; @@ -40,27 +37,11 @@ temp-- % temp ** 3; 3 ** --temp; 3 ** temp++; 3 ** temp--; --3 ** temp++; --3 ** temp--; --3 ** ++temp; --3 ** --temp; -+3 ** temp++; -+3 ** temp--; -+3 ** ++temp; -+3 ** --temp 3 ** ++temp ** 2; 3 ** --temp ** 2; 3 ** temp++ ** 2; 3 ** temp-- ** 2; --3 ** temp++ ** 2; --3 ** temp-- ** 2; --3 ** ++temp ** 2; --3 ** --temp ** 2; -+3 ** temp++ ** 2; -+3 ** temp-- ** 2; -+3 ** ++temp ** 2; -+3 ** --temp ** 2; 3 ** ++temp + 2; 3 ** ++temp - 2; @@ -85,12 +66,10 @@ Math.pow(temp--, 3); --temp * Math.pow(temp, 3); --temp / Math.pow(temp, 3); --temp % Math.pow(temp, 3); --Math.pow(++temp, 3); -+Math.pow(--temp, 3); Math.pow(temp--, 3); Math.pow(temp++, 3); --Math.pow(temp++, 3); -+Math.pow(temp--, 3); +Math.pow(temp--, -temp); +Math.pow(temp++, +temp); temp-- + Math.pow(temp, 3); temp-- - Math.pow(temp, 3); temp-- * Math.pow(temp, 3); @@ -109,26 +88,10 @@ Math.pow(3, ++temp); Math.pow(3, --temp); Math.pow(3, temp++); Math.pow(3, temp--); --Math.pow(3, temp++); --Math.pow(3, temp--); --Math.pow(3, ++temp); --Math.pow(3, --temp); -+Math.pow(3, temp++); -+Math.pow(3, temp--); -+Math.pow(3, ++temp); -+Math.pow(3, --temp); Math.pow(3, Math.pow(++temp, 2)); Math.pow(3, Math.pow(--temp, 2)); Math.pow(3, Math.pow(temp++, 2)); Math.pow(3, Math.pow(temp--, 2)); --Math.pow(3, Math.pow(temp++, 2)); --Math.pow(3, Math.pow(temp--, 2)); --Math.pow(3, Math.pow(++temp, 2)); --Math.pow(3, Math.pow(--temp, 2)); -+Math.pow(3, Math.pow(temp++, 2)); -+Math.pow(3, Math.pow(temp--, 2)); -+Math.pow(3, Math.pow(++temp, 2)); -+Math.pow(3, Math.pow(--temp, 2)); Math.pow(3, ++temp) + 2; Math.pow(3, ++temp) - 2; Math.pow(3, ++temp) * 2; diff --git a/tests/baselines/reference/emitExponentiationOperator2.symbols b/tests/baselines/reference/emitExponentiationOperator2.symbols index 58aa20a1d5f..c3d9e4b25df 100644 --- a/tests/baselines/reference/emitExponentiationOperator2.symbols +++ b/tests/baselines/reference/emitExponentiationOperator2.symbols @@ -35,22 +35,18 @@ temp-- ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) --++temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - -+--temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - temp-- ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) temp++ ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) --temp++ ** 3; +temp-- ** -temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) -+temp-- ** 3; +temp++ ** +temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) temp-- + temp ** 3; @@ -112,30 +108,6 @@ temp-- % temp ** 3; 3 ** temp--; >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) --3 ** temp++; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - --3 ** temp--; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - --3 ** ++temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - --3 ** --temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - -+3 ** temp++; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - -+3 ** temp--; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - -+3 ** ++temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - -+3 ** --temp ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - 3 ** ++temp ** 2; >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) @@ -148,30 +120,6 @@ temp-- % temp ** 3; 3 ** temp-- ** 2; >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) --3 ** temp++ ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - --3 ** temp-- ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - --3 ** ++temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - --3 ** --temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - -+3 ** temp++ ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - -+3 ** temp-- ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - -+3 ** ++temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - -+3 ** --temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) - 3 ** ++temp + 2; >temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3)) diff --git a/tests/baselines/reference/emitExponentiationOperator2.types b/tests/baselines/reference/emitExponentiationOperator2.types index edd40614a36..cd8773624a7 100644 --- a/tests/baselines/reference/emitExponentiationOperator2.types +++ b/tests/baselines/reference/emitExponentiationOperator2.types @@ -68,20 +68,6 @@ temp-- ** 3; >temp : number >3 : number --++temp ** 3; ->-++temp ** 3 : number ->++temp ** 3 : number ->++temp : number ->temp : number ->3 : number - -+--temp ** 3; ->+--temp ** 3 : number ->--temp ** 3 : number ->--temp : number ->temp : number ->3 : number - temp-- ** 3; >temp-- ** 3 : number >temp-- : number @@ -94,19 +80,19 @@ temp++ ** 3; >temp : number >3 : number --temp++ ** 3; ->-temp++ ** 3 : number ->temp++ ** 3 : number ->temp++ : number ->temp : number ->3 : number - -+temp-- ** 3; ->+temp-- ** 3 : number ->temp-- ** 3 : number +temp-- ** -temp; +>temp-- ** -temp : number >temp-- : number >temp : number ->3 : number +>-temp : number +>temp : number + +temp++ ** +temp; +>temp++ ** +temp : number +>temp++ : number +>temp : number +>+temp : number +>temp : number temp-- + temp ** 3; >temp-- + temp ** 3 : number @@ -244,62 +230,6 @@ temp-- % temp ** 3; >temp-- : number >temp : number --3 ** temp++; ->-3 ** temp++ : number ->3 ** temp++ : number ->3 : number ->temp++ : number ->temp : number - --3 ** temp--; ->-3 ** temp-- : number ->3 ** temp-- : number ->3 : number ->temp-- : number ->temp : number - --3 ** ++temp; ->-3 ** ++temp : number ->3 ** ++temp : number ->3 : number ->++temp : number ->temp : number - --3 ** --temp; ->-3 ** --temp : number ->3 ** --temp : number ->3 : number ->--temp : number ->temp : number - -+3 ** temp++; ->+3 ** temp++ : number ->3 ** temp++ : number ->3 : number ->temp++ : number ->temp : number - -+3 ** temp--; ->+3 ** temp-- : number ->3 ** temp-- : number ->3 : number ->temp-- : number ->temp : number - -+3 ** ++temp; ->+3 ** ++temp : number ->3 ** ++temp : number ->3 : number ->++temp : number ->temp : number - -+3 ** --temp ->+3 ** --temp : number ->3 ** --temp : number ->3 : number ->--temp : number ->temp : number - 3 ** ++temp ** 2; >3 ** ++temp ** 2 : number >3 : number @@ -332,78 +262,6 @@ temp-- % temp ** 3; >temp : number >2 : number --3 ** temp++ ** 2; ->-3 ** temp++ ** 2 : number ->3 ** temp++ ** 2 : number ->3 : number ->temp++ ** 2 : number ->temp++ : number ->temp : number ->2 : number - --3 ** temp-- ** 2; ->-3 ** temp-- ** 2 : number ->3 ** temp-- ** 2 : number ->3 : number ->temp-- ** 2 : number ->temp-- : number ->temp : number ->2 : number - --3 ** ++temp ** 2; ->-3 ** ++temp ** 2 : number ->3 ** ++temp ** 2 : number ->3 : number ->++temp ** 2 : number ->++temp : number ->temp : number ->2 : number - --3 ** --temp ** 2; ->-3 ** --temp ** 2 : number ->3 ** --temp ** 2 : number ->3 : number ->--temp ** 2 : number ->--temp : number ->temp : number ->2 : number - -+3 ** temp++ ** 2; ->+3 ** temp++ ** 2 : number ->3 ** temp++ ** 2 : number ->3 : number ->temp++ ** 2 : number ->temp++ : number ->temp : number ->2 : number - -+3 ** temp-- ** 2; ->+3 ** temp-- ** 2 : number ->3 ** temp-- ** 2 : number ->3 : number ->temp-- ** 2 : number ->temp-- : number ->temp : number ->2 : number - -+3 ** ++temp ** 2; ->+3 ** ++temp ** 2 : number ->3 ** ++temp ** 2 : number ->3 : number ->++temp ** 2 : number ->++temp : number ->temp : number ->2 : number - -+3 ** --temp ** 2; ->+3 ** --temp ** 2 : number ->3 ** --temp ** 2 : number ->3 : number ->--temp ** 2 : number ->--temp : number ->temp : number ->2 : number - 3 ** ++temp + 2; >3 ** ++temp + 2 : number >3 ** ++temp : number diff --git a/tests/baselines/reference/emitExponentiationOperator2ES7.js b/tests/baselines/reference/emitExponentiationOperator2ES7.js new file mode 100644 index 00000000000..89cef39ebf3 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator2ES7.js @@ -0,0 +1,104 @@ +//// [emitExponentiationOperator2ES7.ts] + +var temp = 10; + +++temp ** 3; +--temp ** 3; +temp++ ** 3; +temp-- ** 3; +--temp + temp ** 3; +--temp - temp ** 3; +--temp * temp ** 3; +--temp / temp ** 3; +--temp % temp ** 3; +temp-- ** 3; +temp++ ** 3; +temp-- ** -temp; +temp++ ** +temp; + +temp-- + temp ** 3; +temp-- - temp ** 3; +temp-- * temp ** 3; +temp-- / temp ** 3; +temp-- % temp ** 3; + +--temp + 2 ** 3; +--temp - 2 ** 3; +--temp * 2 ** 3; +--temp / 2 ** 3; +--temp % 2 ** 3; + +++temp + 2 ** 3; +++temp - 2 ** 3; +++temp * 2 ** 3; +++temp / 2 ** 3; + +3 ** ++temp; +3 ** --temp; +3 ** temp++; +3 ** temp--; + +3 ** ++temp ** 2; +3 ** --temp ** 2; +3 ** temp++ ** 2; +3 ** temp-- ** 2; + +3 ** ++temp + 2; +3 ** ++temp - 2; +3 ** ++temp * 2; +3 ** ++temp / 2; +3 ** ++temp % 2; + +3 ** --temp + 2; +3 ** --temp - 2; +3 ** --temp * 2; +3 ** --temp / 2; +3 ** --temp % 2; + +//// [emitExponentiationOperator2ES7.js] +var temp = 10; +++temp ** 3; +--temp ** 3; +temp++ ** 3; +temp-- ** 3; +--temp + temp ** 3; +--temp - temp ** 3; +--temp * temp ** 3; +--temp / temp ** 3; +--temp % temp ** 3; +temp-- ** 3; +temp++ ** 3; +temp-- ** -temp; +temp++ ** +temp; +temp-- + temp ** 3; +temp-- - temp ** 3; +temp-- * temp ** 3; +temp-- / temp ** 3; +temp-- % temp ** 3; +--temp + 2 ** 3; +--temp - 2 ** 3; +--temp * 2 ** 3; +--temp / 2 ** 3; +--temp % 2 ** 3; +++temp + 2 ** 3; +++temp - 2 ** 3; +++temp * 2 ** 3; +++temp / 2 ** 3; +3 ** ++temp; +3 ** --temp; +3 ** temp++; +3 ** temp--; +3 ** ++temp ** 2; +3 ** --temp ** 2; +3 ** temp++ ** 2; +3 ** temp-- ** 2; +3 ** ++temp + 2; +3 ** ++temp - 2; +3 ** ++temp * 2; +3 ** ++temp / 2; +3 ** ++temp % 2; +3 ** --temp + 2; +3 ** --temp - 2; +3 ** --temp * 2; +3 ** --temp / 2; +3 ** --temp % 2; diff --git a/tests/baselines/reference/emitExponentiationOperator2ES7.symbols b/tests/baselines/reference/emitExponentiationOperator2ES7.symbols new file mode 100644 index 00000000000..0e0ce52a297 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator2ES7.symbols @@ -0,0 +1,152 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts === + +var temp = 10; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp + temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp - temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp * temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp / temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp % temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp-- ** -temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp++ ** +temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp-- + temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp-- - temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp-- * temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp-- / temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +temp-- % temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp + 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp - 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp * 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp / 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +--temp % 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +++temp + 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +++temp - 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +++temp * 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +++temp / 2 ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** ++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** --temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** ++temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** --temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** temp++ ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** temp-- ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** ++temp + 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** ++temp - 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** ++temp * 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** ++temp / 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** ++temp % 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** --temp + 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** --temp - 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** --temp * 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** --temp / 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + +3 ** --temp % 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperator2ES7.types b/tests/baselines/reference/emitExponentiationOperator2ES7.types new file mode 100644 index 00000000000..73fe09c6d87 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator2ES7.types @@ -0,0 +1,344 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts === + +var temp = 10; +>temp : number +>10 : number + +++temp ** 3; +>++temp ** 3 : number +>++temp : number +>temp : number +>3 : number + +--temp ** 3; +>--temp ** 3 : number +>--temp : number +>temp : number +>3 : number + +temp++ ** 3; +>temp++ ** 3 : number +>temp++ : number +>temp : number +>3 : number + +temp-- ** 3; +>temp-- ** 3 : number +>temp-- : number +>temp : number +>3 : number + +--temp + temp ** 3; +>--temp + temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp - temp ** 3; +>--temp - temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp * temp ** 3; +>--temp * temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp / temp ** 3; +>--temp / temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp % temp ** 3; +>--temp % temp ** 3 : number +>--temp : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +temp-- ** 3; +>temp-- ** 3 : number +>temp-- : number +>temp : number +>3 : number + +temp++ ** 3; +>temp++ ** 3 : number +>temp++ : number +>temp : number +>3 : number + +temp-- ** -temp; +>temp-- ** -temp : number +>temp-- : number +>temp : number +>-temp : number +>temp : number + +temp++ ** +temp; +>temp++ ** +temp : number +>temp++ : number +>temp : number +>+temp : number +>temp : number + +temp-- + temp ** 3; +>temp-- + temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +temp-- - temp ** 3; +>temp-- - temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +temp-- * temp ** 3; +>temp-- * temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +temp-- / temp ** 3; +>temp-- / temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +temp-- % temp ** 3; +>temp-- % temp ** 3 : number +>temp-- : number +>temp : number +>temp ** 3 : number +>temp : number +>3 : number + +--temp + 2 ** 3; +>--temp + 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +--temp - 2 ** 3; +>--temp - 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +--temp * 2 ** 3; +>--temp * 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +--temp / 2 ** 3; +>--temp / 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +--temp % 2 ** 3; +>--temp % 2 ** 3 : number +>--temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +++temp + 2 ** 3; +>++temp + 2 ** 3 : number +>++temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +++temp - 2 ** 3; +>++temp - 2 ** 3 : number +>++temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +++temp * 2 ** 3; +>++temp * 2 ** 3 : number +>++temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +++temp / 2 ** 3; +>++temp / 2 ** 3 : number +>++temp : number +>temp : number +>2 ** 3 : number +>2 : number +>3 : number + +3 ** ++temp; +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number + +3 ** --temp; +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number + +3 ** temp++; +>3 ** temp++ : number +>3 : number +>temp++ : number +>temp : number + +3 ** temp--; +>3 ** temp-- : number +>3 : number +>temp-- : number +>temp : number + +3 ** ++temp ** 2; +>3 ** ++temp ** 2 : number +>3 : number +>++temp ** 2 : number +>++temp : number +>temp : number +>2 : number + +3 ** --temp ** 2; +>3 ** --temp ** 2 : number +>3 : number +>--temp ** 2 : number +>--temp : number +>temp : number +>2 : number + +3 ** temp++ ** 2; +>3 ** temp++ ** 2 : number +>3 : number +>temp++ ** 2 : number +>temp++ : number +>temp : number +>2 : number + +3 ** temp-- ** 2; +>3 ** temp-- ** 2 : number +>3 : number +>temp-- ** 2 : number +>temp-- : number +>temp : number +>2 : number + +3 ** ++temp + 2; +>3 ** ++temp + 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** ++temp - 2; +>3 ** ++temp - 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** ++temp * 2; +>3 ** ++temp * 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** ++temp / 2; +>3 ** ++temp / 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** ++temp % 2; +>3 ** ++temp % 2 : number +>3 ** ++temp : number +>3 : number +>++temp : number +>temp : number +>2 : number + +3 ** --temp + 2; +>3 ** --temp + 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + +3 ** --temp - 2; +>3 ** --temp - 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + +3 ** --temp * 2; +>3 ** --temp * 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + +3 ** --temp / 2; +>3 ** --temp / 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + +3 ** --temp % 2; +>3 ** --temp % 2 : number +>3 ** --temp : number +>3 : number +>--temp : number +>temp : number +>2 : number + diff --git a/tests/baselines/reference/emitExponentiationOperator3.js b/tests/baselines/reference/emitExponentiationOperator3.js index 7cb92dfae63..ceb08c868db 100644 --- a/tests/baselines/reference/emitExponentiationOperator3.js +++ b/tests/baselines/reference/emitExponentiationOperator3.js @@ -1,218 +1,78 @@ //// [emitExponentiationOperator3.ts] -var temp: any; -delete --temp ** 3; -delete ++temp ** 3; -delete temp-- ** 3; -delete temp++ ** 3; -delete -++temp ** 3; -delete -temp++ ** 3; -delete -temp-- ** 3; +var temp = 10; -delete --temp ** 3 ** 1; -delete ++temp ** 3 ** 1; -delete temp-- ** 3 ** 1; -delete temp++ ** 3 ** 1; -delete -++temp ** 3 ** 1; -delete -temp++ ** 3 ** 1; -delete -temp-- ** 3 ** 1;; +(-++temp) ** 3; +(+--temp) ** 3; +(-temp++) ** 3; +(+temp--) ** 3; +(-(1 ** ++temp)) ** 3; +(-(1 ** --temp)) ** 3; +(-(1 ** temp++)) ** 3; +(-(1 ** temp--)) ** 3; ---temp ** 3; -++temp ** 3; -temp-- ** 3; -temp++ ** 3; --++temp ** 3; --temp++ ** 3; --temp-- ** 3; +(-3) ** temp++; +(-3) ** temp--; +(-3) ** ++temp; +(-3) ** --temp; +(+3) ** temp++; +(+3) ** temp--; +(+3) ** ++temp; +(+3) ** --temp; +(-3) ** temp++ ** 2; +(-3) ** temp-- ** 2; +(-3) ** ++temp ** 2; +(-3) ** --temp ** 2; +(+3) ** temp++ ** 2; +(+3) ** temp-- ** 2; +(+3) ** ++temp ** 2; +(+3) ** --temp ** 2; ---temp ** 3 ** 1; -++temp ** 3 ** 1; -temp-- ** 3 ** 1; -temp++ ** 3 ** 1; --++temp ** 3 ** 1; --temp++ ** 3 ** 1; --temp-- ** 3 ** 1; - -typeof --temp ** 3; -typeof temp-- ** 3; -typeof 3 ** 4; -typeof temp++ ** 4; -typeof temp-- ** 4; -typeof -3 ** 4; -typeof -++temp ** 4; -typeof -temp++ ** 4; -typeof -temp-- ** 4; - -typeof --temp ** 3 ** 1; -typeof temp-- ** 3 ** 1; -typeof 3 ** 4 ** 1; -typeof temp++ ** 4 ** 1; -typeof temp-- ** 4 ** 1; -typeof -3 ** 4 ** 1; -typeof -++temp ** 4 ** 1; -typeof -temp++ ** 4 ** 1; -typeof -temp-- ** 4 ** 1; - -void --temp ** 3; -void temp-- ** 3; -void 3 ** 4; -void temp++ ** 4; -void temp-- ** 4; -void -3 ** 4; -void -++temp ** 4; -void -temp++ ** 4; -void -temp-- ** 4; - -void --temp ** 3 ** 1; -void temp-- ** 3 ** 1; -void 3 ** 4 ** 1; -void temp++ ** 4 ** 1; -void temp-- ** 4 ** 1; -void -3 ** 4 ** 1; -void -++temp ** 4 ** 1; -void -temp++ ** 4 ** 1; -void -temp-- ** 4 ** 1; - -~ --temp ** 3; -~ temp-- ** 3; -~ 3 ** 4; -~ temp++ ** 4; -~ temp-- ** 4; -~ -3 ** 4; -~ -++temp ** 4; -~ -temp++ ** 4; -~ -temp-- ** 4; - -~ --temp ** 3 ** 1; -~ temp-- ** 3 ** 1; -~ 3 ** 4 ** 1; -~ temp++ ** 4 ** 1; -~ temp-- ** 4 ** 1; -~ -3 ** 4 ** 1; -~ -++temp ** 4 ** 1; -~ -temp++ ** 4 ** 1; -~ -temp-- ** 4 ** 1; - -! --temp ** 3; -! temp-- ** 3; -! 3 ** 4; -! temp++ ** 4; -! temp-- ** 4; -! -3 ** 4; -! -++temp ** 4; -! -temp++ ** 4; -! -temp-- ** 4; - -! --temp ** 3 ** 1; -! temp-- ** 3 ** 1; -! 3 ** 4 ** 1; -! temp++ ** 4 ** 1; -! temp-- ** 4 ** 1; -! -3 ** 4 ** 1; -! -++temp ** 4 ** 1; -! -temp++ ** 4 ** 1; -! -temp-- ** 4 ** 1; +3 ** -temp++; +3 ** -temp--; +3 ** -++temp; +3 ** +--temp; +3 ** (-temp++) ** 2; +3 ** (-temp--) ** 2; +3 ** (+temp++) ** 2; +3 ** (+temp--) ** 2; +3 ** (-++temp) ** 2; +3 ** (+--temp) ** 2; + //// [emitExponentiationOperator3.js] -var temp; -delete Math.pow(--temp, 3); -delete Math.pow(++temp, 3); -delete Math.pow(temp--, 3); -delete Math.pow(temp++, 3); -delete -Math.pow(++temp, 3); -delete -Math.pow(temp++, 3); -delete -Math.pow(temp--, 3); -delete Math.pow(--temp, Math.pow(3, 1)); -delete Math.pow(++temp, Math.pow(3, 1)); -delete Math.pow(temp--, Math.pow(3, 1)); -delete Math.pow(temp++, Math.pow(3, 1)); -delete -Math.pow(++temp, Math.pow(3, 1)); -delete -Math.pow(temp++, Math.pow(3, 1)); -delete -Math.pow(temp--, Math.pow(3, 1)); -; -Math.pow(--temp, 3); -Math.pow(++temp, 3); -Math.pow(temp--, 3); -Math.pow(temp++, 3); --Math.pow(++temp, 3); --Math.pow(temp++, 3); --Math.pow(temp--, 3); -Math.pow(--temp, Math.pow(3, 1)); -Math.pow(++temp, Math.pow(3, 1)); -Math.pow(temp--, Math.pow(3, 1)); -Math.pow(temp++, Math.pow(3, 1)); --Math.pow(++temp, Math.pow(3, 1)); --Math.pow(temp++, Math.pow(3, 1)); --Math.pow(temp--, Math.pow(3, 1)); -typeof Math.pow(--temp, 3); -typeof Math.pow(temp--, 3); -typeof Math.pow(3, 4); -typeof Math.pow(temp++, 4); -typeof Math.pow(temp--, 4); -typeof -Math.pow(3, 4); -typeof -Math.pow(++temp, 4); -typeof -Math.pow(temp++, 4); -typeof -Math.pow(temp--, 4); -typeof Math.pow(--temp, Math.pow(3, 1)); -typeof Math.pow(temp--, Math.pow(3, 1)); -typeof Math.pow(3, Math.pow(4, 1)); -typeof Math.pow(temp++, Math.pow(4, 1)); -typeof Math.pow(temp--, Math.pow(4, 1)); -typeof -Math.pow(3, Math.pow(4, 1)); -typeof -Math.pow(++temp, Math.pow(4, 1)); -typeof -Math.pow(temp++, Math.pow(4, 1)); -typeof -Math.pow(temp--, Math.pow(4, 1)); -void Math.pow(--temp, 3); -void Math.pow(temp--, 3); -void Math.pow(3, 4); -void Math.pow(temp++, 4); -void Math.pow(temp--, 4); -void -Math.pow(3, 4); -void -Math.pow(++temp, 4); -void -Math.pow(temp++, 4); -void -Math.pow(temp--, 4); -void Math.pow(--temp, Math.pow(3, 1)); -void Math.pow(temp--, Math.pow(3, 1)); -void Math.pow(3, Math.pow(4, 1)); -void Math.pow(temp++, Math.pow(4, 1)); -void Math.pow(temp--, Math.pow(4, 1)); -void -Math.pow(3, Math.pow(4, 1)); -void -Math.pow(++temp, Math.pow(4, 1)); -void -Math.pow(temp++, Math.pow(4, 1)); -void -Math.pow(temp--, Math.pow(4, 1)); -~Math.pow(--temp, 3); -~Math.pow(temp--, 3); -~Math.pow(3, 4); -~Math.pow(temp++, 4); -~Math.pow(temp--, 4); -~-Math.pow(3, 4); -~-Math.pow(++temp, 4); -~-Math.pow(temp++, 4); -~-Math.pow(temp--, 4); -~Math.pow(--temp, Math.pow(3, 1)); -~Math.pow(temp--, Math.pow(3, 1)); -~Math.pow(3, Math.pow(4, 1)); -~Math.pow(temp++, Math.pow(4, 1)); -~Math.pow(temp--, Math.pow(4, 1)); -~-Math.pow(3, Math.pow(4, 1)); -~-Math.pow(++temp, Math.pow(4, 1)); -~-Math.pow(temp++, Math.pow(4, 1)); -~-Math.pow(temp--, Math.pow(4, 1)); -!Math.pow(--temp, 3); -!Math.pow(temp--, 3); -!Math.pow(3, 4); -!Math.pow(temp++, 4); -!Math.pow(temp--, 4); -!-Math.pow(3, 4); -!-Math.pow(++temp, 4); -!-Math.pow(temp++, 4); -!-Math.pow(temp--, 4); -!Math.pow(--temp, Math.pow(3, 1)); -!Math.pow(temp--, Math.pow(3, 1)); -!Math.pow(3, Math.pow(4, 1)); -!Math.pow(temp++, Math.pow(4, 1)); -!Math.pow(temp--, Math.pow(4, 1)); -!-Math.pow(3, Math.pow(4, 1)); -!-Math.pow(++temp, Math.pow(4, 1)); -!-Math.pow(temp++, Math.pow(4, 1)); -!-Math.pow(temp--, Math.pow(4, 1)); +var temp = 10; +Math.pow((-++temp), 3); +Math.pow((+--temp), 3); +Math.pow((-temp++), 3); +Math.pow((+temp--), 3); +Math.pow((-(Math.pow(1, ++temp))), 3); +Math.pow((-(Math.pow(1, --temp))), 3); +Math.pow((-(Math.pow(1, temp++))), 3); +Math.pow((-(Math.pow(1, temp--))), 3); +Math.pow((-3), temp++); +Math.pow((-3), temp--); +Math.pow((-3), ++temp); +Math.pow((-3), --temp); +Math.pow((+3), temp++); +Math.pow((+3), temp--); +Math.pow((+3), ++temp); +Math.pow((+3), --temp); +Math.pow((-3), Math.pow(temp++, 2)); +Math.pow((-3), Math.pow(temp--, 2)); +Math.pow((-3), Math.pow(++temp, 2)); +Math.pow((-3), Math.pow(--temp, 2)); +Math.pow((+3), Math.pow(temp++, 2)); +Math.pow((+3), Math.pow(temp--, 2)); +Math.pow((+3), Math.pow(++temp, 2)); +Math.pow((+3), Math.pow(--temp, 2)); +Math.pow(3, -temp++); +Math.pow(3, -temp--); +Math.pow(3, -++temp); +Math.pow(3, +--temp); +Math.pow(3, Math.pow((-temp++), 2)); +Math.pow(3, Math.pow((-temp--), 2)); +Math.pow(3, Math.pow((+temp++), 2)); +Math.pow(3, Math.pow((+temp--), 2)); +Math.pow(3, Math.pow((-++temp), 2)); +Math.pow(3, Math.pow((+--temp), 2)); diff --git a/tests/baselines/reference/emitExponentiationOperator3.symbols b/tests/baselines/reference/emitExponentiationOperator3.symbols index 68b70711695..23111743855 100644 --- a/tests/baselines/reference/emitExponentiationOperator3.symbols +++ b/tests/baselines/reference/emitExponentiationOperator3.symbols @@ -1,272 +1,107 @@ === tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts === -var temp: any; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) -delete --temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +var temp = 10; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete ++temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-++temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+--temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete temp++ ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-temp++) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete -++temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete -temp++ ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-(1 ** ++temp)) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete -temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-(1 ** --temp)) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete --temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-(1 ** temp++)) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete ++temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-(1 ** temp--)) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete temp-- ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-3) ** temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete temp++ ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-3) ** temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete -++temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-3) ** ++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete -temp++ ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-3) ** --temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -delete -temp-- ** 3 ** 1;; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+3) ** temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) ---temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+3) ** temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -++temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+3) ** ++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+3) ** --temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -temp++ ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-3) ** temp++ ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) --++temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-3) ** temp-- ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) --temp++ ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-3) ** ++temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) --temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(-3) ** --temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) ---temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+3) ** temp++ ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -++temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+3) ** temp-- ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -temp-- ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+3) ** ++temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -temp++ ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +(+3) ** --temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) --++temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** -temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) --temp++ ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** -temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) --temp-- ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** -++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -typeof --temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** +--temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -typeof temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** (-temp++) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -typeof 3 ** 4; -typeof temp++ ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** (-temp--) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -typeof temp-- ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** (+temp++) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -typeof -3 ** 4; -typeof -++temp ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** (+temp--) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -typeof -temp++ ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** (-++temp) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) -typeof -temp-- ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -typeof --temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -typeof temp-- ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -typeof 3 ** 4 ** 1; -typeof temp++ ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -typeof temp-- ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -typeof -3 ** 4 ** 1; -typeof -++temp ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -typeof -temp++ ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -typeof -temp-- ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void --temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void 3 ** 4; -void temp++ ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void temp-- ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void -3 ** 4; -void -++temp ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void -temp++ ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void -temp-- ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void --temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void temp-- ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void 3 ** 4 ** 1; -void temp++ ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void temp-- ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void -3 ** 4 ** 1; -void -++temp ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void -temp++ ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -void -temp-- ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ --temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ 3 ** 4; -~ temp++ ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ temp-- ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ -3 ** 4; -~ -++temp ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ -temp++ ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ -temp-- ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ --temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ temp-- ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ 3 ** 4 ** 1; -~ temp++ ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ temp-- ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ -3 ** 4 ** 1; -~ -++temp ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ -temp++ ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -~ -temp-- ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! --temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! 3 ** 4; -! temp++ ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! temp-- ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! -3 ** 4; -! -++temp ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! -temp++ ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! -temp-- ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! --temp ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! temp-- ** 3 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! 3 ** 4 ** 1; -! temp++ ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! temp-- ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! -3 ** 4 ** 1; -! -++temp ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! -temp++ ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) - -! -temp-- ** 4 ** 1; ->temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 0, 3)) +3 ** (+--temp) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3)) diff --git a/tests/baselines/reference/emitExponentiationOperator3.types b/tests/baselines/reference/emitExponentiationOperator3.types index 8e455b7cd68..cc4c5374d05 100644 --- a/tests/baselines/reference/emitExponentiationOperator3.types +++ b/tests/baselines/reference/emitExponentiationOperator3.types @@ -1,832 +1,314 @@ === tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts === -var temp: any; ->temp : any -delete --temp ** 3; ->delete --temp ** 3 : boolean ->--temp ** 3 : number +var temp = 10; +>temp : number +>10 : number + +(-++temp) ** 3; +>(-++temp) ** 3 : number +>(-++temp) : number +>-++temp : number +>++temp : number +>temp : number +>3 : number + +(+--temp) ** 3; +>(+--temp) ** 3 : number +>(+--temp) : number +>+--temp : number >--temp : number ->temp : any +>temp : number >3 : number -delete ++temp ** 3; ->delete ++temp ** 3 : boolean ->++temp ** 3 : number ->++temp : number ->temp : any ->3 : number - -delete temp-- ** 3; ->delete temp-- ** 3 : boolean ->temp-- ** 3 : number ->temp-- : number ->temp : any ->3 : number - -delete temp++ ** 3; ->delete temp++ ** 3 : boolean ->temp++ ** 3 : number +(-temp++) ** 3; +>(-temp++) ** 3 : number +>(-temp++) : number +>-temp++ : number >temp++ : number ->temp : any +>temp : number >3 : number -delete -++temp ** 3; ->delete -++temp ** 3 : boolean ->-++temp ** 3 : number ->++temp ** 3 : number ->++temp : number ->temp : any ->3 : number - -delete -temp++ ** 3; ->delete -temp++ ** 3 : boolean ->-temp++ ** 3 : number ->temp++ ** 3 : number ->temp++ : number ->temp : any ->3 : number - -delete -temp-- ** 3; ->delete -temp-- ** 3 : boolean ->-temp-- ** 3 : number ->temp-- ** 3 : number +(+temp--) ** 3; +>(+temp--) ** 3 : number +>(+temp--) : number +>+temp-- : number >temp-- : number ->temp : any +>temp : number >3 : number -delete --temp ** 3 ** 1; ->delete --temp ** 3 ** 1 : boolean ->--temp ** 3 ** 1 : number +(-(1 ** ++temp)) ** 3; +>(-(1 ** ++temp)) ** 3 : number +>(-(1 ** ++temp)) : number +>-(1 ** ++temp) : number +>(1 ** ++temp) : number +>1 ** ++temp : number +>1 : number +>++temp : number +>temp : number +>3 : number + +(-(1 ** --temp)) ** 3; +>(-(1 ** --temp)) ** 3 : number +>(-(1 ** --temp)) : number +>-(1 ** --temp) : number +>(1 ** --temp) : number +>1 ** --temp : number +>1 : number >--temp : number ->temp : any ->3 ** 1 : number +>temp : number >3 : number ->1 : number -delete ++temp ** 3 ** 1; ->delete ++temp ** 3 ** 1 : boolean ->++temp ** 3 ** 1 : number ->++temp : number ->temp : any ->3 ** 1 : number ->3 : number +(-(1 ** temp++)) ** 3; +>(-(1 ** temp++)) ** 3 : number +>(-(1 ** temp++)) : number +>-(1 ** temp++) : number +>(1 ** temp++) : number +>1 ** temp++ : number >1 : number - -delete temp-- ** 3 ** 1; ->delete temp-- ** 3 ** 1 : boolean ->temp-- ** 3 ** 1 : number ->temp-- : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - -delete temp++ ** 3 ** 1; ->delete temp++ ** 3 ** 1 : boolean ->temp++ ** 3 ** 1 : number >temp++ : number ->temp : any ->3 ** 1 : number +>temp : number >3 : number ->1 : number -delete -++temp ** 3 ** 1; ->delete -++temp ** 3 ** 1 : boolean ->-++temp ** 3 ** 1 : number ->++temp ** 3 ** 1 : number ->++temp : number ->temp : any ->3 ** 1 : number ->3 : number +(-(1 ** temp--)) ** 3; +>(-(1 ** temp--)) ** 3 : number +>(-(1 ** temp--)) : number +>-(1 ** temp--) : number +>(1 ** temp--) : number +>1 ** temp-- : number >1 : number - -delete -temp++ ** 3 ** 1; ->delete -temp++ ** 3 ** 1 : boolean ->-temp++ ** 3 ** 1 : number ->temp++ ** 3 ** 1 : number ->temp++ : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - -delete -temp-- ** 3 ** 1;; ->delete -temp-- ** 3 ** 1 : boolean ->-temp-- ** 3 ** 1 : number ->temp-- ** 3 ** 1 : number >temp-- : number ->temp : any ->3 ** 1 : number +>temp : number >3 : number ->1 : number ---temp ** 3; ->--temp ** 3 : number ->--temp ** 3 : number +(-3) ** temp++; +>(-3) ** temp++ : number +>(-3) : number +>-3 : number +>3 : number +>temp++ : number +>temp : number + +(-3) ** temp--; +>(-3) ** temp-- : number +>(-3) : number +>-3 : number +>3 : number +>temp-- : number +>temp : number + +(-3) ** ++temp; +>(-3) ** ++temp : number +>(-3) : number +>-3 : number +>3 : number +>++temp : number +>temp : number + +(-3) ** --temp; +>(-3) ** --temp : number +>(-3) : number +>-3 : number +>3 : number >--temp : number ->temp : any ->3 : number +>temp : number -++temp ** 3; ->++temp ** 3 : number ->++temp ** 3 : number ->++temp : number ->temp : any +(+3) ** temp++; +>(+3) ** temp++ : number +>(+3) : number +>+3 : number >3 : number - -temp-- ** 3; ->temp-- ** 3 : number ->temp-- ** 3 : number ->temp-- : number ->temp : any ->3 : number - -temp++ ** 3; ->temp++ ** 3 : number ->temp++ ** 3 : number >temp++ : number ->temp : any ->3 : number +>temp : number --++temp ** 3; ->-++temp ** 3 : number ->-++temp ** 3 : number ->++temp ** 3 : number ->++temp : number ->temp : any +(+3) ** temp--; +>(+3) ** temp-- : number +>(+3) : number +>+3 : number >3 : number - --temp++ ** 3; ->-temp++ ** 3 : number ->-temp++ ** 3 : number ->temp++ ** 3 : number ->temp++ : number ->temp : any ->3 : number - --temp-- ** 3; ->-temp-- ** 3 : number ->-temp-- ** 3 : number ->temp-- ** 3 : number >temp-- : number ->temp : any ->3 : number +>temp : number ---temp ** 3 ** 1; ->--temp ** 3 ** 1 : number ->--temp ** 3 ** 1 : number +(+3) ** ++temp; +>(+3) ** ++temp : number +>(+3) : number +>+3 : number +>3 : number +>++temp : number +>temp : number + +(+3) ** --temp; +>(+3) ** --temp : number +>(+3) : number +>+3 : number +>3 : number >--temp : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number +>temp : number -++temp ** 3 ** 1; ->++temp ** 3 ** 1 : number ->++temp ** 3 ** 1 : number ->++temp : number ->temp : any ->3 ** 1 : number +(-3) ** temp++ ** 2; +>(-3) ** temp++ ** 2 : number +>(-3) : number +>-3 : number >3 : number ->1 : number - -temp-- ** 3 ** 1; ->temp-- ** 3 ** 1 : number ->temp-- ** 3 ** 1 : number ->temp-- : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - -temp++ ** 3 ** 1; ->temp++ ** 3 ** 1 : number ->temp++ ** 3 ** 1 : number +>temp++ ** 2 : number >temp++ : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number +>temp : number +>2 : number --++temp ** 3 ** 1; ->-++temp ** 3 ** 1 : number ->-++temp ** 3 ** 1 : number ->++temp ** 3 ** 1 : number ->++temp : number ->temp : any ->3 ** 1 : number +(-3) ** temp-- ** 2; +>(-3) ** temp-- ** 2 : number +>(-3) : number +>-3 : number >3 : number ->1 : number - --temp++ ** 3 ** 1; ->-temp++ ** 3 ** 1 : number ->-temp++ ** 3 ** 1 : number ->temp++ ** 3 ** 1 : number ->temp++ : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - --temp-- ** 3 ** 1; ->-temp-- ** 3 ** 1 : number ->-temp-- ** 3 ** 1 : number ->temp-- ** 3 ** 1 : number +>temp-- ** 2 : number >temp-- : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number +>temp : number +>2 : number -typeof --temp ** 3; ->typeof --temp ** 3 : string ->--temp ** 3 : number +(-3) ** ++temp ** 2; +>(-3) ** ++temp ** 2 : number +>(-3) : number +>-3 : number +>3 : number +>++temp ** 2 : number +>++temp : number +>temp : number +>2 : number + +(-3) ** --temp ** 2; +>(-3) ** --temp ** 2 : number +>(-3) : number +>-3 : number +>3 : number +>--temp ** 2 : number >--temp : number ->temp : any ->3 : number +>temp : number +>2 : number -typeof temp-- ** 3; ->typeof temp-- ** 3 : string ->temp-- ** 3 : number ->temp-- : number ->temp : any +(+3) ** temp++ ** 2; +>(+3) ** temp++ ** 2 : number +>(+3) : number +>+3 : number >3 : number - -typeof 3 ** 4; ->typeof 3 ** 4 : string ->3 ** 4 : number ->3 : number ->4 : number - -typeof temp++ ** 4; ->typeof temp++ ** 4 : string ->temp++ ** 4 : number +>temp++ ** 2 : number >temp++ : number ->temp : any ->4 : number +>temp : number +>2 : number -typeof temp-- ** 4; ->typeof temp-- ** 4 : string ->temp-- ** 4 : number ->temp-- : number ->temp : any ->4 : number - -typeof -3 ** 4; ->typeof -3 ** 4 : string ->-3 ** 4 : number ->3 ** 4 : number +(+3) ** temp-- ** 2; +>(+3) ** temp-- ** 2 : number +>(+3) : number +>+3 : number >3 : number ->4 : number +>temp-- ** 2 : number +>temp-- : number +>temp : number +>2 : number -typeof -++temp ** 4; ->typeof -++temp ** 4 : string ->-++temp ** 4 : number ->++temp ** 4 : number +(+3) ** ++temp ** 2; +>(+3) ** ++temp ** 2 : number +>(+3) : number +>+3 : number +>3 : number +>++temp ** 2 : number >++temp : number ->temp : any ->4 : number +>temp : number +>2 : number -typeof -temp++ ** 4; ->typeof -temp++ ** 4 : string ->-temp++ ** 4 : number ->temp++ ** 4 : number ->temp++ : number ->temp : any ->4 : number - -typeof -temp-- ** 4; ->typeof -temp-- ** 4 : string ->-temp-- ** 4 : number ->temp-- ** 4 : number ->temp-- : number ->temp : any ->4 : number - -typeof --temp ** 3 ** 1; ->typeof --temp ** 3 ** 1 : string ->--temp ** 3 ** 1 : number +(+3) ** --temp ** 2; +>(+3) ** --temp ** 2 : number +>(+3) : number +>+3 : number +>3 : number +>--temp ** 2 : number >--temp : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number +>temp : number +>2 : number -typeof temp-- ** 3 ** 1; ->typeof temp-- ** 3 ** 1 : string ->temp-- ** 3 ** 1 : number ->temp-- : number ->temp : any ->3 ** 1 : number +3 ** -temp++; +>3 ** -temp++ : number >3 : number ->1 : number - -typeof 3 ** 4 ** 1; ->typeof 3 ** 4 ** 1 : string ->3 ** 4 ** 1 : number ->3 : number ->4 ** 1 : number ->4 : number ->1 : number - -typeof temp++ ** 4 ** 1; ->typeof temp++ ** 4 ** 1 : string ->temp++ ** 4 ** 1 : number +>-temp++ : number >temp++ : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number +>temp : number -typeof temp-- ** 4 ** 1; ->typeof temp-- ** 4 ** 1 : string ->temp-- ** 4 ** 1 : number ->temp-- : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -typeof -3 ** 4 ** 1; ->typeof -3 ** 4 ** 1 : string ->-3 ** 4 ** 1 : number ->3 ** 4 ** 1 : number +3 ** -temp--; +>3 ** -temp-- : number >3 : number ->4 ** 1 : number ->4 : number ->1 : number +>-temp-- : number +>temp-- : number +>temp : number -typeof -++temp ** 4 ** 1; ->typeof -++temp ** 4 ** 1 : string ->-++temp ** 4 ** 1 : number ->++temp ** 4 ** 1 : number +3 ** -++temp; +>3 ** -++temp : number +>3 : number +>-++temp : number >++temp : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number +>temp : number -typeof -temp++ ** 4 ** 1; ->typeof -temp++ ** 4 ** 1 : string ->-temp++ ** 4 ** 1 : number ->temp++ ** 4 ** 1 : number ->temp++ : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -typeof -temp-- ** 4 ** 1; ->typeof -temp-- ** 4 ** 1 : string ->-temp-- ** 4 ** 1 : number ->temp-- ** 4 ** 1 : number ->temp-- : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -void --temp ** 3; ->void --temp ** 3 : undefined ->--temp ** 3 : number +3 ** +--temp; +>3 ** +--temp : number +>3 : number +>+--temp : number >--temp : number ->temp : any ->3 : number +>temp : number -void temp-- ** 3; ->void temp-- ** 3 : undefined ->temp-- ** 3 : number ->temp-- : number ->temp : any +3 ** (-temp++) ** 2; +>3 ** (-temp++) ** 2 : number >3 : number - -void 3 ** 4; ->void 3 ** 4 : undefined ->3 ** 4 : number ->3 : number ->4 : number - -void temp++ ** 4; ->void temp++ ** 4 : undefined ->temp++ ** 4 : number +>(-temp++) ** 2 : number +>(-temp++) : number +>-temp++ : number >temp++ : number ->temp : any ->4 : number +>temp : number +>2 : number -void temp-- ** 4; ->void temp-- ** 4 : undefined ->temp-- ** 4 : number ->temp-- : number ->temp : any ->4 : number - -void -3 ** 4; ->void -3 ** 4 : undefined ->-3 ** 4 : number ->3 ** 4 : number +3 ** (-temp--) ** 2; +>3 ** (-temp--) ** 2 : number >3 : number ->4 : number +>(-temp--) ** 2 : number +>(-temp--) : number +>-temp-- : number +>temp-- : number +>temp : number +>2 : number -void -++temp ** 4; ->void -++temp ** 4 : undefined ->-++temp ** 4 : number ->++temp ** 4 : number +3 ** (+temp++) ** 2; +>3 ** (+temp++) ** 2 : number +>3 : number +>(+temp++) ** 2 : number +>(+temp++) : number +>+temp++ : number +>temp++ : number +>temp : number +>2 : number + +3 ** (+temp--) ** 2; +>3 ** (+temp--) ** 2 : number +>3 : number +>(+temp--) ** 2 : number +>(+temp--) : number +>+temp-- : number +>temp-- : number +>temp : number +>2 : number + +3 ** (-++temp) ** 2; +>3 ** (-++temp) ** 2 : number +>3 : number +>(-++temp) ** 2 : number +>(-++temp) : number +>-++temp : number >++temp : number ->temp : any ->4 : number +>temp : number +>2 : number -void -temp++ ** 4; ->void -temp++ ** 4 : undefined ->-temp++ ** 4 : number ->temp++ ** 4 : number ->temp++ : number ->temp : any ->4 : number - -void -temp-- ** 4; ->void -temp-- ** 4 : undefined ->-temp-- ** 4 : number ->temp-- ** 4 : number ->temp-- : number ->temp : any ->4 : number - -void --temp ** 3 ** 1; ->void --temp ** 3 ** 1 : undefined ->--temp ** 3 ** 1 : number +3 ** (+--temp) ** 2; +>3 ** (+--temp) ** 2 : number +>3 : number +>(+--temp) ** 2 : number +>(+--temp) : number +>+--temp : number >--temp : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - -void temp-- ** 3 ** 1; ->void temp-- ** 3 ** 1 : undefined ->temp-- ** 3 ** 1 : number ->temp-- : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - -void 3 ** 4 ** 1; ->void 3 ** 4 ** 1 : undefined ->3 ** 4 ** 1 : number ->3 : number ->4 ** 1 : number ->4 : number ->1 : number - -void temp++ ** 4 ** 1; ->void temp++ ** 4 ** 1 : undefined ->temp++ ** 4 ** 1 : number ->temp++ : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -void temp-- ** 4 ** 1; ->void temp-- ** 4 ** 1 : undefined ->temp-- ** 4 ** 1 : number ->temp-- : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -void -3 ** 4 ** 1; ->void -3 ** 4 ** 1 : undefined ->-3 ** 4 ** 1 : number ->3 ** 4 ** 1 : number ->3 : number ->4 ** 1 : number ->4 : number ->1 : number - -void -++temp ** 4 ** 1; ->void -++temp ** 4 ** 1 : undefined ->-++temp ** 4 ** 1 : number ->++temp ** 4 ** 1 : number ->++temp : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -void -temp++ ** 4 ** 1; ->void -temp++ ** 4 ** 1 : undefined ->-temp++ ** 4 ** 1 : number ->temp++ ** 4 ** 1 : number ->temp++ : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -void -temp-- ** 4 ** 1; ->void -temp-- ** 4 ** 1 : undefined ->-temp-- ** 4 ** 1 : number ->temp-- ** 4 ** 1 : number ->temp-- : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -~ --temp ** 3; ->~ --temp ** 3 : number ->--temp ** 3 : number ->--temp : number ->temp : any ->3 : number - -~ temp-- ** 3; ->~ temp-- ** 3 : number ->temp-- ** 3 : number ->temp-- : number ->temp : any ->3 : number - -~ 3 ** 4; ->~ 3 ** 4 : number ->3 ** 4 : number ->3 : number ->4 : number - -~ temp++ ** 4; ->~ temp++ ** 4 : number ->temp++ ** 4 : number ->temp++ : number ->temp : any ->4 : number - -~ temp-- ** 4; ->~ temp-- ** 4 : number ->temp-- ** 4 : number ->temp-- : number ->temp : any ->4 : number - -~ -3 ** 4; ->~ -3 ** 4 : number ->-3 ** 4 : number ->3 ** 4 : number ->3 : number ->4 : number - -~ -++temp ** 4; ->~ -++temp ** 4 : number ->-++temp ** 4 : number ->++temp ** 4 : number ->++temp : number ->temp : any ->4 : number - -~ -temp++ ** 4; ->~ -temp++ ** 4 : number ->-temp++ ** 4 : number ->temp++ ** 4 : number ->temp++ : number ->temp : any ->4 : number - -~ -temp-- ** 4; ->~ -temp-- ** 4 : number ->-temp-- ** 4 : number ->temp-- ** 4 : number ->temp-- : number ->temp : any ->4 : number - -~ --temp ** 3 ** 1; ->~ --temp ** 3 ** 1 : number ->--temp ** 3 ** 1 : number ->--temp : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - -~ temp-- ** 3 ** 1; ->~ temp-- ** 3 ** 1 : number ->temp-- ** 3 ** 1 : number ->temp-- : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - -~ 3 ** 4 ** 1; ->~ 3 ** 4 ** 1 : number ->3 ** 4 ** 1 : number ->3 : number ->4 ** 1 : number ->4 : number ->1 : number - -~ temp++ ** 4 ** 1; ->~ temp++ ** 4 ** 1 : number ->temp++ ** 4 ** 1 : number ->temp++ : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -~ temp-- ** 4 ** 1; ->~ temp-- ** 4 ** 1 : number ->temp-- ** 4 ** 1 : number ->temp-- : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -~ -3 ** 4 ** 1; ->~ -3 ** 4 ** 1 : number ->-3 ** 4 ** 1 : number ->3 ** 4 ** 1 : number ->3 : number ->4 ** 1 : number ->4 : number ->1 : number - -~ -++temp ** 4 ** 1; ->~ -++temp ** 4 ** 1 : number ->-++temp ** 4 ** 1 : number ->++temp ** 4 ** 1 : number ->++temp : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -~ -temp++ ** 4 ** 1; ->~ -temp++ ** 4 ** 1 : number ->-temp++ ** 4 ** 1 : number ->temp++ ** 4 ** 1 : number ->temp++ : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -~ -temp-- ** 4 ** 1; ->~ -temp-- ** 4 ** 1 : number ->-temp-- ** 4 ** 1 : number ->temp-- ** 4 ** 1 : number ->temp-- : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -! --temp ** 3; ->! --temp ** 3 : boolean ->--temp ** 3 : number ->--temp : number ->temp : any ->3 : number - -! temp-- ** 3; ->! temp-- ** 3 : boolean ->temp-- ** 3 : number ->temp-- : number ->temp : any ->3 : number - -! 3 ** 4; ->! 3 ** 4 : boolean ->3 ** 4 : number ->3 : number ->4 : number - -! temp++ ** 4; ->! temp++ ** 4 : boolean ->temp++ ** 4 : number ->temp++ : number ->temp : any ->4 : number - -! temp-- ** 4; ->! temp-- ** 4 : boolean ->temp-- ** 4 : number ->temp-- : number ->temp : any ->4 : number - -! -3 ** 4; ->! -3 ** 4 : boolean ->-3 ** 4 : number ->3 ** 4 : number ->3 : number ->4 : number - -! -++temp ** 4; ->! -++temp ** 4 : boolean ->-++temp ** 4 : number ->++temp ** 4 : number ->++temp : number ->temp : any ->4 : number - -! -temp++ ** 4; ->! -temp++ ** 4 : boolean ->-temp++ ** 4 : number ->temp++ ** 4 : number ->temp++ : number ->temp : any ->4 : number - -! -temp-- ** 4; ->! -temp-- ** 4 : boolean ->-temp-- ** 4 : number ->temp-- ** 4 : number ->temp-- : number ->temp : any ->4 : number - -! --temp ** 3 ** 1; ->! --temp ** 3 ** 1 : boolean ->--temp ** 3 ** 1 : number ->--temp : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - -! temp-- ** 3 ** 1; ->! temp-- ** 3 ** 1 : boolean ->temp-- ** 3 ** 1 : number ->temp-- : number ->temp : any ->3 ** 1 : number ->3 : number ->1 : number - -! 3 ** 4 ** 1; ->! 3 ** 4 ** 1 : boolean ->3 ** 4 ** 1 : number ->3 : number ->4 ** 1 : number ->4 : number ->1 : number - -! temp++ ** 4 ** 1; ->! temp++ ** 4 ** 1 : boolean ->temp++ ** 4 ** 1 : number ->temp++ : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -! temp-- ** 4 ** 1; ->! temp-- ** 4 ** 1 : boolean ->temp-- ** 4 ** 1 : number ->temp-- : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -! -3 ** 4 ** 1; ->! -3 ** 4 ** 1 : boolean ->-3 ** 4 ** 1 : number ->3 ** 4 ** 1 : number ->3 : number ->4 ** 1 : number ->4 : number ->1 : number - -! -++temp ** 4 ** 1; ->! -++temp ** 4 ** 1 : boolean ->-++temp ** 4 ** 1 : number ->++temp ** 4 ** 1 : number ->++temp : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -! -temp++ ** 4 ** 1; ->! -temp++ ** 4 ** 1 : boolean ->-temp++ ** 4 ** 1 : number ->temp++ ** 4 ** 1 : number ->temp++ : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number - -! -temp-- ** 4 ** 1; ->! -temp-- ** 4 ** 1 : boolean ->-temp-- ** 4 ** 1 : number ->temp-- ** 4 ** 1 : number ->temp-- : number ->temp : any ->4 ** 1 : number ->4 : number ->1 : number +>temp : number +>2 : number diff --git a/tests/baselines/reference/emitExponentiationOperator3ES7.js b/tests/baselines/reference/emitExponentiationOperator3ES7.js new file mode 100644 index 00000000000..5d556c7f20e --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator3ES7.js @@ -0,0 +1,78 @@ +//// [emitExponentiationOperator3ES7.ts] + +var temp = 10; + +(-++temp) ** 3; +(+--temp) ** 3; +(-temp++) ** 3; +(+temp--) ** 3; +(-(1 ** ++temp)) ** 3; +(-(1 ** --temp)) ** 3; +(-(1 ** temp++)) ** 3; +(-(1 ** temp--)) ** 3; + +(-3) ** temp++; +(-3) ** temp--; +(-3) ** ++temp; +(-3) ** --temp; +(+3) ** temp++; +(+3) ** temp--; +(+3) ** ++temp; +(+3) ** --temp; +(-3) ** temp++ ** 2; +(-3) ** temp-- ** 2; +(-3) ** ++temp ** 2; +(-3) ** --temp ** 2; +(+3) ** temp++ ** 2; +(+3) ** temp-- ** 2; +(+3) ** ++temp ** 2; +(+3) ** --temp ** 2; + +3 ** -temp++; +3 ** -temp--; +3 ** -++temp; +3 ** +--temp; +3 ** (-temp++) ** 2; +3 ** (-temp--) ** 2; +3 ** (+temp++) ** 2; +3 ** (+temp--) ** 2; +3 ** (-++temp) ** 2; +3 ** (+--temp) ** 2; + + +//// [emitExponentiationOperator3ES7.js] +var temp = 10; +(-++temp) ** 3; +(+--temp) ** 3; +(-temp++) ** 3; +(+temp--) ** 3; +(-(1 ** ++temp)) ** 3; +(-(1 ** --temp)) ** 3; +(-(1 ** temp++)) ** 3; +(-(1 ** temp--)) ** 3; +(-3) ** temp++; +(-3) ** temp--; +(-3) ** ++temp; +(-3) ** --temp; +(+3) ** temp++; +(+3) ** temp--; +(+3) ** ++temp; +(+3) ** --temp; +(-3) ** temp++ ** 2; +(-3) ** temp-- ** 2; +(-3) ** ++temp ** 2; +(-3) ** --temp ** 2; +(+3) ** temp++ ** 2; +(+3) ** temp-- ** 2; +(+3) ** ++temp ** 2; +(+3) ** --temp ** 2; +3 ** -temp++; +3 ** -temp--; +3 ** -++temp; +3 ** +--temp; +3 ** (-temp++) ** 2; +3 ** (-temp--) ** 2; +3 ** (+temp++) ** 2; +3 ** (+temp--) ** 2; +3 ** (-++temp) ** 2; +3 ** (+--temp) ** 2; diff --git a/tests/baselines/reference/emitExponentiationOperator3ES7.symbols b/tests/baselines/reference/emitExponentiationOperator3ES7.symbols new file mode 100644 index 00000000000..cd668fcf8b7 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator3ES7.symbols @@ -0,0 +1,107 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts === + +var temp = 10; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-++temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+--temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-temp++) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-(1 ** ++temp)) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-(1 ** --temp)) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-(1 ** temp++)) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-(1 ** temp--)) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-3) ** temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-3) ** temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-3) ** ++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-3) ** --temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+3) ** temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+3) ** temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+3) ** ++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+3) ** --temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-3) ** temp++ ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-3) ** temp-- ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-3) ** ++temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(-3) ** --temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+3) ** temp++ ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+3) ** temp-- ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+3) ** ++temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +(+3) ** --temp ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** -temp++; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** -temp--; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** -++temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** +--temp; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** (-temp++) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** (-temp--) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** (+temp++) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** (+temp--) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** (-++temp) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + +3 ** (+--temp) ** 2; +>temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperator3ES7.types b/tests/baselines/reference/emitExponentiationOperator3ES7.types new file mode 100644 index 00000000000..0585b282b0f --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator3ES7.types @@ -0,0 +1,314 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts === + +var temp = 10; +>temp : number +>10 : number + +(-++temp) ** 3; +>(-++temp) ** 3 : number +>(-++temp) : number +>-++temp : number +>++temp : number +>temp : number +>3 : number + +(+--temp) ** 3; +>(+--temp) ** 3 : number +>(+--temp) : number +>+--temp : number +>--temp : number +>temp : number +>3 : number + +(-temp++) ** 3; +>(-temp++) ** 3 : number +>(-temp++) : number +>-temp++ : number +>temp++ : number +>temp : number +>3 : number + +(+temp--) ** 3; +>(+temp--) ** 3 : number +>(+temp--) : number +>+temp-- : number +>temp-- : number +>temp : number +>3 : number + +(-(1 ** ++temp)) ** 3; +>(-(1 ** ++temp)) ** 3 : number +>(-(1 ** ++temp)) : number +>-(1 ** ++temp) : number +>(1 ** ++temp) : number +>1 ** ++temp : number +>1 : number +>++temp : number +>temp : number +>3 : number + +(-(1 ** --temp)) ** 3; +>(-(1 ** --temp)) ** 3 : number +>(-(1 ** --temp)) : number +>-(1 ** --temp) : number +>(1 ** --temp) : number +>1 ** --temp : number +>1 : number +>--temp : number +>temp : number +>3 : number + +(-(1 ** temp++)) ** 3; +>(-(1 ** temp++)) ** 3 : number +>(-(1 ** temp++)) : number +>-(1 ** temp++) : number +>(1 ** temp++) : number +>1 ** temp++ : number +>1 : number +>temp++ : number +>temp : number +>3 : number + +(-(1 ** temp--)) ** 3; +>(-(1 ** temp--)) ** 3 : number +>(-(1 ** temp--)) : number +>-(1 ** temp--) : number +>(1 ** temp--) : number +>1 ** temp-- : number +>1 : number +>temp-- : number +>temp : number +>3 : number + +(-3) ** temp++; +>(-3) ** temp++ : number +>(-3) : number +>-3 : number +>3 : number +>temp++ : number +>temp : number + +(-3) ** temp--; +>(-3) ** temp-- : number +>(-3) : number +>-3 : number +>3 : number +>temp-- : number +>temp : number + +(-3) ** ++temp; +>(-3) ** ++temp : number +>(-3) : number +>-3 : number +>3 : number +>++temp : number +>temp : number + +(-3) ** --temp; +>(-3) ** --temp : number +>(-3) : number +>-3 : number +>3 : number +>--temp : number +>temp : number + +(+3) ** temp++; +>(+3) ** temp++ : number +>(+3) : number +>+3 : number +>3 : number +>temp++ : number +>temp : number + +(+3) ** temp--; +>(+3) ** temp-- : number +>(+3) : number +>+3 : number +>3 : number +>temp-- : number +>temp : number + +(+3) ** ++temp; +>(+3) ** ++temp : number +>(+3) : number +>+3 : number +>3 : number +>++temp : number +>temp : number + +(+3) ** --temp; +>(+3) ** --temp : number +>(+3) : number +>+3 : number +>3 : number +>--temp : number +>temp : number + +(-3) ** temp++ ** 2; +>(-3) ** temp++ ** 2 : number +>(-3) : number +>-3 : number +>3 : number +>temp++ ** 2 : number +>temp++ : number +>temp : number +>2 : number + +(-3) ** temp-- ** 2; +>(-3) ** temp-- ** 2 : number +>(-3) : number +>-3 : number +>3 : number +>temp-- ** 2 : number +>temp-- : number +>temp : number +>2 : number + +(-3) ** ++temp ** 2; +>(-3) ** ++temp ** 2 : number +>(-3) : number +>-3 : number +>3 : number +>++temp ** 2 : number +>++temp : number +>temp : number +>2 : number + +(-3) ** --temp ** 2; +>(-3) ** --temp ** 2 : number +>(-3) : number +>-3 : number +>3 : number +>--temp ** 2 : number +>--temp : number +>temp : number +>2 : number + +(+3) ** temp++ ** 2; +>(+3) ** temp++ ** 2 : number +>(+3) : number +>+3 : number +>3 : number +>temp++ ** 2 : number +>temp++ : number +>temp : number +>2 : number + +(+3) ** temp-- ** 2; +>(+3) ** temp-- ** 2 : number +>(+3) : number +>+3 : number +>3 : number +>temp-- ** 2 : number +>temp-- : number +>temp : number +>2 : number + +(+3) ** ++temp ** 2; +>(+3) ** ++temp ** 2 : number +>(+3) : number +>+3 : number +>3 : number +>++temp ** 2 : number +>++temp : number +>temp : number +>2 : number + +(+3) ** --temp ** 2; +>(+3) ** --temp ** 2 : number +>(+3) : number +>+3 : number +>3 : number +>--temp ** 2 : number +>--temp : number +>temp : number +>2 : number + +3 ** -temp++; +>3 ** -temp++ : number +>3 : number +>-temp++ : number +>temp++ : number +>temp : number + +3 ** -temp--; +>3 ** -temp-- : number +>3 : number +>-temp-- : number +>temp-- : number +>temp : number + +3 ** -++temp; +>3 ** -++temp : number +>3 : number +>-++temp : number +>++temp : number +>temp : number + +3 ** +--temp; +>3 ** +--temp : number +>3 : number +>+--temp : number +>--temp : number +>temp : number + +3 ** (-temp++) ** 2; +>3 ** (-temp++) ** 2 : number +>3 : number +>(-temp++) ** 2 : number +>(-temp++) : number +>-temp++ : number +>temp++ : number +>temp : number +>2 : number + +3 ** (-temp--) ** 2; +>3 ** (-temp--) ** 2 : number +>3 : number +>(-temp--) ** 2 : number +>(-temp--) : number +>-temp-- : number +>temp-- : number +>temp : number +>2 : number + +3 ** (+temp++) ** 2; +>3 ** (+temp++) ** 2 : number +>3 : number +>(+temp++) ** 2 : number +>(+temp++) : number +>+temp++ : number +>temp++ : number +>temp : number +>2 : number + +3 ** (+temp--) ** 2; +>3 ** (+temp--) ** 2 : number +>3 : number +>(+temp--) ** 2 : number +>(+temp--) : number +>+temp-- : number +>temp-- : number +>temp : number +>2 : number + +3 ** (-++temp) ** 2; +>3 ** (-++temp) ** 2 : number +>3 : number +>(-++temp) ** 2 : number +>(-++temp) : number +>-++temp : number +>++temp : number +>temp : number +>2 : number + +3 ** (+--temp) ** 2; +>3 ** (+--temp) ** 2 : number +>3 : number +>(+--temp) ** 2 : number +>(+--temp) : number +>+--temp : number +>--temp : number +>temp : number +>2 : number + diff --git a/tests/baselines/reference/emitExponentiationOperator4.js b/tests/baselines/reference/emitExponentiationOperator4.js new file mode 100644 index 00000000000..185616601be --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator4.js @@ -0,0 +1,68 @@ +//// [emitExponentiationOperator4.ts] +var temp: any; + +--temp ** 3; +++temp ** 3; +temp-- ** 3; +temp++ ** 3; + +1 ** --temp ** 3; +1 ** ++temp ** 3; +1 ** temp-- ** 3; +1 ** temp++ ** 3; + +(void --temp) ** 3; +(void temp--) ** 3; +(void 3) ** 4; +(void temp++) ** 4; +(void temp--) ** 4; + + +1 ** (void --temp) ** 3; +1 ** (void temp--) ** 3; +1 ** (void 3) ** 4; +1 ** (void temp++) ** 4; +1 ** (void temp--) ** 4; + +(~ --temp) ** 3; +(~ temp--) ** 3; +(~ 3) ** 4; +(~ temp++) ** 4; +(~ temp--) ** 4; + +1 ** (~ --temp) ** 3; +1 ** (~ temp--) ** 3; +1 ** (~ 3) ** 4; +1 ** (~ temp++) ** 4; +1 ** (~ temp--) ** 4; + +//// [emitExponentiationOperator4.js] +var temp; +Math.pow(--temp, 3); +Math.pow(++temp, 3); +Math.pow(temp--, 3); +Math.pow(temp++, 3); +Math.pow(1, Math.pow(--temp, 3)); +Math.pow(1, Math.pow(++temp, 3)); +Math.pow(1, Math.pow(temp--, 3)); +Math.pow(1, Math.pow(temp++, 3)); +Math.pow((void --temp), 3); +Math.pow((void temp--), 3); +Math.pow((void 3), 4); +Math.pow((void temp++), 4); +Math.pow((void temp--), 4); +Math.pow(1, Math.pow((void --temp), 3)); +Math.pow(1, Math.pow((void temp--), 3)); +Math.pow(1, Math.pow((void 3), 4)); +Math.pow(1, Math.pow((void temp++), 4)); +Math.pow(1, Math.pow((void temp--), 4)); +Math.pow((~--temp), 3); +Math.pow((~temp--), 3); +Math.pow((~3), 4); +Math.pow((~temp++), 4); +Math.pow((~temp--), 4); +Math.pow(1, Math.pow((~--temp), 3)); +Math.pow(1, Math.pow((~temp--), 3)); +Math.pow(1, Math.pow((~3), 4)); +Math.pow(1, Math.pow((~temp++), 4)); +Math.pow(1, Math.pow((~temp--), 4)); diff --git a/tests/baselines/reference/emitExponentiationOperator4.symbols b/tests/baselines/reference/emitExponentiationOperator4.symbols new file mode 100644 index 00000000000..c57825f908a --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator4.symbols @@ -0,0 +1,81 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts === +var temp: any; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +--temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** --temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** ++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +(void --temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +(void temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +(void 3) ** 4; +(void temp++) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +(void temp--) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + + +1 ** (void --temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** (void temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** (void 3) ** 4; +1 ** (void temp++) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** (void temp--) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +(~ --temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +(~ temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +(~ 3) ** 4; +(~ temp++) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +(~ temp--) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** (~ --temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** (~ temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** (~ 3) ** 4; +1 ** (~ temp++) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** (~ temp--) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperator4.types b/tests/baselines/reference/emitExponentiationOperator4.types new file mode 100644 index 00000000000..2d5a7ea48f4 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator4.types @@ -0,0 +1,245 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts === +var temp: any; +>temp : any + +--temp ** 3; +>--temp ** 3 : number +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +++temp ** 3; +>++temp ** 3 : number +>++temp ** 3 : number +>++temp : number +>temp : any +>3 : number + +temp-- ** 3; +>temp-- ** 3 : number +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +temp++ ** 3; +>temp++ ** 3 : number +>temp++ ** 3 : number +>temp++ : number +>temp : any +>3 : number + +1 ** --temp ** 3; +>1 ** --temp ** 3 : number +>1 : number +>--temp ** 3 : number +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +1 ** ++temp ** 3; +>1 ** ++temp ** 3 : number +>1 : number +>++temp ** 3 : number +>++temp ** 3 : number +>++temp : number +>temp : any +>3 : number + +1 ** temp-- ** 3; +>1 ** temp-- ** 3 : number +>1 : number +>temp-- ** 3 : number +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +1 ** temp++ ** 3; +>1 ** temp++ ** 3 : number +>1 : number +>temp++ ** 3 : number +>temp++ ** 3 : number +>temp++ : number +>temp : any +>3 : number + +(void --temp) ** 3; +>(void --temp) ** 3 : number +>(void --temp) : undefined +>void --temp : undefined +>--temp : number +>temp : any +>3 : number + +(void temp--) ** 3; +>(void temp--) ** 3 : number +>(void temp--) : undefined +>void temp-- : undefined +>temp-- : number +>temp : any +>3 : number + +(void 3) ** 4; +>(void 3) ** 4 : number +>(void 3) : undefined +>void 3 : undefined +>3 : number +>4 : number + +(void temp++) ** 4; +>(void temp++) ** 4 : number +>(void temp++) : undefined +>void temp++ : undefined +>temp++ : number +>temp : any +>4 : number + +(void temp--) ** 4; +>(void temp--) ** 4 : number +>(void temp--) : undefined +>void temp-- : undefined +>temp-- : number +>temp : any +>4 : number + + +1 ** (void --temp) ** 3; +>1 ** (void --temp) ** 3 : number +>1 : number +>(void --temp) ** 3 : number +>(void --temp) : undefined +>void --temp : undefined +>--temp : number +>temp : any +>3 : number + +1 ** (void temp--) ** 3; +>1 ** (void temp--) ** 3 : number +>1 : number +>(void temp--) ** 3 : number +>(void temp--) : undefined +>void temp-- : undefined +>temp-- : number +>temp : any +>3 : number + +1 ** (void 3) ** 4; +>1 ** (void 3) ** 4 : number +>1 : number +>(void 3) ** 4 : number +>(void 3) : undefined +>void 3 : undefined +>3 : number +>4 : number + +1 ** (void temp++) ** 4; +>1 ** (void temp++) ** 4 : number +>1 : number +>(void temp++) ** 4 : number +>(void temp++) : undefined +>void temp++ : undefined +>temp++ : number +>temp : any +>4 : number + +1 ** (void temp--) ** 4; +>1 ** (void temp--) ** 4 : number +>1 : number +>(void temp--) ** 4 : number +>(void temp--) : undefined +>void temp-- : undefined +>temp-- : number +>temp : any +>4 : number + +(~ --temp) ** 3; +>(~ --temp) ** 3 : number +>(~ --temp) : number +>~ --temp : number +>--temp : number +>temp : any +>3 : number + +(~ temp--) ** 3; +>(~ temp--) ** 3 : number +>(~ temp--) : number +>~ temp-- : number +>temp-- : number +>temp : any +>3 : number + +(~ 3) ** 4; +>(~ 3) ** 4 : number +>(~ 3) : number +>~ 3 : number +>3 : number +>4 : number + +(~ temp++) ** 4; +>(~ temp++) ** 4 : number +>(~ temp++) : number +>~ temp++ : number +>temp++ : number +>temp : any +>4 : number + +(~ temp--) ** 4; +>(~ temp--) ** 4 : number +>(~ temp--) : number +>~ temp-- : number +>temp-- : number +>temp : any +>4 : number + +1 ** (~ --temp) ** 3; +>1 ** (~ --temp) ** 3 : number +>1 : number +>(~ --temp) ** 3 : number +>(~ --temp) : number +>~ --temp : number +>--temp : number +>temp : any +>3 : number + +1 ** (~ temp--) ** 3; +>1 ** (~ temp--) ** 3 : number +>1 : number +>(~ temp--) ** 3 : number +>(~ temp--) : number +>~ temp-- : number +>temp-- : number +>temp : any +>3 : number + +1 ** (~ 3) ** 4; +>1 ** (~ 3) ** 4 : number +>1 : number +>(~ 3) ** 4 : number +>(~ 3) : number +>~ 3 : number +>3 : number +>4 : number + +1 ** (~ temp++) ** 4; +>1 ** (~ temp++) ** 4 : number +>1 : number +>(~ temp++) ** 4 : number +>(~ temp++) : number +>~ temp++ : number +>temp++ : number +>temp : any +>4 : number + +1 ** (~ temp--) ** 4; +>1 ** (~ temp--) ** 4 : number +>1 : number +>(~ temp--) ** 4 : number +>(~ temp--) : number +>~ temp-- : number +>temp-- : number +>temp : any +>4 : number + diff --git a/tests/baselines/reference/emitExponentiationOperator4ES7.js b/tests/baselines/reference/emitExponentiationOperator4ES7.js new file mode 100644 index 00000000000..fb32144575d --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator4ES7.js @@ -0,0 +1,68 @@ +//// [emitExponentiationOperator4ES7.ts] +var temp: any; + +--temp ** 3; +++temp ** 3; +temp-- ** 3; +temp++ ** 3; + +1 ** --temp ** 3; +1 ** ++temp ** 3; +1 ** temp-- ** 3; +1 ** temp++ ** 3; + +(void --temp) ** 3; +(void temp--) ** 3; +(void 3) ** 4; +(void temp++) ** 4; +(void temp--) ** 4; + + +1 ** (void --temp) ** 3; +1 ** (void temp--) ** 3; +1 ** (void 3) ** 4; +1 ** (void temp++) ** 4; +1 ** (void temp--) ** 4; + +(~ --temp) ** 3; +(~temp--) ** 3; +(~3) ** 4; +(~temp++) ** 4; +(~temp--) ** 4; + +1 ** (~ --temp) ** 3; +1 ** (~temp--) ** 3; +1 ** (~3) ** 4; +1 ** (~temp++) ** 4; +1 ** (~temp--) ** 4; + +//// [emitExponentiationOperator4ES7.js] +var temp; +--temp ** 3; +++temp ** 3; +temp-- ** 3; +temp++ ** 3; +1 ** --temp ** 3; +1 ** ++temp ** 3; +1 ** temp-- ** 3; +1 ** temp++ ** 3; +(void --temp) ** 3; +(void temp--) ** 3; +(void 3) ** 4; +(void temp++) ** 4; +(void temp--) ** 4; +1 ** (void --temp) ** 3; +1 ** (void temp--) ** 3; +1 ** (void 3) ** 4; +1 ** (void temp++) ** 4; +1 ** (void temp--) ** 4; +(~--temp) ** 3; +(~temp--) ** 3; +(~3) ** 4; +(~temp++) ** 4; +(~temp--) ** 4; +1 ** (~--temp) ** 3; +1 ** (~temp--) ** 3; +1 ** (~3) ** 4; +1 ** (~temp++) ** 4; +1 ** (~temp--) ** 4; diff --git a/tests/baselines/reference/emitExponentiationOperator4ES7.symbols b/tests/baselines/reference/emitExponentiationOperator4ES7.symbols new file mode 100644 index 00000000000..53701ed5aef --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator4ES7.symbols @@ -0,0 +1,81 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts === +var temp: any; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +--temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** --temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** ++temp ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** temp-- ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** temp++ ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +(void --temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +(void temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +(void 3) ** 4; +(void temp++) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +(void temp--) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + + +1 ** (void --temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** (void temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** (void 3) ** 4; +1 ** (void temp++) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** (void temp--) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +(~ --temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +(~temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +(~3) ** 4; +(~temp++) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +(~temp--) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** (~ --temp) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** (~temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** (~3) ** 4; +1 ** (~temp++) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** (~temp--) ** 4; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperator4ES7.types b/tests/baselines/reference/emitExponentiationOperator4ES7.types new file mode 100644 index 00000000000..78eacba9e39 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperator4ES7.types @@ -0,0 +1,245 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts === +var temp: any; +>temp : any + +--temp ** 3; +>--temp ** 3 : number +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +++temp ** 3; +>++temp ** 3 : number +>++temp ** 3 : number +>++temp : number +>temp : any +>3 : number + +temp-- ** 3; +>temp-- ** 3 : number +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +temp++ ** 3; +>temp++ ** 3 : number +>temp++ ** 3 : number +>temp++ : number +>temp : any +>3 : number + +1 ** --temp ** 3; +>1 ** --temp ** 3 : number +>1 : number +>--temp ** 3 : number +>--temp ** 3 : number +>--temp : number +>temp : any +>3 : number + +1 ** ++temp ** 3; +>1 ** ++temp ** 3 : number +>1 : number +>++temp ** 3 : number +>++temp ** 3 : number +>++temp : number +>temp : any +>3 : number + +1 ** temp-- ** 3; +>1 ** temp-- ** 3 : number +>1 : number +>temp-- ** 3 : number +>temp-- ** 3 : number +>temp-- : number +>temp : any +>3 : number + +1 ** temp++ ** 3; +>1 ** temp++ ** 3 : number +>1 : number +>temp++ ** 3 : number +>temp++ ** 3 : number +>temp++ : number +>temp : any +>3 : number + +(void --temp) ** 3; +>(void --temp) ** 3 : number +>(void --temp) : undefined +>void --temp : undefined +>--temp : number +>temp : any +>3 : number + +(void temp--) ** 3; +>(void temp--) ** 3 : number +>(void temp--) : undefined +>void temp-- : undefined +>temp-- : number +>temp : any +>3 : number + +(void 3) ** 4; +>(void 3) ** 4 : number +>(void 3) : undefined +>void 3 : undefined +>3 : number +>4 : number + +(void temp++) ** 4; +>(void temp++) ** 4 : number +>(void temp++) : undefined +>void temp++ : undefined +>temp++ : number +>temp : any +>4 : number + +(void temp--) ** 4; +>(void temp--) ** 4 : number +>(void temp--) : undefined +>void temp-- : undefined +>temp-- : number +>temp : any +>4 : number + + +1 ** (void --temp) ** 3; +>1 ** (void --temp) ** 3 : number +>1 : number +>(void --temp) ** 3 : number +>(void --temp) : undefined +>void --temp : undefined +>--temp : number +>temp : any +>3 : number + +1 ** (void temp--) ** 3; +>1 ** (void temp--) ** 3 : number +>1 : number +>(void temp--) ** 3 : number +>(void temp--) : undefined +>void temp-- : undefined +>temp-- : number +>temp : any +>3 : number + +1 ** (void 3) ** 4; +>1 ** (void 3) ** 4 : number +>1 : number +>(void 3) ** 4 : number +>(void 3) : undefined +>void 3 : undefined +>3 : number +>4 : number + +1 ** (void temp++) ** 4; +>1 ** (void temp++) ** 4 : number +>1 : number +>(void temp++) ** 4 : number +>(void temp++) : undefined +>void temp++ : undefined +>temp++ : number +>temp : any +>4 : number + +1 ** (void temp--) ** 4; +>1 ** (void temp--) ** 4 : number +>1 : number +>(void temp--) ** 4 : number +>(void temp--) : undefined +>void temp-- : undefined +>temp-- : number +>temp : any +>4 : number + +(~ --temp) ** 3; +>(~ --temp) ** 3 : number +>(~ --temp) : number +>~ --temp : number +>--temp : number +>temp : any +>3 : number + +(~temp--) ** 3; +>(~temp--) ** 3 : number +>(~temp--) : number +>~temp-- : number +>temp-- : number +>temp : any +>3 : number + +(~3) ** 4; +>(~3) ** 4 : number +>(~3) : number +>~3 : number +>3 : number +>4 : number + +(~temp++) ** 4; +>(~temp++) ** 4 : number +>(~temp++) : number +>~temp++ : number +>temp++ : number +>temp : any +>4 : number + +(~temp--) ** 4; +>(~temp--) ** 4 : number +>(~temp--) : number +>~temp-- : number +>temp-- : number +>temp : any +>4 : number + +1 ** (~ --temp) ** 3; +>1 ** (~ --temp) ** 3 : number +>1 : number +>(~ --temp) ** 3 : number +>(~ --temp) : number +>~ --temp : number +>--temp : number +>temp : any +>3 : number + +1 ** (~temp--) ** 3; +>1 ** (~temp--) ** 3 : number +>1 : number +>(~temp--) ** 3 : number +>(~temp--) : number +>~temp-- : number +>temp-- : number +>temp : any +>3 : number + +1 ** (~3) ** 4; +>1 ** (~3) ** 4 : number +>1 : number +>(~3) ** 4 : number +>(~3) : number +>~3 : number +>3 : number +>4 : number + +1 ** (~temp++) ** 4; +>1 ** (~temp++) ** 4 : number +>1 : number +>(~temp++) ** 4 : number +>(~temp++) : number +>~temp++ : number +>temp++ : number +>temp : any +>4 : number + +1 ** (~temp--) ** 4; +>1 ** (~temp--) ** 4 : number +>1 : number +>(~temp--) ** 4 : number +>(~temp--) : number +>~temp-- : number +>temp-- : number +>temp : any +>4 : number + From 46d799e05db02e57b3f73d8e97626095fa8a18e8 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 19:05:37 -0700 Subject: [PATCH 053/121] Add baselines for using exponentiation in template string --- ...ExponentiationOperatorInTempalteString4.js | 53 +++ ...entiationOperatorInTempalteString4.symbols | 114 ++++++ ...onentiationOperatorInTempalteString4.types | 233 ++++++++++++ ...ExponentiationOperatorInTemplateString1.js | 95 +++-- ...entiationOperatorInTemplateString1.symbols | 227 ++++++------ ...onentiationOperatorInTemplateString1.types | 344 +++++++++--------- ...onentiationOperatorInTemplateString1ES6.js | 53 +++ ...iationOperatorInTemplateString1ES6.symbols | 143 ++++++++ ...ntiationOperatorInTemplateString1ES6.types | 240 ++++++++++++ ...ExponentiationOperatorInTemplateString2.js | 53 +++ ...entiationOperatorInTemplateString2.symbols | 143 ++++++++ ...onentiationOperatorInTemplateString2.types | 240 ++++++++++++ ...onentiationOperatorInTemplateString2ES6.js | 53 +++ ...iationOperatorInTemplateString2ES6.symbols | 143 ++++++++ ...ntiationOperatorInTemplateString2ES6.types | 240 ++++++++++++ ...ExponentiationOperatorInTemplateString3.js | 54 +++ ...entiationOperatorInTemplateString3.symbols | 143 ++++++++ ...onentiationOperatorInTemplateString3.types | 240 ++++++++++++ ...onentiationOperatorInTemplateString3ES6.js | 54 +++ ...iationOperatorInTemplateString3ES6.symbols | 143 ++++++++ ...ntiationOperatorInTemplateString3ES6.types | 240 ++++++++++++ 21 files changed, 2911 insertions(+), 337 deletions(-) create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTempalteString4.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTempalteString4.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.js b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.js new file mode 100644 index 00000000000..433cd764726 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTempalteString4.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** -t2} world`; +`${(-t1) ** t2 - t1} world`; +`${(-++t1) ** t2 - t1} world`; +`${(-t1++) ** t2 - t1} world`; +`${(~t1) ** t2 ** --t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +`hello ${(-++t1) ** t2 - t1}`; +`hello ${(-t1++) ** t2 - t1}`; +`hello ${(~t1) ** t2 ** --t1 }`; +`hello ${typeof (t1 ** t2 ** t1)}`; + +//// [emitExponentiationOperatorInTempalteString4.js] +var t1 = 10; +var t2 = 10; +var s; +// With TemplateTail +(Math.pow(t1, -t2)) + " world"; +(Math.pow((-t1), t2) - t1) + " world"; +(Math.pow((-++t1), t2) - t1) + " world"; +(Math.pow((-t1++), t2) - t1) + " world"; +(Math.pow((~t1), Math.pow(t2, --t1))) + " world"; +typeof (Math.pow(t1, Math.pow(t2, t1))) + " world"; +// TempateHead & TemplateTail are empt +(Math.pow(t1, -t2)) + " hello world " + (Math.pow(t1, -t2)); +(Math.pow((-t1), t2) - t1) + " hello world " + (Math.pow((-t1), t2) - t1); +(Math.pow((-++t1), t2) - t1) + " hello world " + (Math.pow(t1, Math.pow((-++t1), -t1))); +(Math.pow((-t1++), t2) - t1) + " hello world " + (Math.pow(t2, Math.pow((-t1++), -t1))); +(Math.pow((~t1), Math.pow(t2, --t1))) + " hello world " + (Math.pow((~t1), Math.pow(t2, --t1))); +typeof (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + typeof (Math.pow(t1, Math.pow(t2, t1))); +// With templateHead +"hello " + (Math.pow((-t1), t2) - t1); +"hello " + (Math.pow((-++t1), t2) - t1); +"hello " + (Math.pow((-t1++), t2) - t1); +"hello " + (Math.pow((~t1), Math.pow(t2, --t1))); +"hello " + typeof (Math.pow(t1, Math.pow(t2, t1))); diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.symbols b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.symbols new file mode 100644 index 00000000000..7892323ef1d --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.symbols @@ -0,0 +1,114 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTempalteString4.ts, 3, 3)) + +// With TemplateTail +`${t1 ** -t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) + +`${(-t1) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(-++t1) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(-t1++) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(~t1) ** t2 ** --t1 } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) + +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`hello ${(-++t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`hello ${(-t1++) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`hello ${(~t1) ** t2 ** --t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types new file mode 100644 index 00000000000..b4d1aebd4f6 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types @@ -0,0 +1,233 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With TemplateTail +`${t1 ** -t2} world`; +>`${t1 ** -t2} world` : string +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number + +`${(-t1) ** t2 - t1} world`; +>`${(-t1) ** t2 - t1} world` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-++t1) ** t2 - t1} world`; +>`${(-++t1) ** t2 - t1} world` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-t1++) ** t2 - t1} world`; +>`${(-t1++) ** t2 - t1} world` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`${(~t1) ** t2 ** --t1 } world`; +>`${(~t1) ** t2 ** --t1 } world` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +>`${t1 ** -t2} hello world ${t1 ** -t2}` : string +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number + +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +>`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +>`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** (-++t1) **- t1 : number +>t1 : number +>(-++t1) **- t1 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>- t1 : number +>t1 : number + +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +>`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number +>t2 ** (-t1++) ** - t1 : number +>t2 : number +>(-t1++) ** - t1 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>- t1 : number +>t1 : number + +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +>`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; +>`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +>`hello ${(-t1) ** t2 - t1}` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(-++t1) ** t2 - t1}`; +>`hello ${(-++t1) ** t2 - t1}` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(-t1++) ** t2 - t1}`; +>`hello ${(-t1++) ** t2 - t1}` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(~t1) ** t2 ** --t1 }`; +>`hello ${(~t1) ** t2 ** --t1 }` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1)}`; +>`hello ${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js index cea4b78963b..eb879cce6a5 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js @@ -1,60 +1,53 @@ //// [emitExponentiationOperatorInTemplateString1.ts] + var t1 = 10; var t2 = 10; var s; -`Exp: ${t1 ** t2} abc`; -`Exp: ${t1 ** t2 ** t1} abc`; -`Exp: ${t1 + t2 ** t1} abc`; -`Exp: ${t1 - t2 ** t1} abc`; -`Exp: ${t1 ** t2 + t1} abc`; -`Exp: ${t1 ** t2 - t1} abc`; -`Exp: ${t1 + t2 ** t2 + t1} abc`; -`Exp: ${t1 - t2 ** t2 - t1} abc`; -`Exp: ${-t1 ** t2 - t1} abc`; -`Exp: ${+t1 ** t2 - t1} abc`; -`Exp: ${-++t1 ** t2 - t1} abc`; -`Exp: ${+--t1 ** t2 - t1} abc`; -`Exp: ${-t1++ ** t2 - t1} abc`; -`Exp: ${-t1-- ** t2 - t1} abc`; -`Exp: ${+t1++ ** t2 - t1} abc`; -`Exp: ${+t1-- ** t2 - t1} abc`; -`Exp: ${typeof t1 ** t2 ** t1} abc`; -`Exp: ${typeof t1 ** t2 + t1} abc`; -`Exp: ${typeof t1 ** (t2 - t1)} abc`; -`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; -`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; -`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; -`Exp: ${!t1 ** t2 ** t1} abc`; -`Exp: ${!t1 ** t2 ** ++t1} abc`; -`Exp: ${!t1 ** t2 ** --t1} abc`; - + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +`${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1 }`; +`${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof (t1 ** t2 ** t1) }`; + +`${t1 ** t2}${t1 ** t2}`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; + +`${t1 ** t2} hello world ${t1 ** t2}`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; //// [emitExponentiationOperatorInTemplateString1.js] var t1 = 10; var t2 = 10; var s; -"Exp: " + (Math.pow(t1, t2)) + " abc"; -"Exp: " + (Math.pow(t1, Math.pow(t2, t1))) + " abc"; -"Exp: " + (t1 + Math.pow(t2, t1)) + " abc"; -"Exp: " + (t1 - Math.pow(t2, t1)) + " abc"; -"Exp: " + (Math.pow(t1, t2) + t1) + " abc"; -"Exp: " + (Math.pow(t1, t2) - t1) + " abc"; -"Exp: " + (t1 + Math.pow(t2, t2) + t1) + " abc"; -"Exp: " + (t1 - Math.pow(t2, t2) - t1) + " abc"; -"Exp: " + (-Math.pow(t1, t2) - t1) + " abc"; -"Exp: " + (+Math.pow(t1, t2) - t1) + " abc"; -"Exp: " + (-Math.pow(++t1, t2) - t1) + " abc"; -"Exp: " + (+Math.pow(--t1, t2) - t1) + " abc"; -"Exp: " + (-Math.pow(t1++, t2) - t1) + " abc"; -"Exp: " + (-Math.pow(t1--, t2) - t1) + " abc"; -"Exp: " + (+Math.pow(t1++, t2) - t1) + " abc"; -"Exp: " + (+Math.pow(t1--, t2) - t1) + " abc"; -"Exp: " + typeof Math.pow(t1, Math.pow(t2, t1)) + " abc"; -"Exp: " + (typeof Math.pow(t1, t2) + t1) + " abc"; -"Exp: " + typeof Math.pow(t1, (t2 - t1)) + " abc"; -"Exp: " + (1 + typeof Math.pow(t1, Math.pow(t2, t1))) + " abc"; -"Exp: " + (2 + typeof Math.pow(t1, Math.pow(t2, ++t1))) + " abc"; -"Exp: " + (3 + typeof Math.pow(t1, Math.pow(t2, --t1))) + " abc"; -"Exp: " + !Math.pow(t1, Math.pow(t2, t1)) + " abc"; -"Exp: " + !Math.pow(t1, Math.pow(t2, ++t1)) + " abc"; -"Exp: " + !Math.pow(t1, Math.pow(t2, --t1)) + " abc"; +// TempateHead & TemplateTail are empty +"" + (Math.pow(t1, t2)); +"" + (Math.pow(t1, Math.pow(t2, t1))); +"" + (t1 + Math.pow(t2, t1)); +"" + (Math.pow(t1, t2) + t1); +"" + (t1 + Math.pow(t2, t2) + t1); +"" + typeof (Math.pow(t1, Math.pow(t2, t1))); +"" + (1 + typeof (Math.pow(t1, Math.pow(t2, t1)))); +"" + (Math.pow(t1, t2)) + (Math.pow(t1, t2)); +"" + (Math.pow(t1, Math.pow(t2, t1))) + (Math.pow(t1, Math.pow(t2, t1))); +"" + (t1 + Math.pow(t2, t1)) + (t1 + Math.pow(t2, t1)); +"" + (Math.pow(t1, t2) + t1) + (Math.pow(t1, t2) + t1); +"" + (t1 + Math.pow(t2, t2) + t1) + (t1 + Math.pow(t2, t2) + t1); +"" + typeof (Math.pow(t1, Math.pow(t2, t1))) + typeof (Math.pow(t1, Math.pow(t2, t1))); +(Math.pow(t1, t2)) + " hello world " + (Math.pow(t1, t2)); +(Math.pow(t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(t1, Math.pow(t2, t1))); +(t1 + Math.pow(t2, t1)) + " hello world " + (t1 + Math.pow(t2, t1)); +(Math.pow(t1, t2) + t1) + " hello world " + (Math.pow(t1, t2) + t1); +(t1 + Math.pow(t2, t2) + t1) + " hello world " + (t1 + Math.pow(t2, t2) + t1); +typeof (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + typeof (Math.pow(t1, Math.pow(t2, t1))); diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols index 5ef2abc4395..8830135987e 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols @@ -1,136 +1,143 @@ === tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts === + var t1 = 10; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) var t2 = 10; ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) var s; ->s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString1.ts, 3, 3)) -`Exp: ${t1 ** t2} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) -`Exp: ${t1 ** t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 + t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 - t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 ** t2 + t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t2 + t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 + t2 ** t2 + t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${1 + typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 - t2 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2}${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) -`Exp: ${-t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${+t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${-++t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${+--t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${-t1++ ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${-t1-- ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2} hello world ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) -`Exp: ${+t1++ ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${+t1-- ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${typeof t1 ** t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${typeof t1 ** t2 + t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${typeof t1 ** (t2 - t1)} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${!t1 ** t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${!t1 ** t2 ** ++t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${!t1 ** t2 ** --t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types index b6324c4bd4c..02ae523c168 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types @@ -1,4 +1,5 @@ === tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts === + var t1 = 10; >t1 : number >10 : number @@ -10,54 +11,39 @@ var t2 = 10; var s; >s : any -`Exp: ${t1 ** t2} abc`; ->`Exp: ${t1 ** t2} abc` : string +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +>`${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number -`Exp: ${t1 ** t2 ** t1} abc`; ->`Exp: ${t1 ** t2 ** t1} abc` : string +`${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number >t2 : number >t1 : number -`Exp: ${t1 + t2 ** t1} abc`; ->`Exp: ${t1 + t2 ** t1} abc` : string +`${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number >t2 : number >t1 : number -`Exp: ${t1 - t2 ** t1} abc`; ->`Exp: ${t1 - t2 ** t1} abc` : string ->t1 - t2 ** t1 : number ->t1 : number ->t2 ** t1 : number ->t2 : number ->t1 : number - -`Exp: ${t1 ** t2 + t1} abc`; ->`Exp: ${t1 ** t2 + t1} abc` : string +`${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number >t2 : number >t1 : number -`Exp: ${t1 ** t2 - t1} abc`; ->`Exp: ${t1 ** t2 - t1} abc` : string ->t1 ** t2 - t1 : number ->t1 ** t2 : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${t1 + t2 ** t2 + t1} abc`; ->`Exp: ${t1 + t2 ** t2 + t1} abc` : string +`${t1 + t2 ** t2 + t1 }`; +>`${t1 + t2 ** t2 + t1 }` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -66,183 +52,189 @@ var s; >t2 : number >t1 : number -`Exp: ${t1 - t2 ** t2 - t1} abc`; ->`Exp: ${t1 - t2 ** t2 - t1} abc` : string ->t1 - t2 ** t2 - t1 : number ->t1 - t2 ** t2 : number +`${typeof (t1 ** t2 ** t1) }`; +>`${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${1 + typeof (t1 ** t2 ** t1) }`; +>`${1 + typeof (t1 ** t2 ** t1) }` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2}${t1 ** t2}`; +>`${t1 ** t2}${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1}${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1}${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number >t1 : number >t2 ** t2 : number >t2 : number >t2 : number >t1 : number -`Exp: ${-t1 ** t2 - t1} abc`; ->`Exp: ${-t1 ** t2 - t1} abc` : string ->-t1 ** t2 - t1 : number ->-t1 ** t2 : number ->t1 ** t2 : number +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +>`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number >t1 : number +>t2 ** t1 : number >t2 : number >t1 : number - -`Exp: ${+t1 ** t2 - t1} abc`; ->`Exp: ${+t1 ** t2 - t1} abc` : string ->+t1 ** t2 - t1 : number ->+t1 ** t2 : number ->t1 ** t2 : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${-++t1 ** t2 - t1} abc`; ->`Exp: ${-++t1 ** t2 - t1} abc` : string ->-++t1 ** t2 - t1 : number ->-++t1 ** t2 : number ->++t1 ** t2 : number ->++t1 : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${+--t1 ** t2 - t1} abc`; ->`Exp: ${+--t1 ** t2 - t1} abc` : string ->+--t1 ** t2 - t1 : number ->+--t1 ** t2 : number ->--t1 ** t2 : number ->--t1 : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${-t1++ ** t2 - t1} abc`; ->`Exp: ${-t1++ ** t2 - t1} abc` : string ->-t1++ ** t2 - t1 : number ->-t1++ ** t2 : number ->t1++ ** t2 : number ->t1++ : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${-t1-- ** t2 - t1} abc`; ->`Exp: ${-t1-- ** t2 - t1} abc` : string ->-t1-- ** t2 - t1 : number ->-t1-- ** t2 : number ->t1-- ** t2 : number ->t1-- : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${+t1++ ** t2 - t1} abc`; ->`Exp: ${+t1++ ** t2 - t1} abc` : string ->+t1++ ** t2 - t1 : number ->+t1++ ** t2 : number ->t1++ ** t2 : number ->t1++ : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${+t1-- ** t2 - t1} abc`; ->`Exp: ${+t1-- ** t2 - t1} abc` : string ->+t1-- ** t2 - t1 : number ->+t1-- ** t2 : number ->t1-- ** t2 : number ->t1-- : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${typeof t1 ** t2 ** t1} abc`; ->`Exp: ${typeof t1 ** t2 ** t1} abc` : string ->typeof t1 ** t2 ** t1 : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number >t2 : number >t1 : number -`Exp: ${typeof t1 ** t2 + t1} abc`; ->`Exp: ${typeof t1 ** t2 + t1} abc` : string ->typeof t1 ** t2 + t1 : string ->typeof t1 ** t2 : string +`${t1 ** t2} hello world ${t1 ** t2}`; +>`${t1 ** t2} hello world ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number >t2 : number >t1 : number -`Exp: ${typeof t1 ** (t2 - t1)} abc`; ->`Exp: ${typeof t1 ** (t2 - t1)} abc` : string ->typeof t1 ** (t2 - t1) : string ->t1 ** (t2 - t1) : number +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number >t1 : number ->(t2 - t1) : number ->t2 - t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number >t2 : number >t1 : number -`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; ->`Exp: ${1 + typeof t1 ** t2 ** t1} abc` : string ->1 + typeof t1 ** t2 ** t1 : string ->1 : number ->typeof t1 ** t2 ** t1 : string +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number >t2 : number >t1 : number -`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; ->`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc` : string ->2 + typeof t1 ** t2 ** ++t1 : string ->2 : number ->typeof t1 ** t2 ** ++t1 : string ->t1 ** t2 ** ++t1 : number ->t1 : number ->t2 ** ++t1 : number ->t2 : number ->++t1 : number ->t1 : number - -`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; ->`Exp: ${3 + typeof t1 ** t2 ** --t1} abc` : string ->3 + typeof t1 ** t2 ** --t1 : string ->3 : number ->typeof t1 ** t2 ** --t1 : string ->t1 ** t2 ** --t1 : number ->t1 : number ->t2 ** --t1 : number ->t2 : number ->--t1 : number ->t1 : number - -`Exp: ${!t1 ** t2 ** t1} abc`; ->`Exp: ${!t1 ** t2 ** t1} abc` : string ->!t1 ** t2 ** t1 : boolean ->t1 ** t2 ** t1 : number ->t1 : number ->t2 ** t1 : number ->t2 : number ->t1 : number - -`Exp: ${!t1 ** t2 ** ++t1} abc`; ->`Exp: ${!t1 ** t2 ** ++t1} abc` : string ->!t1 ** t2 ** ++t1 : boolean ->t1 ** t2 ** ++t1 : number ->t1 : number ->t2 ** ++t1 : number ->t2 : number ->++t1 : number ->t1 : number - -`Exp: ${!t1 ** t2 ** --t1} abc`; ->`Exp: ${!t1 ** t2 ** --t1} abc` : string ->!t1 ** t2 ** --t1 : boolean ->t1 ** t2 ** --t1 : number ->t1 : number ->t2 ** --t1 : number ->t2 : number ->--t1 : number ->t1 : number - diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.js new file mode 100644 index 00000000000..d32caf45106 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTemplateString1ES6.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +`${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1 }`; +`${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof (t1 ** t2 ** t1) }`; + +`${t1 ** t2}${t1 ** t2}`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; + +`${t1 ** t2} hello world ${t1 ** t2}`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; + +//// [emitExponentiationOperatorInTemplateString1ES6.js] +var t1 = 10; +var t2 = 10; +var s; +// TempateHead & TemplateTail are empty +`${Math.pow(t1, t2)}`; +`${Math.pow(t1, Math.pow(t2, t1))}`; +`${t1 + Math.pow(t2, t1)}`; +`${Math.pow(t1, t2) + t1}`; +`${t1 + Math.pow(t2, t2) + t1}`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`${1 + typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`${Math.pow(t1, t2)}${Math.pow(t1, t2)}`; +`${Math.pow(t1, Math.pow(t2, t1))}${Math.pow(t1, Math.pow(t2, t1))}`; +`${t1 + Math.pow(t2, t1)}${t1 + Math.pow(t2, t1)}`; +`${Math.pow(t1, t2) + t1}${Math.pow(t1, t2) + t1}`; +`${t1 + Math.pow(t2, t2) + t1}${t1 + Math.pow(t2, t2) + t1}`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))}${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`${Math.pow(t1, t2)} hello world ${Math.pow(t1, t2)}`; +`${Math.pow(t1, Math.pow(t2, t1))} hello world ${Math.pow(t1, Math.pow(t2, t1))}`; +`${t1 + Math.pow(t2, t1)} hello world ${t1 + Math.pow(t2, t1)}`; +`${Math.pow(t1, t2) + t1} hello world ${Math.pow(t1, t2) + t1}`; +`${t1 + Math.pow(t2, t2) + t1} hello world ${t1 + Math.pow(t2, t2) + t1}`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} hello world ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.symbols new file mode 100644 index 00000000000..7b07fa26bba --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 3, 3)) + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${1 + typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2}${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2} hello world ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types new file mode 100644 index 00000000000..c2ee01ff23f --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +>`${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1 }`; +>`${t1 + t2 ** t2 + t1 }` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) }`; +>`${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${1 + typeof (t1 ** t2 ** t1) }`; +>`${1 + typeof (t1 ** t2 ** t1) }` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2}${t1 ** t2}`; +>`${t1 ** t2}${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1}${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1}${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +>`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2} hello world ${t1 ** t2}`; +>`${t1 ** t2} hello world ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.js new file mode 100644 index 00000000000..73384762706 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTemplateString2.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With templateHead +`hello ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1 }`; +`hello ${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2}${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; + +//// [emitExponentiationOperatorInTemplateString2.js] +var t1 = 10; +var t2 = 10; +var s; +// With templateHead +"hello " + (Math.pow(t1, t2)); +"hello " + (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (t1 + Math.pow(t2, t1)); +"hello " + (Math.pow(t1, t2) + t1); +"hello " + (t1 + Math.pow(t2, t2) + t1); +"hello " + typeof (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (1 + typeof (Math.pow(t1, Math.pow(t2, t1)))); +"hello " + (Math.pow(t1, t2)) + (Math.pow(t1, t2)); +"hello " + (Math.pow(t1, Math.pow(t2, t1))) + (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (t1 + Math.pow(t2, t1)) + (t1 + Math.pow(t2, t1)); +"hello " + (Math.pow(t1, t2) + t1) + (Math.pow(t1, t2) + t1); +"hello " + (t1 + Math.pow(t2, t2) + t1) + (t1 + Math.pow(t2, t2) + t1); +"hello " + typeof (Math.pow(t1, Math.pow(t2, t1))) + typeof (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (Math.pow(t1, t2)) + " hello world " + (Math.pow(t1, t2)); +"hello " + (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (t1 + Math.pow(t2, t1)) + " hello world " + (t1 + Math.pow(t2, t1)); +"hello " + (Math.pow(t1, t2) + t1) + " hello world " + (Math.pow(t1, t2) + t1); +"hello " + (t1 + Math.pow(t2, t2) + t1) + " hello world " + (t1 + Math.pow(t2, t2) + t1); +"hello " + typeof (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + typeof (Math.pow(t1, Math.pow(t2, t1))); diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.symbols new file mode 100644 index 00000000000..224499c1289 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString2.ts, 3, 3)) + +// With templateHead +`hello ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${1 + typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2}${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types new file mode 100644 index 00000000000..05816e94c6c --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With templateHead +`hello ${t1 ** t2}`; +>`hello ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1 }`; +>`hello ${t1 + t2 ** t2 + t1 }` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${1 + typeof (t1 ** t2 ** t1) }`; +>`hello ${1 + typeof (t1 ** t2 ** t1) }` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2}${t1 ** t2}`; +>`hello ${t1 ** t2}${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +>`hello ${t1 ** t2} hello world ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.js new file mode 100644 index 00000000000..ac92b4598aa --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTemplateString2ES6.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With templateHead +`hello ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1 }`; +`hello ${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2}${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; + +//// [emitExponentiationOperatorInTemplateString2ES6.js] +var t1 = 10; +var t2 = 10; +var s; +// With templateHead +`hello ${Math.pow(t1, t2)}`; +`hello ${Math.pow(t1, Math.pow(t2, t1))}`; +`hello ${t1 + Math.pow(t2, t1)}`; +`hello ${Math.pow(t1, t2) + t1}`; +`hello ${t1 + Math.pow(t2, t2) + t1}`; +`hello ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`hello ${1 + typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`hello ${Math.pow(t1, t2)}${Math.pow(t1, t2)}`; +`hello ${Math.pow(t1, Math.pow(t2, t1))}${Math.pow(t1, Math.pow(t2, t1))}`; +`hello ${t1 + Math.pow(t2, t1)}${t1 + Math.pow(t2, t1)}`; +`hello ${Math.pow(t1, t2) + t1}${Math.pow(t1, t2) + t1}`; +`hello ${t1 + Math.pow(t2, t2) + t1}${t1 + Math.pow(t2, t2) + t1}`; +`hello ${typeof (Math.pow(t1, Math.pow(t2, t1)))}${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`hello ${Math.pow(t1, t2)} hello world ${Math.pow(t1, t2)}`; +`hello ${Math.pow(t1, Math.pow(t2, t1))} hello world ${Math.pow(t1, Math.pow(t2, t1))}`; +`hello ${t1 + Math.pow(t2, t1)} hello world ${t1 + Math.pow(t2, t1)}`; +`hello ${Math.pow(t1, t2) + t1} hello world ${Math.pow(t1, t2) + t1}`; +`hello ${t1 + Math.pow(t2, t2) + t1} hello world ${t1 + Math.pow(t2, t2) + t1}`; +`hello ${typeof (Math.pow(t1, Math.pow(t2, t1)))} hello world ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.symbols new file mode 100644 index 00000000000..fd674b21d33 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 3, 3)) + +// With templateHead +`hello ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${1 + typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2}${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types new file mode 100644 index 00000000000..b77e38587c2 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With templateHead +`hello ${t1 ** t2}`; +>`hello ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1 }`; +>`hello ${t1 + t2 ** t2 + t1 }` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${1 + typeof (t1 ** t2 ** t1) }`; +>`hello ${1 + typeof (t1 ** t2 ** t1) }` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2}${t1 ** t2}`; +>`hello ${t1 ** t2}${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +>`hello ${t1 ** t2} hello world ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.js new file mode 100644 index 00000000000..9c3b937d94b --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.js @@ -0,0 +1,54 @@ +//// [emitExponentiationOperatorInTemplateString3.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** t2} world`; +`${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; +`${1 + typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2}${t1 ** t2} world`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; + + +//// [emitExponentiationOperatorInTemplateString3.js] +var t1 = 10; +var t2 = 10; +var s; +// With TemplateTail +(Math.pow(t1, t2)) + " world"; +(Math.pow(t1, Math.pow(t2, t1))) + " world"; +(t1 + Math.pow(t2, t1)) + " world"; +(Math.pow(t1, t2) + t1) + " world"; +(t1 + Math.pow(t2, t2) + t1) + " world"; +typeof (Math.pow(t1, Math.pow(t2, t1))) + " world"; +(1 + typeof (Math.pow(t1, Math.pow(t2, t1)))) + " world"; +"" + (Math.pow(t1, t2)) + (Math.pow(t1, t2)) + " world"; +"" + (Math.pow(t1, Math.pow(t2, t1))) + (Math.pow(t1, Math.pow(t2, t1))) + " world"; +"" + (t1 + Math.pow(t2, t1)) + (t1 + Math.pow(t2, t1)) + " world"; +"" + (Math.pow(t1, t2) + t1) + (Math.pow(t1, t2) + t1) + " world"; +"" + (t1 + Math.pow(t2, t2) + t1) + (t1 + Math.pow(t2, t2) + t1) + " world"; +"" + typeof (Math.pow(t1, Math.pow(t2, t1))) + typeof (Math.pow(t1, Math.pow(t2, t1))) + " world"; +(Math.pow(t1, t2)) + " hello world " + (Math.pow(t1, t2)) + " !!"; +(Math.pow(t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(t1, Math.pow(t2, t1))) + " !!"; +(t1 + Math.pow(t2, t1)) + " hello world " + (t1 + Math.pow(t2, t1)) + " !!"; +(Math.pow(t1, t2) + t1) + " hello world " + (Math.pow(t1, t2) + t1) + " !!"; +(t1 + Math.pow(t2, t2) + t1) + " hello world " + (t1 + Math.pow(t2, t2) + t1) + " !!"; +typeof (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + typeof (Math.pow(t1, Math.pow(t2, t1))) + " !!"; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.symbols new file mode 100644 index 00000000000..758a0e2956b --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString3.ts, 3, 3)) + +// With TemplateTail +`${t1 ** t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) + +`${t1 ** t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1 } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${1 + typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2}${t1 ** t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types new file mode 100644 index 00000000000..88c23ee8a0b --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With TemplateTail +`${t1 ** t2} world`; +>`${t1 ** t2} world` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} world`; +>`${t1 ** t2 ** t1} world` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} world`; +>`${t1 + t2 ** t1} world` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} world`; +>`${t1 ** t2 + t1} world` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1 } world`; +>`${t1 + t2 ** t2 + t1 } world` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${1 + typeof (t1 ** t2 ** t1) } world`; +>`${1 + typeof (t1 ** t2 ** t1) } world` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2}${t1 ** t2} world`; +>`${t1 ** t2}${t1 ** t2} world` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +>`${t1 + t2 ** t1}${t1 + t2 ** t1} world` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +>`${t1 ** t2 + t1}${t1 ** t2 + t1} world` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +>`${t1 ** t2} hello world ${t1 ** t2} !!` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.js new file mode 100644 index 00000000000..ec037dd2150 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.js @@ -0,0 +1,54 @@ +//// [emitExponentiationOperatorInTemplateString3ES6.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** t2} world`; +`${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; +`${1 + typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2}${t1 ** t2} world`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; + + +//// [emitExponentiationOperatorInTemplateString3ES6.js] +var t1 = 10; +var t2 = 10; +var s; +// With TemplateTail +`${Math.pow(t1, t2)} world`; +`${Math.pow(t1, Math.pow(t2, t1))} world`; +`${t1 + Math.pow(t2, t1)} world`; +`${Math.pow(t1, t2) + t1} world`; +`${t1 + Math.pow(t2, t2) + t1} world`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} world`; +`${1 + typeof (Math.pow(t1, Math.pow(t2, t1)))} world`; +`${Math.pow(t1, t2)}${Math.pow(t1, t2)} world`; +`${Math.pow(t1, Math.pow(t2, t1))}${Math.pow(t1, Math.pow(t2, t1))} world`; +`${t1 + Math.pow(t2, t1)}${t1 + Math.pow(t2, t1)} world`; +`${Math.pow(t1, t2) + t1}${Math.pow(t1, t2) + t1} world`; +`${t1 + Math.pow(t2, t2) + t1}${t1 + Math.pow(t2, t2) + t1} world`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))}${typeof (Math.pow(t1, Math.pow(t2, t1)))} world`; +`${Math.pow(t1, t2)} hello world ${Math.pow(t1, t2)} !!`; +`${Math.pow(t1, Math.pow(t2, t1))} hello world ${Math.pow(t1, Math.pow(t2, t1))} !!`; +`${t1 + Math.pow(t2, t1)} hello world ${t1 + Math.pow(t2, t1)} !!`; +`${Math.pow(t1, t2) + t1} hello world ${Math.pow(t1, t2) + t1} !!`; +`${t1 + Math.pow(t2, t2) + t1} hello world ${t1 + Math.pow(t2, t2) + t1} !!`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} hello world ${typeof (Math.pow(t1, Math.pow(t2, t1)))} !!`; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.symbols new file mode 100644 index 00000000000..a6062348432 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 3, 3)) + +// With TemplateTail +`${t1 ** t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1 } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${1 + typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2}${t1 ** t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types new file mode 100644 index 00000000000..e0d59cc1319 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With TemplateTail +`${t1 ** t2} world`; +>`${t1 ** t2} world` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} world`; +>`${t1 ** t2 ** t1} world` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} world`; +>`${t1 + t2 ** t1} world` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} world`; +>`${t1 ** t2 + t1} world` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1 } world`; +>`${t1 + t2 ** t2 + t1 } world` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${1 + typeof (t1 ** t2 ** t1) } world`; +>`${1 + typeof (t1 ** t2 ** t1) } world` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2}${t1 ** t2} world`; +>`${t1 ** t2}${t1 ** t2} world` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +>`${t1 + t2 ** t1}${t1 + t2 ** t1} world` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +>`${t1 ** t2 + t1}${t1 ** t2 + t1} world` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +>`${t1 ** t2} hello world ${t1 ** t2} !!` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + From d0aaf412520e713654fcbc26cfd376a11ffd1995 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 19:06:17 -0700 Subject: [PATCH 054/121] Add baselines when having early syntax error in exponentiation --- ...nTemplateStringWithSyntaxError1.errors.txt | 165 ++++++++++ ...peratorInTemplateStringWithSyntaxError1.js | 53 ++++ ...nTemplateStringWithSyntaxError2.errors.txt | 166 ++++++++++ ...peratorInTemplateStringWithSyntaxError2.js | 54 ++++ ...nTemplateStringWithSyntaxError3.errors.txt | 165 ++++++++++ ...peratorInTemplateStringWithSyntaxError3.js | 53 ++++ ...onentiationOperatorSyntaxError1.errors.txt | 135 ++++++++ .../exponentiationOperatorSyntaxError1.js | 74 +++++ ...onentiationOperatorSyntaxError2.errors.txt | 294 ++++++++++++++++++ .../exponentiationOperatorSyntaxError2.js | 116 +++++++ 10 files changed, 1275 insertions(+) create mode 100644 tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.js create mode 100644 tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.js create mode 100644 tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.js create mode 100644 tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorSyntaxError1.js create mode 100644 tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorSyntaxError2.js diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt new file mode 100644 index 00000000000..dee60064e85 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt @@ -0,0 +1,165 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(9,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(10,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(11,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,25): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,25): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,28): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,36): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,46): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,38): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,41): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,51): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,49): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,59): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts (45 errors) ==== + + var t1 = 10; + var t2 = 10; + var s; + + // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () + // TempateHead & TemplateTail are empty + `${1 + typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-++t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-t1++ ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${!t1 ** t2 ** --t1 }`; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + `${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + `${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.js b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.js new file mode 100644 index 00000000000..cf97360b23a --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.js @@ -0,0 +1,53 @@ +//// [exponentiationOperatorInTemplateStringWithSyntaxError1.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +// TempateHead & TemplateTail are empty +`${1 + typeof t1 ** t2 ** t1}`; +`${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}`; + +`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; +`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + +`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; +`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; +`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; +`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; +`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; +`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; + +//// [exponentiationOperatorInTemplateStringWithSyntaxError1.js] +var t1 = 10; +var t2 = 10; +var s; +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +// TempateHead & TemplateTail are empty +"" + (1 + Math.pow(typeof t1, Math.pow(t2, t1))); +"" + (Math.pow(-t1, t2) - t1); +"" + (Math.pow(-++t1, t2) - t1); +"" + (Math.pow(-t1++, t2) - t1); +"" + (Math.pow(!t1, Math.pow(t2, --t1))); +"" + (Math.pow(typeof t1, Math.pow(t2, t1))); +"" + (Math.pow(-t1, t2) - t1) + (Math.pow(-t1, t2) - t1); +"" + (Math.pow(-++t1, t2) - t1) + (Math.pow(-++t1, t2) - t1); +"" + (Math.pow(-t1++, t2) - t1) + (Math.pow(-t1++, t2) - t1); +"" + (Math.pow(!t1, Math.pow(t2, --t1))) + (Math.pow(!t1, Math.pow(t2, --t1))); +"" + (Math.pow(typeof t1, Math.pow(t2, t1))) + (Math.pow(typeof t1, Math.pow(t2, t1))); +"" + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + (1 + Math.pow(typeof t1, Math.pow(t2, t1))); +(Math.pow(-t1, t2) - t1) + " hello world " + (Math.pow(-t1, t2) - t1); +(Math.pow(-++t1, t2) - t1) + " hello world " + (Math.pow(-++t1, t2) - t1); +(Math.pow(-t1++, t2) - t1) + " hello world " + (Math.pow(-t1++, t2) - t1); +(Math.pow(!t1, Math.pow(t2, --t1))) + " hello world " + (Math.pow(!t1, Math.pow(t2, --t1))); +(Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(typeof t1, Math.pow(t2, t1))); +(1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (1 + Math.pow(typeof t1, Math.pow(t2, t1))); diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt new file mode 100644 index 00000000000..b73c8b44932 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt @@ -0,0 +1,166 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(8,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(9,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(10,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,24): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,31): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,35): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,35): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,31): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,35): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,34): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,44): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,24): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,42): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,52): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,44): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,48): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,48): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,44): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,48): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,47): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,57): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,24): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,55): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,65): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts (45 errors) ==== + + var t1 = 10; + var t2 = 10; + var s; + + // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () + // With templateHead + `hello ${-t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${-++t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${-t1++ ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${!t1 ** t2 ** --t1 }`; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${1 + typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + `hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + `hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.js b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.js new file mode 100644 index 00000000000..486c07f8af6 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.js @@ -0,0 +1,54 @@ +//// [exponentiationOperatorInTemplateStringWithSyntaxError2.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +// With templateHead +`hello ${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1}`; +`hello ${1 + typeof t1 ** t2 ** t1}`; + +`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; +`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; + +`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; +`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; +`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; +`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; +`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; +`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; + + +//// [exponentiationOperatorInTemplateStringWithSyntaxError2.js] +var t1 = 10; +var t2 = 10; +var s; +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +// With templateHead +"hello " + (Math.pow(-t1, t2) - t1); +"hello " + (Math.pow(-++t1, t2) - t1); +"hello " + (Math.pow(-t1++, t2) - t1); +"hello " + (Math.pow(!t1, Math.pow(t2, --t1))); +"hello " + (Math.pow(typeof t1, Math.pow(t2, t1))); +"hello " + (1 + Math.pow(typeof t1, Math.pow(t2, t1))); +"hello " + (Math.pow(-t1, t2) - t1) + (Math.pow(-t1, t2) - t1); +"hello " + (Math.pow(-++t1, t2) - t1) + (Math.pow(-++t1, t2) - t1); +"hello " + (Math.pow(-t1++, t2) - t1) + (Math.pow(-t1++, t2) - t1); +"hello " + (Math.pow(!t1, Math.pow(t2, --t1))) + (Math.pow(!t1, Math.pow(t2, --t1))); +"hello " + (Math.pow(typeof t1, Math.pow(t2, t1))) + (Math.pow(typeof t1, Math.pow(t2, t1))); +"hello " + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + (1 + Math.pow(typeof t1, Math.pow(t2, t1))); +"hello " + (Math.pow(-t1, t2) - t1) + " hello world " + (Math.pow(-t1, t2) - t1); +"hello " + (Math.pow(-++t1, t2) - t1) + " hello world " + (Math.pow(-++t1, t2) - t1); +"hello " + (Math.pow(-t1++, t2) - t1) + " hello world " + (Math.pow(-t1++, t2) - t1); +"hello " + (Math.pow(!t1, Math.pow(t2, --t1))) + " hello world " + (Math.pow(!t1, Math.pow(t2, --t1))); +"hello " + (Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(typeof t1, Math.pow(t2, t1))); +"hello " + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (1 + Math.pow(typeof t1, Math.pow(t2, t1))); diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt new file mode 100644 index 00000000000..9fdf5712851 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt @@ -0,0 +1,165 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(8,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(9,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(10,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,25): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,25): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,28): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,36): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,46): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,38): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,41): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,51): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,49): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,59): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts (45 errors) ==== + + var t1 = 10; + var t2 = 10; + var s; + + // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () + // With TemplateTail + `${-t1 ** t2 - t1} world`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-++t1 ** t2 - t1} world`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-t1++ ** t2 - t1} world`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${!t1 ** t2 ** --t1 } world`; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${typeof t1 ** t2 ** t1} world`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${1 + typeof t1 ** t2 ** t1} world`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + `${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + `${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + `${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.js b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.js new file mode 100644 index 00000000000..1641c2bbb80 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.js @@ -0,0 +1,53 @@ +//// [exponentiationOperatorInTemplateStringWithSyntaxError3.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +// With TemplateTail +`${-t1 ** t2 - t1} world`; +`${-++t1 ** t2 - t1} world`; +`${-t1++ ** t2 - t1} world`; +`${!t1 ** t2 ** --t1 } world`; +`${typeof t1 ** t2 ** t1} world`; +`${1 + typeof t1 ** t2 ** t1} world`; + +`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; +`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; +`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; +`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; +`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; +`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; + +`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; +`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; +`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; +`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; +`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; +`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; + +//// [exponentiationOperatorInTemplateStringWithSyntaxError3.js] +var t1 = 10; +var t2 = 10; +var s; +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +// With TemplateTail +(Math.pow(-t1, t2) - t1) + " world"; +(Math.pow(-++t1, t2) - t1) + " world"; +(Math.pow(-t1++, t2) - t1) + " world"; +(Math.pow(!t1, Math.pow(t2, --t1))) + " world"; +(Math.pow(typeof t1, Math.pow(t2, t1))) + " world"; +(1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " world"; +"" + (Math.pow(-t1, t2) - t1) + (Math.pow(-t1, t2) - t1) + " world"; +"" + (Math.pow(-++t1, t2) - t1) + (Math.pow(-++t1, t2) - t1) + " world"; +"" + (Math.pow(-t1++, t2) - t1) + (Math.pow(-t1++, t2) - t1) + " world"; +"" + (Math.pow(!t1, Math.pow(t2, --t1))) + (Math.pow(!t1, Math.pow(t2, --t1))) + " world"; +"" + (Math.pow(typeof t1, Math.pow(t2, t1))) + (Math.pow(typeof t1, Math.pow(t2, t1))) + " world"; +"" + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " world"; +(Math.pow(-t1, t2) - t1) + " hello world " + (Math.pow(-t1, t2) - t1) + " !!"; +(Math.pow(-++t1, t2) - t1) + " hello world " + (Math.pow(-++t1, t2) - t1) + " !!"; +(Math.pow(-t1++, t2) - t1) + " hello world " + (Math.pow(-t1++, t2) - t1) + " !!"; +(Math.pow(!t1, Math.pow(t2, --t1))) + " hello world " + (Math.pow(!t1, Math.pow(t2, --t1))) + " !!"; +(Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(typeof t1, Math.pow(t2, t1))) + " !!"; +(1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " !!"; diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt b/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt new file mode 100644 index 00000000000..774f733748d --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt @@ -0,0 +1,135 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(3,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(4,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(5,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(6,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(8,11): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(12,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(13,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(14,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(15,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(16,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(17,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(18,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(19,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(21,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(22,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(23,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(24,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(25,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(26,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(27,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(28,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(29,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(30,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(31,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(32,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(33,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(34,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(35,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(36,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts (31 errors) ==== + + // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () + -1 ** 2; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +1 ** 2 + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** -2 ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** -2 ** -3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -1 ** -2 ** -3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -(1 ** 2) ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + var temp = 10; + + -++temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +--temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -temp++ ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +temp-- ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** -++temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** +--temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** -temp++ ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** +temp-- ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + -3 ** temp++; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -3 ** temp--; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -3 ** ++temp; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -3 ** --temp; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +3 ** temp++; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +3 ** temp--; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +3 ** ++temp; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +3 ** --temp; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -3 ** temp++ ** 2; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -3 ** temp-- ** 2; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -3 ** ++temp ** 2; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + -3 ** --temp ** 2; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +3 ** temp++ ** 2; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +3 ** temp-- ** 2; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +3 ** ++temp ** 2; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + +3 ** --temp ** 2; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + + \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError1.js b/tests/baselines/reference/exponentiationOperatorSyntaxError1.js new file mode 100644 index 00000000000..05994151610 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError1.js @@ -0,0 +1,74 @@ +//// [exponentiationOperatorSyntaxError1.ts] + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +-1 ** 2; ++1 ** 2 +1 ** -2 ** 3; +1 ** -2 ** -3; +-1 ** -2 ** -3; +-(1 ** 2) ** 3; + +var temp = 10; + +-++temp ** 3; ++--temp ** 3; +-temp++ ** 3; ++temp-- ** 3; +1 ** -++temp ** 3; +1 ** +--temp ** 3; +1 ** -temp++ ** 3; +1 ** +temp-- ** 3; + +-3 ** temp++; +-3 ** temp--; +-3 ** ++temp; +-3 ** --temp; ++3 ** temp++; ++3 ** temp--; ++3 ** ++temp; ++3 ** --temp; +-3 ** temp++ ** 2; +-3 ** temp-- ** 2; +-3 ** ++temp ** 2; +-3 ** --temp ** 2; ++3 ** temp++ ** 2; ++3 ** temp-- ** 2; ++3 ** ++temp ** 2; ++3 ** --temp ** 2; + + + + +//// [exponentiationOperatorSyntaxError1.js] +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +Math.pow(-1, 2); +Math.pow(+1, 2); +Math.pow(1, Math.pow(-2, 3)); +Math.pow(1, Math.pow(-2, -3)); +Math.pow(-1, Math.pow(-2, -3)); +Math.pow(-(Math.pow(1, 2)), 3); +var temp = 10; +Math.pow(-++temp, 3); +Math.pow(+--temp, 3); +Math.pow(-temp++, 3); +Math.pow(+temp--, 3); +Math.pow(1, Math.pow(-++temp, 3)); +Math.pow(1, Math.pow(+--temp, 3)); +Math.pow(1, Math.pow(-temp++, 3)); +Math.pow(1, Math.pow(+temp--, 3)); +Math.pow(-3, temp++); +Math.pow(-3, temp--); +Math.pow(-3, ++temp); +Math.pow(-3, --temp); +Math.pow(+3, temp++); +Math.pow(+3, temp--); +Math.pow(+3, ++temp); +Math.pow(+3, --temp); +Math.pow(-3, Math.pow(temp++, 2)); +Math.pow(-3, Math.pow(temp--, 2)); +Math.pow(-3, Math.pow(++temp, 2)); +Math.pow(-3, Math.pow(--temp, 2)); +Math.pow(+3, Math.pow(temp++, 2)); +Math.pow(+3, Math.pow(temp--, 2)); +Math.pow(+3, Math.pow(++temp, 2)); +Math.pow(+3, Math.pow(--temp, 2)); diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt new file mode 100644 index 00000000000..67ff6667292 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt @@ -0,0 +1,294 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(28,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(29,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(30,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(31,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(32,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(34,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(35,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(36,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(37,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(38,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(40,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(41,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(42,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(43,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(44,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(46,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(47,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(48,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(49,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(50,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts (76 errors) ==== + + // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () + var temp; + + delete --temp ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + delete ++temp ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + delete temp-- ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + delete temp++ ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + + 1 ** delete --temp ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** delete ++temp ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** delete temp-- ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** delete temp++ ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + typeof --temp ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + typeof temp-- ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + typeof 3 ** 4; + ~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + typeof temp++ ** 4; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + typeof temp-- ** 4; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + 1 ** typeof --temp ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** typeof temp-- ** 3; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** typeof 3 ** 4; + ~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** typeof temp++ ** 4; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** typeof temp-- ** 4; + ~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + void --temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + void temp-- ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + void 3 ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + void temp++ ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + void temp-- ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + 1 ** void --temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** void temp-- ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** void 3 ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** void temp++ ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** void temp-- ** 4 ; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + ~ --temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~temp-- ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~3 ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~temp++ ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~temp-- ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + 1 ** ~ --temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** ~temp-- ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** ~3 ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** ~temp++ ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** ~temp-- ** 4; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + ! --temp ** 3; + ~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + !temp-- ** 3; + ~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + !3 ** 4; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + !temp++ ** 4; + ~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + !temp-- ** 4; + ~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + + 1 ** ! --temp ** 3; + ~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** !temp-- ** 3; + ~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** !3 ** 4; + ~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** !temp++ ** 4; + ~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + 1 ** !temp-- ** 4; + ~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError2.js b/tests/baselines/reference/exponentiationOperatorSyntaxError2.js new file mode 100644 index 00000000000..758160ec312 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError2.js @@ -0,0 +1,116 @@ +//// [exponentiationOperatorSyntaxError2.ts] + +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +var temp; + +delete --temp ** 3; +delete ++temp ** 3; +delete temp-- ** 3; +delete temp++ ** 3; + + +1 ** delete --temp ** 3; +1 ** delete ++temp ** 3; +1 ** delete temp-- ** 3; +1 ** delete temp++ ** 3; + +typeof --temp ** 3; +typeof temp-- ** 3; +typeof 3 ** 4; +typeof temp++ ** 4; +typeof temp-- ** 4; + +1 ** typeof --temp ** 3; +1 ** typeof temp-- ** 3; +1 ** typeof 3 ** 4; +1 ** typeof temp++ ** 4; +1 ** typeof temp-- ** 4; + +void --temp ** 3; +void temp-- ** 3; +void 3 ** 4; +void temp++ ** 4; +void temp-- ** 4; + +1 ** void --temp ** 3; +1 ** void temp-- ** 3; +1 ** void 3 ** 4; +1 ** void temp++ ** 4; +1 ** void temp-- ** 4 ; + +~ --temp ** 3; +~temp-- ** 3; +~3 ** 4; +~temp++ ** 4; +~temp-- ** 4; + +1 ** ~ --temp ** 3; +1 ** ~temp-- ** 3; +1 ** ~3 ** 4; +1 ** ~temp++ ** 4; +1 ** ~temp-- ** 4; + +! --temp ** 3; +!temp-- ** 3; +!3 ** 4; +!temp++ ** 4; +!temp-- ** 4; + +1 ** ! --temp ** 3; +1 ** !temp-- ** 3; +1 ** !3 ** 4; +1 ** !temp++ ** 4; +1 ** !temp-- ** 4; + + +//// [exponentiationOperatorSyntaxError2.js] +// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () +var temp; +Math.pow(delete --temp, 3); +Math.pow(delete ++temp, 3); +Math.pow(delete temp--, 3); +Math.pow(delete temp++, 3); +Math.pow(1, Math.pow(delete --temp, 3)); +Math.pow(1, Math.pow(delete ++temp, 3)); +Math.pow(1, Math.pow(delete temp--, 3)); +Math.pow(1, Math.pow(delete temp++, 3)); +Math.pow(typeof --temp, 3); +Math.pow(typeof temp--, 3); +Math.pow(typeof 3, 4); +Math.pow(typeof temp++, 4); +Math.pow(typeof temp--, 4); +Math.pow(1, Math.pow(typeof --temp, 3)); +Math.pow(1, Math.pow(typeof temp--, 3)); +Math.pow(1, Math.pow(typeof 3, 4)); +Math.pow(1, Math.pow(typeof temp++, 4)); +Math.pow(1, Math.pow(typeof temp--, 4)); +Math.pow(void --temp, 3); +Math.pow(void temp--, 3); +Math.pow(void 3, 4); +Math.pow(void temp++, 4); +Math.pow(void temp--, 4); +Math.pow(1, Math.pow(void --temp, 3)); +Math.pow(1, Math.pow(void temp--, 3)); +Math.pow(1, Math.pow(void 3, 4)); +Math.pow(1, Math.pow(void temp++, 4)); +Math.pow(1, Math.pow(void temp--, 4)); +Math.pow(~--temp, 3); +Math.pow(~temp--, 3); +Math.pow(~3, 4); +Math.pow(~temp++, 4); +Math.pow(~temp--, 4); +Math.pow(1, Math.pow(~--temp, 3)); +Math.pow(1, Math.pow(~temp--, 3)); +Math.pow(1, Math.pow(~3, 4)); +Math.pow(1, Math.pow(~temp++, 4)); +Math.pow(1, Math.pow(~temp--, 4)); +Math.pow(!--temp, 3); +Math.pow(!temp--, 3); +Math.pow(!3, 4); +Math.pow(!temp++, 4); +Math.pow(!temp--, 4); +Math.pow(1, Math.pow(!--temp, 3)); +Math.pow(1, Math.pow(!temp--, 3)); +Math.pow(1, Math.pow(!3, 4)); +Math.pow(1, Math.pow(!temp++, 4)); +Math.pow(1, Math.pow(!temp--, 4)); From bd7cc1e7ef5b86b730ae712056a3c15cdd6a11f7 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 19:06:48 -0700 Subject: [PATCH 055/121] Invalid usage of exponentiation --- ...idSimpleUnaryExpressionOperands.errors.txt | 123 ++++++++++++++++++ ...ithInvalidSimpleUnaryExpressionOperands.js | 69 ++++++++++ ...eratorWithTemplateStringInvalid.errors.txt | 57 ++++++++ ...iationOperatorWithTemplateStringInvalid.js | 34 +++++ ...torWithTemplateStringInvalidES6.errors.txt | 57 ++++++++ ...ionOperatorWithTemplateStringInvalidES6.js | 31 +++++ 6 files changed, 371 insertions(+) create mode 100644 tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.js create mode 100644 tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.js diff --git a/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.errors.txt new file mode 100644 index 00000000000..f43cbd0042a --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.errors.txt @@ -0,0 +1,123 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(4,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(5,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(10,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(12,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(13,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(14,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(16,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(17,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(19,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(20,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(22,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(23,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(24,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(25,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(26,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(29,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(30,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(31,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(33,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(34,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(35,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(36,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts (28 errors) ==== + var temp: any; + + // Error: incorrect type on left-hand side + (! --temp) ** 3; + ~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (!temp--) ** 3; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (!3) ** 4; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (!temp++) ** 4; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (!temp--) ** 4; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + (! --temp) ** 3 ** 1; + ~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (!temp--) ** 3 ** 1; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (!3) ** 4 ** 1; + ~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (!temp++) ** 4 ** 1; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (!temp--) ** 4 ** 1; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + (typeof --temp) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (typeof temp--) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (typeof 3) ** 4; + ~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (typeof temp++) ** 4; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (typeof temp--) ** 4; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + 1 ** (typeof --temp) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 1 ** (typeof temp--) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 1 ** (typeof 3) ** 4; + ~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 1 ** (typeof temp++) ** 4; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 1 ** (typeof temp--) ** 4; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + (delete --temp) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (delete ++temp) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (delete temp--) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + (delete temp++) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + 1 ** (delete --temp) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 1 ** (delete ++temp) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 1 ** (delete temp--) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 1 ** (delete temp++) ** 3; + ~~~~~~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.js b/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.js new file mode 100644 index 00000000000..8977ea10eed --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.js @@ -0,0 +1,69 @@ +//// [exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts] +var temp: any; + +// Error: incorrect type on left-hand side +(! --temp) ** 3; +(!temp--) ** 3; +(!3) ** 4; +(!temp++) ** 4; +(!temp--) ** 4; + +(! --temp) ** 3 ** 1; +(!temp--) ** 3 ** 1; +(!3) ** 4 ** 1; +(!temp++) ** 4 ** 1; +(!temp--) ** 4 ** 1; + +(typeof --temp) ** 3; +(typeof temp--) ** 3; +(typeof 3) ** 4; +(typeof temp++) ** 4; +(typeof temp--) ** 4; + +1 ** (typeof --temp) ** 3; +1 ** (typeof temp--) ** 3; +1 ** (typeof 3) ** 4; +1 ** (typeof temp++) ** 4; +1 ** (typeof temp--) ** 4; + +(delete --temp) ** 3; +(delete ++temp) ** 3; +(delete temp--) ** 3; +(delete temp++) ** 3; + +1 ** (delete --temp) ** 3; +1 ** (delete ++temp) ** 3; +1 ** (delete temp--) ** 3; +1 ** (delete temp++) ** 3; + +//// [exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.js] +var temp; +// Error: incorrect type on left-hand side +Math.pow((!--temp), 3); +Math.pow((!temp--), 3); +Math.pow((!3), 4); +Math.pow((!temp++), 4); +Math.pow((!temp--), 4); +Math.pow((!--temp), Math.pow(3, 1)); +Math.pow((!temp--), Math.pow(3, 1)); +Math.pow((!3), Math.pow(4, 1)); +Math.pow((!temp++), Math.pow(4, 1)); +Math.pow((!temp--), Math.pow(4, 1)); +Math.pow((typeof --temp), 3); +Math.pow((typeof temp--), 3); +Math.pow((typeof 3), 4); +Math.pow((typeof temp++), 4); +Math.pow((typeof temp--), 4); +Math.pow(1, Math.pow((typeof --temp), 3)); +Math.pow(1, Math.pow((typeof temp--), 3)); +Math.pow(1, Math.pow((typeof 3), 4)); +Math.pow(1, Math.pow((typeof temp++), 4)); +Math.pow(1, Math.pow((typeof temp--), 4)); +Math.pow((delete --temp), 3); +Math.pow((delete ++temp), 3); +Math.pow((delete temp--), 3); +Math.pow((delete temp++), 3); +Math.pow(1, Math.pow((delete --temp), 3)); +Math.pow(1, Math.pow((delete ++temp), 3)); +Math.pow(1, Math.pow((delete temp--), 3)); +Math.pow(1, Math.pow((delete temp++), 3)); diff --git a/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.errors.txt b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.errors.txt new file mode 100644 index 00000000000..53379f29933 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.errors.txt @@ -0,0 +1,57 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(2,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(3,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(4,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(5,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(6,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(7,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(8,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(9,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(12,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(13,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(14,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts(15,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalid.ts (12 errors) ==== + + var a = 1 ** `${ 3 }`; + ~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var b = 1 ** `2${ 3 }`; + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var c = 1 ** `${ 3 }4`; + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var d = 1 ** `2${ 3 }4`; + ~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var e = `${ 3 }` ** 5; + ~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var f = `2${ 3 }` ** 5; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var g = `${ 3 }4` ** 5; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var h = `2${ 3 }4` ** 5; + ~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var k = 10; + k **= `${ 3 }`; + ~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + k **= `2${ 3 }`; + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + k **= `2${ 3 }4`; + ~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + k **= `2${ 3 }4`; + ~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + + \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.js b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.js new file mode 100644 index 00000000000..5bd9a9609a0 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalid.js @@ -0,0 +1,34 @@ +//// [exponentiationOperatorWithTemplateStringInvalid.ts] + +var a = 1 ** `${ 3 }`; +var b = 1 ** `2${ 3 }`; +var c = 1 ** `${ 3 }4`; +var d = 1 ** `2${ 3 }4`; +var e = `${ 3 }` ** 5; +var f = `2${ 3 }` ** 5; +var g = `${ 3 }4` ** 5; +var h = `2${ 3 }4` ** 5; + +var k = 10; +k **= `${ 3 }`; +k **= `2${ 3 }`; +k **= `2${ 3 }4`; +k **= `2${ 3 }4`; + + + + +//// [exponentiationOperatorWithTemplateStringInvalid.js] +var a = Math.pow(1, "" + 3); +var b = Math.pow(1, "2" + 3); +var c = Math.pow(1, 3 + "4"); +var d = Math.pow(1, "2" + 3 + "4"); +var e = Math.pow("" + 3, 5); +var f = Math.pow("2" + 3, 5); +var g = Math.pow(3 + "4", 5); +var h = Math.pow("2" + 3 + "4", 5); +var k = 10; +k = Math.pow(k, "" + 3); +k = Math.pow(k, "2" + 3); +k = Math.pow(k, "2" + 3 + "4"); +k = Math.pow(k, "2" + 3 + "4"); diff --git a/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.errors.txt b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.errors.txt new file mode 100644 index 00000000000..39ade9df205 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.errors.txt @@ -0,0 +1,57 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(2,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(3,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(4,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(5,14): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(6,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(7,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(8,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(9,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(12,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(13,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(14,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(15,1): error TS2304: Cannot find name 'kj'. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts(15,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithTemplateStringInvalidES6.ts (13 errors) ==== + + var a = 1 ** `${ 3 }`; + ~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var b = 1 ** `2${ 3 }`; + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var c = 1 ** `${ 3 }4`; + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var d = 1 ** `2${ 3 }4`; + ~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var e = `${ 3 }` ** 5; + ~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var f = `2${ 3 }` ** 5; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var g = `${ 3 }4` ** 5; + ~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var h = `2${ 3 }4` ** 5; + ~~~~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + var k = 10; + k **= `${ 3 }`; + ~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + k **= `2${ 3 }`; + ~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + k **= `2${ 3 }4`; + ~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + kj **= `2${ 3 }4`; + ~~ +!!! error TS2304: Cannot find name 'kj'. + ~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.js b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.js new file mode 100644 index 00000000000..cde5133039f --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithTemplateStringInvalidES6.js @@ -0,0 +1,31 @@ +//// [exponentiationOperatorWithTemplateStringInvalidES6.ts] + +var a = 1 ** `${ 3 }`; +var b = 1 ** `2${ 3 }`; +var c = 1 ** `${ 3 }4`; +var d = 1 ** `2${ 3 }4`; +var e = `${ 3 }` ** 5; +var f = `2${ 3 }` ** 5; +var g = `${ 3 }4` ** 5; +var h = `2${ 3 }4` ** 5; + +var k = 10; +k **= `${ 3 }`; +k **= `2${ 3 }`; +k **= `2${ 3 }4`; +kj **= `2${ 3 }4`; + +//// [exponentiationOperatorWithTemplateStringInvalidES6.js] +var a = Math.pow(1, `${3}`); +var b = Math.pow(1, `2${3}`); +var c = Math.pow(1, `${3}4`); +var d = Math.pow(1, `2${3}4`); +var e = Math.pow(`${3}`, 5); +var f = Math.pow(`2${3}`, 5); +var g = Math.pow(`${3}4`, 5); +var h = Math.pow(`2${3}4`, 5); +var k = 10; +k = Math.pow(k, `${3}`); +k = Math.pow(k, `2${3}`); +k = Math.pow(k, `2${3}4`); +kj = Math.pow(kj, `2${3}4`); From fbe559eef02748babc1914179158e12ed274aa35 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 19:07:02 -0700 Subject: [PATCH 056/121] Address PR and add new with exponentiation --- .../exponentiationOperatorWithNew.errors.txt | 12 ++++++++++++ .../reference/exponentiationOperatorWithNew.js | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tests/baselines/reference/exponentiationOperatorWithNew.errors.txt create mode 100644 tests/baselines/reference/exponentiationOperatorWithNew.js diff --git a/tests/baselines/reference/exponentiationOperatorWithNew.errors.txt b/tests/baselines/reference/exponentiationOperatorWithNew.errors.txt new file mode 100644 index 00000000000..ae694a321b4 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithNew.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNew.ts(6,1): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. + + +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithNew.ts (1 errors) ==== + var a: any; + var b: any; + var c: any; + new a ** b ** c; + new a ** new b ** c; + new (a ** b ** c); + ~~~~~~~~~~~~~~~~~ +!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorWithNew.js b/tests/baselines/reference/exponentiationOperatorWithNew.js new file mode 100644 index 00000000000..6fb7e62c450 --- /dev/null +++ b/tests/baselines/reference/exponentiationOperatorWithNew.js @@ -0,0 +1,15 @@ +//// [exponentiationOperatorWithNew.ts] +var a: any; +var b: any; +var c: any; +new a ** b ** c; +new a ** new b ** c; +new (a ** b ** c); + +//// [exponentiationOperatorWithNew.js] +var a; +var b; +var c; +Math.pow(new a, Math.pow(b, c)); +Math.pow(new a, Math.pow(new b, c)); +new (Math.pow(a, Math.pow(b, c))); From 788f22205946a07e87e9ae24cd6d4ff89f7d6917 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 19:07:49 -0700 Subject: [PATCH 057/121] parenthesized exponentiation with template string --- ...onentiationOperatorInTempalteString4ES6.js | 53 ++++ ...iationOperatorInTempalteString4ES6.symbols | 114 +++++++++ ...ntiationOperatorInTempalteString4ES6.types | 233 ++++++++++++++++++ 3 files changed, 400 insertions(+) create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.js b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.js new file mode 100644 index 00000000000..bda3f8be251 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTempalteString4ES6.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** -t2} world`; +`${(-t1) ** t2 - t1} world`; +`${(-++t1) ** t2 - t1} world`; +`${(-t1++) ** t2 - t1} world`; +`${(~t1) ** t2 ** --t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +`hello ${(-++t1) ** t2 - t1}`; +`hello ${(-t1++) ** t2 - t1}`; +`hello ${(~t1) ** t2 ** --t1 }`; +`hello ${typeof (t1 ** t2 ** t1)}`; + +//// [emitExponentiationOperatorInTempalteString4ES6.js] +var t1 = 10; +var t2 = 10; +var s; +// With TemplateTail +`${Math.pow(t1, -t2)} world`; +`${Math.pow((-t1), t2) - t1} world`; +`${Math.pow((-++t1), t2) - t1} world`; +`${Math.pow((-t1++), t2) - t1} world`; +`${Math.pow((~t1), Math.pow(t2, --t1))} world`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} world`; +// TempateHead & TemplateTail are empt +`${Math.pow(t1, -t2)} hello world ${Math.pow(t1, -t2)}`; +`${Math.pow((-t1), t2) - t1} hello world ${Math.pow((-t1), t2) - t1}`; +`${Math.pow((-++t1), t2) - t1} hello world ${Math.pow(t1, Math.pow((-++t1), -t1))}`; +`${Math.pow((-t1++), t2) - t1} hello world ${Math.pow(t2, Math.pow((-t1++), -t1))}`; +`${Math.pow((~t1), Math.pow(t2, --t1))} hello world ${Math.pow((~t1), Math.pow(t2, --t1))}`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} hello world ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +// With templateHead +`hello ${Math.pow((-t1), t2) - t1}`; +`hello ${Math.pow((-++t1), t2) - t1}`; +`hello ${Math.pow((-t1++), t2) - t1}`; +`hello ${Math.pow((~t1), Math.pow(t2, --t1))}`; +`hello ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.symbols b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.symbols new file mode 100644 index 00000000000..1f4cd74502b --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.symbols @@ -0,0 +1,114 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 3, 3)) + +// With TemplateTail +`${t1 ** -t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) + +`${(-t1) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(-++t1) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(-t1++) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(~t1) ** t2 ** --t1 } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) + +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`hello ${(-++t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`hello ${(-t1++) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`hello ${(~t1) ** t2 ** --t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types new file mode 100644 index 00000000000..ed2f4b522e9 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4ES6.types @@ -0,0 +1,233 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With TemplateTail +`${t1 ** -t2} world`; +>`${t1 ** -t2} world` : string +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number + +`${(-t1) ** t2 - t1} world`; +>`${(-t1) ** t2 - t1} world` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-++t1) ** t2 - t1} world`; +>`${(-++t1) ** t2 - t1} world` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-t1++) ** t2 - t1} world`; +>`${(-t1++) ** t2 - t1} world` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`${(~t1) ** t2 ** --t1 } world`; +>`${(~t1) ** t2 ** --t1 } world` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +>`${t1 ** -t2} hello world ${t1 ** -t2}` : string +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number + +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +>`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +>`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** (-++t1) **- t1 : number +>t1 : number +>(-++t1) **- t1 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>- t1 : number +>t1 : number + +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +>`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number +>t2 ** (-t1++) ** - t1 : number +>t2 : number +>(-t1++) ** - t1 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>- t1 : number +>t1 : number + +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +>`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; +>`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +>`hello ${(-t1) ** t2 - t1}` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(-++t1) ** t2 - t1}`; +>`hello ${(-++t1) ** t2 - t1}` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(-t1++) ** t2 - t1}`; +>`hello ${(-t1++) ** t2 - t1}` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(~t1) ** t2 ** --t1 }`; +>`hello ${(~t1) ** t2 ** --t1 }` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1)}`; +>`hello ${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + From 78ad0f4c82a08245818edbac07cb1222edfa7f22 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Tue, 6 Oct 2015 10:03:27 -0700 Subject: [PATCH 058/121] Re-enable failing fourslash tests --- tests/cases/fourslash/commentsOverloads.ts | 22 ++++++------- .../completionListInstanceProtectedMembers.ts | 20 ++++++------ ...completionListInstanceProtectedMembers2.ts | 18 +++++------ .../completionListProtectedMembers.ts | 32 +++++++++---------- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/tests/cases/fourslash/commentsOverloads.ts b/tests/cases/fourslash/commentsOverloads.ts index d32c35b0508..1100b55dca8 100644 --- a/tests/cases/fourslash/commentsOverloads.ts +++ b/tests/cases/fourslash/commentsOverloads.ts @@ -482,8 +482,8 @@ verify.quickInfoIs("(method) c.prop1(a: number): number (+1 overload)", ""); goTo.marker('46'); verify.currentSignatureHelpDocCommentIs(""); verify.currentParameterHelpArgumentDocCommentIs(""); -//goTo.marker('46q'); -//verify.quickInfoIs("(method) c.prop1(b: string): number (+1 overload)", ""); +goTo.marker('46q'); +verify.quickInfoIs("(method) c.prop1(b: string): number (+1 overload)", ""); goTo.marker('47'); verify.currentSignatureHelpDocCommentIs("prop2 1"); @@ -494,8 +494,8 @@ verify.quickInfoIs("(method) c.prop2(a: number): number (+1 overload)", "prop2 1 goTo.marker('48'); verify.currentSignatureHelpDocCommentIs(""); verify.currentParameterHelpArgumentDocCommentIs(""); -//goTo.marker('48q'); -//verify.quickInfoIs("(method) c.prop2(b: string): number (+1 overload)", ""); +goTo.marker('48q'); +verify.quickInfoIs("(method) c.prop2(b: string): number (+1 overload)", ""); goTo.marker('49'); verify.currentSignatureHelpDocCommentIs(""); @@ -506,8 +506,8 @@ verify.quickInfoIs("(method) c.prop3(a: number): number (+1 overload)", ""); goTo.marker('50'); verify.currentSignatureHelpDocCommentIs("prop3 2"); verify.currentParameterHelpArgumentDocCommentIs(""); -//goTo.marker('50q'); -//verify.quickInfoIs("(method) c.prop3(b: string): number (+1 overload)", "prop3 2"); +goTo.marker('50q'); +verify.quickInfoIs("(method) c.prop3(b: string): number (+1 overload)", "prop3 2"); goTo.marker('51'); verify.currentSignatureHelpDocCommentIs("prop4 1"); @@ -518,8 +518,8 @@ verify.quickInfoIs("(method) c.prop4(a: number): number (+1 overload)", "prop4 1 goTo.marker('52'); verify.currentSignatureHelpDocCommentIs("prop4 2"); verify.currentParameterHelpArgumentDocCommentIs(""); -//goTo.marker('52q'); -//verify.quickInfoIs("(method) c.prop4(b: string): number (+1 overload)", "prop4 2"); +goTo.marker('52q'); +verify.quickInfoIs("(method) c.prop4(b: string): number (+1 overload)", "prop4 2"); goTo.marker('53'); verify.currentSignatureHelpDocCommentIs("prop5 1"); @@ -530,8 +530,8 @@ verify.quickInfoIs("(method) c.prop5(a: number): number (+1 overload)", "prop5 1 goTo.marker('54'); verify.currentSignatureHelpDocCommentIs("prop5 2"); verify.currentParameterHelpArgumentDocCommentIs(""); -//goTo.marker('54q'); -//verify.quickInfoIs("(method) c.prop5(b: string): number (+1 overload)", "prop5 2"); +goTo.marker('54q'); +verify.quickInfoIs("(method) c.prop5(b: string): number (+1 overload)", "prop5 2"); goTo.marker('55'); verify.currentSignatureHelpDocCommentIs(""); @@ -730,4 +730,4 @@ goTo.marker('106'); verify.quickInfoIs("(method) c.prop5(b: string): number (+1 overload)", "prop5 2"); goTo.marker('107'); -verify.quickInfoIs("(method) c.prop5(a: number): number (+1 overload)", "prop5 1"); \ No newline at end of file +verify.quickInfoIs("(method) c.prop5(a: number): number (+1 overload)", "prop5 1"); diff --git a/tests/cases/fourslash/completionListInstanceProtectedMembers.ts b/tests/cases/fourslash/completionListInstanceProtectedMembers.ts index e396a71247a..767dd1dff27 100644 --- a/tests/cases/fourslash/completionListInstanceProtectedMembers.ts +++ b/tests/cases/fourslash/completionListInstanceProtectedMembers.ts @@ -31,15 +31,15 @@ // Same class, everything is visible -//goTo.marker("1"); -//verify.memberListContains('privateMethod'); -//verify.memberListContains('privateProperty'); -//verify.memberListContains('protectedMethod'); -//verify.memberListContains('protectedProperty'); -//verify.memberListContains('publicMethod'); -//verify.memberListContains('publicProperty'); -//verify.memberListContains('protectedOverriddenMethod'); -//verify.memberListContains('protectedOverriddenProperty'); +goTo.marker("1"); +verify.memberListContains('privateMethod'); +verify.memberListContains('privateProperty'); +verify.memberListContains('protectedMethod'); +verify.memberListContains('protectedProperty'); +verify.memberListContains('publicMethod'); +verify.memberListContains('publicProperty'); +verify.memberListContains('protectedOverriddenMethod'); +verify.memberListContains('protectedOverriddenProperty'); goTo.marker("2"); verify.memberListContains('privateMethod'); @@ -60,4 +60,4 @@ verify.memberListContains('protectedProperty'); verify.memberListContains('publicMethod'); verify.memberListContains('publicProperty'); verify.not.memberListContains('protectedOverriddenMethod'); -verify.not.memberListContains('protectedOverriddenProperty'); \ No newline at end of file +verify.not.memberListContains('protectedOverriddenProperty'); diff --git a/tests/cases/fourslash/completionListInstanceProtectedMembers2.ts b/tests/cases/fourslash/completionListInstanceProtectedMembers2.ts index fed310aba21..c074bc06314 100644 --- a/tests/cases/fourslash/completionListInstanceProtectedMembers2.ts +++ b/tests/cases/fourslash/completionListInstanceProtectedMembers2.ts @@ -32,15 +32,15 @@ // Same class, everything is visible -//goTo.marker("1"); -//verify.not.memberListContains('privateMethod'); -//verify.not.memberListContains('privateProperty'); -//verify.memberListContains('protectedMethod'); -//verify.memberListContains('protectedProperty'); -//verify.memberListContains('publicMethod'); -//verify.memberListContains('publicProperty'); -//verify.memberListContains('protectedOverriddenMethod'); -//verify.memberListContains('protectedOverriddenProperty'); +goTo.marker("1"); +verify.not.memberListContains('privateMethod'); +verify.not.memberListContains('privateProperty'); +verify.memberListContains('protectedMethod'); +verify.memberListContains('protectedProperty'); +verify.memberListContains('publicMethod'); +verify.memberListContains('publicProperty'); +verify.memberListContains('protectedOverriddenMethod'); +verify.memberListContains('protectedOverriddenProperty'); // Can not access properties on super goTo.marker("2"); diff --git a/tests/cases/fourslash/completionListProtectedMembers.ts b/tests/cases/fourslash/completionListProtectedMembers.ts index 8ddd8aca4d0..4715a9fb714 100644 --- a/tests/cases/fourslash/completionListProtectedMembers.ts +++ b/tests/cases/fourslash/completionListProtectedMembers.ts @@ -18,25 +18,25 @@ ////var b: Base; ////f./*5*/ -//goTo.marker("1"); -//verify.memberListContains("y"); -//verify.memberListContains("x"); -//verify.not.memberListContains("z"); +goTo.marker("1"); +verify.memberListContains("y"); +verify.memberListContains("x"); +verify.not.memberListContains("z"); -//goTo.marker("2"); -//verify.memberListContains("y"); -//verify.memberListContains("x"); -//verify.memberListContains("z"); +goTo.marker("2"); +verify.memberListContains("y"); +verify.memberListContains("x"); +verify.memberListContains("z"); -//goTo.marker("3"); -//verify.memberListContains("y"); -//verify.memberListContains("x"); -//verify.not.memberListContains("z"); +goTo.marker("3"); +verify.memberListContains("y"); +verify.memberListContains("x"); +verify.not.memberListContains("z"); -//goTo.marker("4"); -//verify.memberListContains("y"); -//verify.memberListContains("x"); -//verify.memberListContains("z"); +goTo.marker("4"); +verify.memberListContains("y"); +verify.memberListContains("x"); +verify.memberListContains("z"); goTo.marker("5"); verify.not.memberListContains("x"); From 64b6c9f52ee683e201498c9d7a73ef565b1dd91e Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 6 Oct 2015 12:02:55 -0700 Subject: [PATCH 059/121] Fix emit for ES6 export default class with static initializers. Fixes #5136. --- src/compiler/emitter.ts | 6 ++++-- ...portDefaultClassWithStaticPropertyAssignmentsInES6.js | 9 +++++++++ ...efaultClassWithStaticPropertyAssignmentsInES6.symbols | 5 +++++ ...tDefaultClassWithStaticPropertyAssignmentsInES6.types | 6 ++++++ ...portDefaultClassWithStaticPropertyAssignmentsInES6.ts | 4 ++++ 5 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.js create mode 100644 tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.symbols create mode 100644 tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.types create mode 100644 tests/cases/conformance/es6/classDeclaration/exportDefaultClassWithStaticPropertyAssignmentsInES6.ts diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 71187b20960..6f228aeb120 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4785,8 +4785,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // emit name if // - node has a name - // - this is default export and target is not ES6 (for ES6 `export default` does not need to be compiled downlevel) - if ((node.name || (node.flags & NodeFlags.Default && languageVersion < ScriptTarget.ES6)) && !thisNodeIsDecorated) { + // - this is default export and target is not ES6 (for ES6 `export default` does not need to be compiled downlevel) + // - this is default export with static initializers + if ((node.name || (node.flags & NodeFlags.Default && (languageVersion < ScriptTarget.ES6 + || staticProperties.length > 0))) && !thisNodeIsDecorated) { write(" "); emitDeclarationName(node); } diff --git a/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.js b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.js new file mode 100644 index 00000000000..3acb89b8696 --- /dev/null +++ b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.js @@ -0,0 +1,9 @@ +//// [exportDefaultClassWithStaticPropertyAssignmentsInES6.ts] +export default class { + static z: string = "Foo"; +} + +//// [exportDefaultClassWithStaticPropertyAssignmentsInES6.js] +export default class default_1 { +} +default_1.z = "Foo"; diff --git a/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.symbols b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.symbols new file mode 100644 index 00000000000..6d08eb93d92 --- /dev/null +++ b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.symbols @@ -0,0 +1,5 @@ +=== tests/cases/conformance/es6/classDeclaration/exportDefaultClassWithStaticPropertyAssignmentsInES6.ts === +export default class { + static z: string = "Foo"; +>z : Symbol(default.z, Decl(exportDefaultClassWithStaticPropertyAssignmentsInES6.ts, 0, 22)) +} diff --git a/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.types b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.types new file mode 100644 index 00000000000..657e0301f83 --- /dev/null +++ b/tests/baselines/reference/exportDefaultClassWithStaticPropertyAssignmentsInES6.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/es6/classDeclaration/exportDefaultClassWithStaticPropertyAssignmentsInES6.ts === +export default class { + static z: string = "Foo"; +>z : string +>"Foo" : string +} diff --git a/tests/cases/conformance/es6/classDeclaration/exportDefaultClassWithStaticPropertyAssignmentsInES6.ts b/tests/cases/conformance/es6/classDeclaration/exportDefaultClassWithStaticPropertyAssignmentsInES6.ts new file mode 100644 index 00000000000..485fbdb011d --- /dev/null +++ b/tests/cases/conformance/es6/classDeclaration/exportDefaultClassWithStaticPropertyAssignmentsInES6.ts @@ -0,0 +1,4 @@ +// @target:es6 +export default class { + static z: string = "Foo"; +} \ No newline at end of file From 8171dede90ba326575cc992d584c1a98a7695a60 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Tue, 6 Oct 2015 12:33:06 -0700 Subject: [PATCH 060/121] Lint fixes and test fixes --- src/compiler/sys.ts | 20 ++++++++++---------- src/harness/harnessLanguageService.ts | 8 +++++++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index e8ad3c309fd..d191d406c52 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -210,7 +210,7 @@ namespace ts { } private static copyListRemovingItem(item: T, list: T[]) { - var copiedList: T[] = []; + let copiedList: T[] = []; for (var i = 0, len = list.length; i < len; i++) { if (list[i] != item) { copiedList.push(list[i]); @@ -224,7 +224,7 @@ namespace ts { } private poll(checkedIndex: number) { - var watchedFile = this.watchedFiles[checkedIndex]; + let watchedFile = this.watchedFiles[checkedIndex]; if (!watchedFile) { return; } @@ -245,9 +245,9 @@ namespace ts { // and efficiency of stat on modern filesystems private startWatchTimer() { this.watchTimer = setInterval(() => { - var count = 0; - var nextToCheck = this.nextFileToCheck; - var firstCheck = -1; + let count = 0; + let nextToCheck = this.nextFileToCheck; + let firstCheck = -1; while ((count < this.chunkSize) && (nextToCheck !== firstCheck)) { this.poll(nextToCheck); if (firstCheck < 0) { @@ -264,7 +264,7 @@ namespace ts { } addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile { - var file: WatchedFile = { + let file: WatchedFile = { fileName, callback, mtime: WatchedFileSet.getModifiedTime(fileName) @@ -295,7 +295,7 @@ namespace ts { // changes for large reference sets? If so, do we want // to increase the chunk size or decrease the interval // time dynamically to match the large reference set? - var watchedFileSet = new WatchedFileSet(); + let watchedFileSet = new WatchedFileSet(); function isNode4OrLater(): Boolean { return parseInt(process.version.charAt(1)) >= 4; @@ -402,10 +402,10 @@ namespace ts { return _fs.watch(fileName, (eventName: string, relativeFileName: string) => callback(fileName)); } - var watchedFile = watchedFileSet.addFile(fileName, callback); + let watchedFile = watchedFileSet.addFile(fileName, callback); return { close: () => watchedFileSet.removeFile(watchedFile) - } + }; }, watchDirectory: (path, callback, recursive) => { // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows @@ -419,7 +419,7 @@ namespace ts { // event name is "change") if (eventName == "rename") { // When deleting a file, the passed baseFileName is null - callback(relativeFileName == null ? null : normalizePath(ts.combinePaths(path, relativeFileName))) + callback(!relativeFileName ? relativeFileName : normalizePath(ts.combinePaths(path, relativeFileName))); }; } ); diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index dfde2bd1c08..df5efccdcb5 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -572,6 +572,10 @@ namespace Harness.LanguageService { return { close() { } }; } + watchDirectory(path: string, callback: (path: string) => void, recursive?: boolean): ts.FileWatcher { + return { close() { } }; + } + close(): void { } @@ -614,7 +618,9 @@ namespace Harness.LanguageService { // This host is just a proxy for the clientHost, it uses the client // host to answer server queries about files on disk let serverHost = new SessionServerHost(clientHost); - let server = new ts.server.Session(serverHost, Buffer.byteLength, process.hrtime, serverHost); + let server = new ts.server.Session(serverHost, + Buffer ? Buffer.byteLength : (string: string, encoding?: string) => string.length, + process.hrtime, serverHost); // Fake the connection between the client and the server serverHost.writeMessage = client.onMessage.bind(client); From ab73b4f1037099d91da126c56da8be709a1559d5 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 6 Oct 2015 12:37:10 -0700 Subject: [PATCH 061/121] Fix linter warnings. --- src/compiler/emitter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 6f228aeb120..c00c7e50076 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4787,7 +4787,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // - node has a name // - this is default export and target is not ES6 (for ES6 `export default` does not need to be compiled downlevel) // - this is default export with static initializers - if ((node.name || (node.flags & NodeFlags.Default && (languageVersion < ScriptTarget.ES6 + if ((node.name || (node.flags & NodeFlags.Default && (languageVersion < ScriptTarget.ES6 || staticProperties.length > 0))) && !thisNodeIsDecorated) { write(" "); emitDeclarationName(node); @@ -5647,8 +5647,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } /* - * Some bundlers (SystemJS builder) sometimes want to rename dependencies. - * Here we check if alternative name was provided for a given moduleName and return it if possible. + * Some bundlers (SystemJS builder) sometimes want to rename dependencies. + * Here we check if alternative name was provided for a given moduleName and return it if possible. */ function tryRenameExternalModule(moduleName: LiteralExpression): string { if (currentSourceFile.renamedDependencies && hasProperty(currentSourceFile.renamedDependencies, moduleName.text)) { @@ -7076,7 +7076,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return shouldEmitEnumDeclaration(node); } - // If the node is emitted in specialized fashion, dont emit comments as this node will handle + // If the node is emitted in specialized fashion, dont emit comments as this node will handle // emitting comments when emitting itself Debug.assert(!isSpecializedCommentHandling(node)); From 1b909d80e5712390ac097f52f8924298c52675f0 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 6 Oct 2015 12:51:24 -0700 Subject: [PATCH 062/121] remove unused function from the EmitResolver --- src/compiler/checker.ts | 26 -------------------------- src/compiler/types.ts | 1 - 2 files changed, 27 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 40db300d310..c1d8bd991c4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14764,31 +14764,6 @@ namespace ts { return symbol && getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration; } - function getBlockScopedVariableId(n: Identifier): number { - Debug.assert(!nodeIsSynthesized(n)); - - let isVariableDeclarationOrBindingElement = - n.parent.kind === SyntaxKind.BindingElement || (n.parent.kind === SyntaxKind.VariableDeclaration && (n.parent).name === n); - - let symbol = - (isVariableDeclarationOrBindingElement ? getSymbolOfNode(n.parent) : undefined) || - getNodeLinks(n).resolvedSymbol || - resolveName(n, n.text, SymbolFlags.Value | SymbolFlags.Alias, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined); - - let isLetOrConst = - symbol && - (symbol.flags & SymbolFlags.BlockScopedVariable) && - symbol.valueDeclaration.parent.kind !== SyntaxKind.CatchClause; - - if (isLetOrConst) { - // side-effect of calling this method: - // assign id to symbol if it was not yet set - getSymbolLinks(symbol); - return symbol.id; - } - return undefined; - } - function instantiateSingleCallFunctionType(functionType: Type, typeArguments: Type[]): Type { if (functionType === unknownType) { return unknownType; @@ -14823,7 +14798,6 @@ namespace ts { isEntityNameVisible, getConstantValue, collectLinkedAliases, - getBlockScopedVariableId, getReferencedValueDeclaration, getTypeReferenceSerializationKind, isOptionalParameter diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 17156aee0f1..773083d49b6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1598,7 +1598,6 @@ namespace ts { isEntityNameVisible(entityName: EntityName | Expression, enclosingDeclaration: Node): SymbolVisibilityResult; // Returns the constant value this property access resolves to, or 'undefined' for a non-constant getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; - getBlockScopedVariableId(node: Identifier): number; getReferencedValueDeclaration(reference: Identifier): Declaration; getTypeReferenceSerializationKind(typeName: EntityName): TypeReferenceSerializationKind; isOptionalParameter(node: ParameterDeclaration): boolean; From 9ed5b4c435825cdc70643bfb8d391416d2c1ec2c Mon Sep 17 00:00:00 2001 From: zhengbli Date: Tue, 6 Oct 2015 13:10:03 -0700 Subject: [PATCH 063/121] more test fixes --- tests/cases/unittests/cachingInServerLSHost.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/cases/unittests/cachingInServerLSHost.ts b/tests/cases/unittests/cachingInServerLSHost.ts index ff2da76ba4f..88b44a693b9 100644 --- a/tests/cases/unittests/cachingInServerLSHost.ts +++ b/tests/cases/unittests/cachingInServerLSHost.ts @@ -45,6 +45,11 @@ module ts { return { close: () => { } } + }, + watchDirectory: (path, callback, recursive?) => { + return { + close: () => { } + } } }; } From bfaa51b4e9bcc28ac9c3f8d1df735bfe2507db2b Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 6 Oct 2015 14:09:47 -0700 Subject: [PATCH 064/121] Add comment and address PR on comment --- src/compiler/emitter.ts | 13 +++++++- src/compiler/parser.ts | 69 +++++++++++++++++++++-------------------- src/compiler/types.ts | 13 ++++---- 3 files changed, 53 insertions(+), 42 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 6a09006d3e3..115979bd30b 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2515,7 +2515,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi let leftHandSideExpression = node.left; if (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) { let synthesizedLHS: ElementAccessExpression | PropertyAccessExpression; - // TODO (yuisu) : comment + + // This is used to decide whether to emit parenthesis around the expresison. + // Parenthesis is required for following cases: + // capture variable while emitting right-hand side operand. + // a[0] **= a[0] **= 2 + // _a = a, _a[0] = Math.pow(_a[0], (_b = a, _b[0] = Math.pow(_b[0], 2))); + // ^ -> required extra parenthesis controlled by shouldEmitParenthesis + // exponentiation compount in variable declaration + // var x = a[0] **= a[0] **= 2 + // var x = (_a = a, _a[0] = Math.pow(_a[0], (_b = a, _b[0] = Math.pow(_b[0], 2)))); + // ^ -> required extra parenthesis controlled by shouldEmitParenthesis + // Otherwise, false let shouldEmitParenthesis = false; if (isElementAccessExpression(leftHandSideExpression)) { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6141e3ba047..af46229d57f 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3015,8 +3015,8 @@ namespace ts { let newPrecedence = getBinaryOperatorPrecedence(); // Check the precedence to see if we should "take" this operator - // - For left associative operator (all operator but **), only consume the operator - // , recursively call the function below and parse binaryExpression as a rightOperand + // - For left associative operator (all operator but **), consume the operator, + // recursively call the function below, and parse binaryExpression as a rightOperand // of the caller if the new precendence of the operator is greater then or equal to the current precendence. // For example: // a - b - c; @@ -3025,7 +3025,7 @@ namespace ts { // ^token; leftOperand = b. Return b to the caller as a rightOperand // a - b * c; // ^token; leftOperand = b. Return b * c to the caller as a rightOperand - // - For right associative operator (**), only consume the operator, recursively call the function + // - For right associative operator (**), consume the operator, recursively call the function // and parse binaryExpression as a rightOperand of the caller if the new precendence of // the operator is strictly grater than the current precendence // For example: @@ -3187,33 +3187,6 @@ namespace ts { return finishNode(node); } - /** - * Check if the current token can possibly be in an ES7 increment expression. - * - * Increment Expression: - * LeftHandSideExpression[?Yield] - * LeftHandSideExpression[?Yield][no LineTerminator here]++ - * LeftHandSideExpression[?Yield][no LineTerminator here]-- - * ++LeftHandSideExpression[?Yield] - * --LeftHandSideExpression[?Yield] - */ - function isIncrementExpression(): boolean{ - // TODO(yuisu): Comment why we have to do what are we doing here - switch (token) { - case SyntaxKind.PlusToken: - case SyntaxKind.MinusToken: - case SyntaxKind.TildeToken: - case SyntaxKind.ExclamationToken: - case SyntaxKind.DeleteKeyword: - case SyntaxKind.TypeOfKeyword: - case SyntaxKind.VoidKeyword: - case SyntaxKind.LessThanToken: - return false; - default: - return true; - } - } - /** * Parse ES7 unary expression and await expression * @@ -3241,9 +3214,9 @@ namespace ts { } /** - * Parse ES7 simple-unary expression or higher: + * Parse ES7 simple-unary expression or higher: * - * SimpleUnaryExpression: + * ES7 SimpleUnaryExpression: * 1) IncrementExpression[?yield] * 2) delete UnaryExpression[?yield] * 3) void UnaryExpression[?yield] @@ -3283,9 +3256,37 @@ namespace ts { } /** - * Parse ES7 IncrementExpression. The IncrementExpression is used instead of ES6's PostFixExpression. + * Check if the current token can possibly be an ES7 increment expression. * - * IncrementExpression[yield]: + * ES7 IncrementExpression: + * LeftHandSideExpression[?Yield] + * LeftHandSideExpression[?Yield][no LineTerminator here]++ + * LeftHandSideExpression[?Yield][no LineTerminator here]-- + * ++LeftHandSideExpression[?Yield] + * --LeftHandSideExpression[?Yield] + */ + function isIncrementExpression(): boolean{ + // This function is called inside parseUnaryExpression to decide + // whether to call parseSimpleUnaryExpression or call parseIncrmentExpression directly + switch (token) { + case SyntaxKind.PlusToken: + case SyntaxKind.MinusToken: + case SyntaxKind.TildeToken: + case SyntaxKind.ExclamationToken: + case SyntaxKind.DeleteKeyword: + case SyntaxKind.TypeOfKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.LessThanToken: + return false; + default: + return true; + } + } + + /** + * Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression. + * + * ES7 IncrementExpression[yield]: * 1) LeftHandSideExpression[?yield] * 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++ * 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]-- diff --git a/src/compiler/types.ts b/src/compiler/types.ts index e885aa2b7f4..2b8c2624819 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -711,11 +711,10 @@ namespace ts { export interface IncrementExpression extends UnaryExpression { _incrementExpressionBrand: any; } - //export type IncrementExpression = PrefixUnaryExpression | PostfixUnaryExpression | LeftHandSideExpression; export interface PrefixUnaryExpression extends IncrementExpression { operator: SyntaxKind; - operand: UnaryExpression | BinaryExpression; + operand: UnaryExpression; } export interface PostfixUnaryExpression extends IncrementExpression { @@ -740,19 +739,19 @@ namespace ts { } export interface DeleteExpression extends UnaryExpression { - expression: UnaryExpression | BinaryExpression; + expression: UnaryExpression; } export interface TypeOfExpression extends UnaryExpression { - expression: UnaryExpression | BinaryExpression; + expression: UnaryExpression; } export interface VoidExpression extends UnaryExpression { - expression: UnaryExpression | BinaryExpression; + expression: UnaryExpression; } export interface AwaitExpression extends UnaryExpression { - expression: UnaryExpression | BinaryExpression; + expression: UnaryExpression; } export interface YieldExpression extends Expression { @@ -859,7 +858,7 @@ namespace ts { export interface TypeAssertion extends UnaryExpression { type: TypeNode; - expression: UnaryExpression | BinaryExpression; + expression: UnaryExpression; } export type AssertionExpression = TypeAssertion | AsExpression; From d96a00e4b8add0c09d30499280478d014aea68fd Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 6 Oct 2015 15:28:48 -0700 Subject: [PATCH 065/121] Parse typeAssertion expression as simpleUnaryExpression --- src/compiler/parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index af46229d57f..c283ec0fc95 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3600,7 +3600,7 @@ namespace ts { parseExpected(SyntaxKind.LessThanToken); node.type = parseType(); parseExpected(SyntaxKind.GreaterThanToken); - node.expression = parseUnaryExpressionOrHigher(); + node.expression = parseSimpleUnaryExpression(); return finishNode(node); } From 8be77b448f7589d309e8acc36a3408e82a1ab2d1 Mon Sep 17 00:00:00 2001 From: Yui T Date: Tue, 6 Oct 2015 15:29:21 -0700 Subject: [PATCH 066/121] Update test to parse typeAssertion as simpleUnaryExpression --- .../reference/emitExponentiationOperator4.js | 34 ++++----- .../emitExponentiationOperator4.symbols | 19 ++--- .../emitExponentiationOperator4.types | 71 +++++++++++-------- .../emitExponentiationOperator4ES7.js | 34 ++++----- .../emitExponentiationOperator4ES7.symbols | 19 ++--- .../emitExponentiationOperator4ES7.types | 71 +++++++++++-------- ...onentiationOperatorSyntaxError2.errors.txt | 24 ++++++- .../exponentiationOperatorSyntaxError2.js | 12 +++- .../emitExponentiationOperator4.ts | 17 ++--- .../emitExponentiationOperator4ES7.ts | 17 ++--- .../exponentiationOperatorSyntaxError2.ts | 6 ++ 11 files changed, 201 insertions(+), 123 deletions(-) diff --git a/tests/baselines/reference/emitExponentiationOperator4.js b/tests/baselines/reference/emitExponentiationOperator4.js index 185616601be..7bed614b664 100644 --- a/tests/baselines/reference/emitExponentiationOperator4.js +++ b/tests/baselines/reference/emitExponentiationOperator4.js @@ -1,15 +1,16 @@ //// [emitExponentiationOperator4.ts] var temp: any; ---temp ** 3; -++temp ** 3; -temp-- ** 3; -temp++ ** 3; +(temp) ** 3; +(--temp) ** 3; +(++temp) ** 3; +(temp--) ** 3; +(temp++) ** 3; -1 ** --temp ** 3; -1 ** ++temp ** 3; -1 ** temp-- ** 3; -1 ** temp++ ** 3; +1 ** (--temp) ** 3; +1 ** (++temp) ** 3; +1 ** (temp--) ** 3; +1 ** (temp++) ** 3; (void --temp) ** 3; (void temp--) ** 3; @@ -38,14 +39,15 @@ var temp: any; //// [emitExponentiationOperator4.js] var temp; -Math.pow(--temp, 3); -Math.pow(++temp, 3); -Math.pow(temp--, 3); -Math.pow(temp++, 3); -Math.pow(1, Math.pow(--temp, 3)); -Math.pow(1, Math.pow(++temp, 3)); -Math.pow(1, Math.pow(temp--, 3)); -Math.pow(1, Math.pow(temp++, 3)); +Math.pow(temp, 3); +Math.pow((--temp), 3); +Math.pow((++temp), 3); +Math.pow((temp--), 3); +Math.pow((temp++), 3); +Math.pow(1, Math.pow((--temp), 3)); +Math.pow(1, Math.pow((++temp), 3)); +Math.pow(1, Math.pow((temp--), 3)); +Math.pow(1, Math.pow((temp++), 3)); Math.pow((void --temp), 3); Math.pow((void temp--), 3); Math.pow((void 3), 4); diff --git a/tests/baselines/reference/emitExponentiationOperator4.symbols b/tests/baselines/reference/emitExponentiationOperator4.symbols index c57825f908a..45b73afbce8 100644 --- a/tests/baselines/reference/emitExponentiationOperator4.symbols +++ b/tests/baselines/reference/emitExponentiationOperator4.symbols @@ -2,28 +2,31 @@ var temp: any; >temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) ---temp ** 3; +(temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) -++temp ** 3; +(--temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) -temp-- ** 3; +(++temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) -temp++ ** 3; +(temp--) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) -1 ** --temp ** 3; +(temp++) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) -1 ** ++temp ** 3; +1 ** (--temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) -1 ** temp-- ** 3; +1 ** (++temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) -1 ** temp++ ** 3; +1 ** (temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) + +1 ** (temp++) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3)) (void --temp) ** 3; diff --git a/tests/baselines/reference/emitExponentiationOperator4.types b/tests/baselines/reference/emitExponentiationOperator4.types index 2d5a7ea48f4..36da1c32b4c 100644 --- a/tests/baselines/reference/emitExponentiationOperator4.types +++ b/tests/baselines/reference/emitExponentiationOperator4.types @@ -2,66 +2,81 @@ var temp: any; >temp : any ---temp ** 3; ->--temp ** 3 : number ->--temp ** 3 : number +(temp) ** 3; +>(temp) ** 3 : number +>(temp) : number +>temp : number +>temp : any +>3 : number + +(--temp) ** 3; +>(--temp) ** 3 : number +>(--temp) : number +>--temp : number >--temp : number >temp : any >3 : number -++temp ** 3; ->++temp ** 3 : number ->++temp ** 3 : number +(++temp) ** 3; +>(++temp) ** 3 : number +>(++temp) : number +>++temp : number >++temp : number >temp : any >3 : number -temp-- ** 3; ->temp-- ** 3 : number ->temp-- ** 3 : number +(temp--) ** 3; +>(temp--) ** 3 : number +>(temp--) : number +>temp-- : number >temp-- : number >temp : any >3 : number -temp++ ** 3; ->temp++ ** 3 : number ->temp++ ** 3 : number +(temp++) ** 3; +>(temp++) ** 3 : number +>(temp++) : number +>temp++ : number >temp++ : number >temp : any >3 : number -1 ** --temp ** 3; ->1 ** --temp ** 3 : number +1 ** (--temp) ** 3; +>1 ** (--temp) ** 3 : number >1 : number ->--temp ** 3 : number ->--temp ** 3 : number +>(--temp) ** 3 : number +>(--temp) : number +>--temp : number >--temp : number >temp : any >3 : number -1 ** ++temp ** 3; ->1 ** ++temp ** 3 : number +1 ** (++temp) ** 3; +>1 ** (++temp) ** 3 : number >1 : number ->++temp ** 3 : number ->++temp ** 3 : number +>(++temp) ** 3 : number +>(++temp) : number +>++temp : number >++temp : number >temp : any >3 : number -1 ** temp-- ** 3; ->1 ** temp-- ** 3 : number +1 ** (temp--) ** 3; +>1 ** (temp--) ** 3 : number >1 : number ->temp-- ** 3 : number ->temp-- ** 3 : number +>(temp--) ** 3 : number +>(temp--) : number +>temp-- : number >temp-- : number >temp : any >3 : number -1 ** temp++ ** 3; ->1 ** temp++ ** 3 : number +1 ** (temp++) ** 3; +>1 ** (temp++) ** 3 : number >1 : number ->temp++ ** 3 : number ->temp++ ** 3 : number +>(temp++) ** 3 : number +>(temp++) : number +>temp++ : number >temp++ : number >temp : any >3 : number diff --git a/tests/baselines/reference/emitExponentiationOperator4ES7.js b/tests/baselines/reference/emitExponentiationOperator4ES7.js index fb32144575d..2602fd2b8e6 100644 --- a/tests/baselines/reference/emitExponentiationOperator4ES7.js +++ b/tests/baselines/reference/emitExponentiationOperator4ES7.js @@ -1,15 +1,16 @@ //// [emitExponentiationOperator4ES7.ts] var temp: any; ---temp ** 3; -++temp ** 3; -temp-- ** 3; -temp++ ** 3; +(temp) ** 3; +(--temp) ** 3; +(++temp) ** 3; +(temp--) ** 3; +(temp++) ** 3; -1 ** --temp ** 3; -1 ** ++temp ** 3; -1 ** temp-- ** 3; -1 ** temp++ ** 3; +1 ** (--temp) ** 3; +1 ** (++temp) ** 3; +1 ** (temp--) ** 3; +1 ** (temp++) ** 3; (void --temp) ** 3; (void temp--) ** 3; @@ -38,14 +39,15 @@ var temp: any; //// [emitExponentiationOperator4ES7.js] var temp; ---temp ** 3; -++temp ** 3; -temp-- ** 3; -temp++ ** 3; -1 ** --temp ** 3; -1 ** ++temp ** 3; -1 ** temp-- ** 3; -1 ** temp++ ** 3; +temp ** 3; +(--temp) ** 3; +(++temp) ** 3; +(temp--) ** 3; +(temp++) ** 3; +1 ** (--temp) ** 3; +1 ** (++temp) ** 3; +1 ** (temp--) ** 3; +1 ** (temp++) ** 3; (void --temp) ** 3; (void temp--) ** 3; (void 3) ** 4; diff --git a/tests/baselines/reference/emitExponentiationOperator4ES7.symbols b/tests/baselines/reference/emitExponentiationOperator4ES7.symbols index 53701ed5aef..d66e1379908 100644 --- a/tests/baselines/reference/emitExponentiationOperator4ES7.symbols +++ b/tests/baselines/reference/emitExponentiationOperator4ES7.symbols @@ -2,28 +2,31 @@ var temp: any; >temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) ---temp ** 3; +(temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) -++temp ** 3; +(--temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) -temp-- ** 3; +(++temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) -temp++ ** 3; +(temp--) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) -1 ** --temp ** 3; +(temp++) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) -1 ** ++temp ** 3; +1 ** (--temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) -1 ** temp-- ** 3; +1 ** (++temp) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) -1 ** temp++ ** 3; +1 ** (temp--) ** 3; +>temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) + +1 ** (temp++) ** 3; >temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) (void --temp) ** 3; diff --git a/tests/baselines/reference/emitExponentiationOperator4ES7.types b/tests/baselines/reference/emitExponentiationOperator4ES7.types index 78eacba9e39..5449c898946 100644 --- a/tests/baselines/reference/emitExponentiationOperator4ES7.types +++ b/tests/baselines/reference/emitExponentiationOperator4ES7.types @@ -2,66 +2,81 @@ var temp: any; >temp : any ---temp ** 3; ->--temp ** 3 : number ->--temp ** 3 : number +(temp) ** 3; +>(temp) ** 3 : number +>(temp) : number +>temp : number +>temp : any +>3 : number + +(--temp) ** 3; +>(--temp) ** 3 : number +>(--temp) : number +>--temp : number >--temp : number >temp : any >3 : number -++temp ** 3; ->++temp ** 3 : number ->++temp ** 3 : number +(++temp) ** 3; +>(++temp) ** 3 : number +>(++temp) : number +>++temp : number >++temp : number >temp : any >3 : number -temp-- ** 3; ->temp-- ** 3 : number ->temp-- ** 3 : number +(temp--) ** 3; +>(temp--) ** 3 : number +>(temp--) : number +>temp-- : number >temp-- : number >temp : any >3 : number -temp++ ** 3; ->temp++ ** 3 : number ->temp++ ** 3 : number +(temp++) ** 3; +>(temp++) ** 3 : number +>(temp++) : number +>temp++ : number >temp++ : number >temp : any >3 : number -1 ** --temp ** 3; ->1 ** --temp ** 3 : number +1 ** (--temp) ** 3; +>1 ** (--temp) ** 3 : number >1 : number ->--temp ** 3 : number ->--temp ** 3 : number +>(--temp) ** 3 : number +>(--temp) : number +>--temp : number >--temp : number >temp : any >3 : number -1 ** ++temp ** 3; ->1 ** ++temp ** 3 : number +1 ** (++temp) ** 3; +>1 ** (++temp) ** 3 : number >1 : number ->++temp ** 3 : number ->++temp ** 3 : number +>(++temp) ** 3 : number +>(++temp) : number +>++temp : number >++temp : number >temp : any >3 : number -1 ** temp-- ** 3; ->1 ** temp-- ** 3 : number +1 ** (temp--) ** 3; +>1 ** (temp--) ** 3 : number >1 : number ->temp-- ** 3 : number ->temp-- ** 3 : number +>(temp--) ** 3 : number +>(temp--) : number +>temp-- : number >temp-- : number >temp : any >3 : number -1 ** temp++ ** 3; ->1 ** temp++ ** 3 : number +1 ** (temp++) ** 3; +>1 ** (temp++) ** 3 : number >1 : number ->temp++ ** 3 : number ->temp++ ** 3 : number +>(temp++) ** 3 : number +>(temp++) : number +>temp++ : number >temp++ : number >temp : any >3 : number diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt index 67ff6667292..45d0854a07f 100644 --- a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt @@ -74,9 +74,14 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(64,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(65,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(66,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(67,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(68,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts (76 errors) ==== +==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts (81 errors) ==== // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () var temp; @@ -291,4 +296,19 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ !!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - \ No newline at end of file + + temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ++temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + --temp ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + temp++ ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + temp-- ** 3; + ~~ +!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError2.js b/tests/baselines/reference/exponentiationOperatorSyntaxError2.js index 758160ec312..9e07273522f 100644 --- a/tests/baselines/reference/exponentiationOperatorSyntaxError2.js +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError2.js @@ -61,7 +61,12 @@ void temp-- ** 4; 1 ** !3 ** 4; 1 ** !temp++ ** 4; 1 ** !temp-- ** 4; - + +temp ** 3; +++temp ** 3; +--temp ** 3; +temp++ ** 3; +temp-- ** 3; //// [exponentiationOperatorSyntaxError2.js] // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () @@ -114,3 +119,8 @@ Math.pow(1, Math.pow(!temp--, 3)); Math.pow(1, Math.pow(!3, 4)); Math.pow(1, Math.pow(!temp++, 4)); Math.pow(1, Math.pow(!temp--, 4)); +Math.pow(temp, 3); +Math.pow(++temp, 3); +Math.pow(--temp, 3); +Math.pow(temp++, 3); +Math.pow(temp--, 3); diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts index 6788ab36f86..0e16443d547 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts @@ -1,15 +1,16 @@ // @target: es5 var temp: any; ---temp ** 3; -++temp ** 3; -temp-- ** 3; -temp++ ** 3; +(temp) ** 3; +(--temp) ** 3; +(++temp) ** 3; +(temp--) ** 3; +(temp++) ** 3; -1 ** --temp ** 3; -1 ** ++temp ** 3; -1 ** temp-- ** 3; -1 ** temp++ ** 3; +1 ** (--temp) ** 3; +1 ** (++temp) ** 3; +1 ** (temp--) ** 3; +1 ** (temp++) ** 3; (void --temp) ** 3; (void temp--) ** 3; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts index d3b718a2054..6da1f54b701 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts @@ -1,15 +1,16 @@ // @target: es7 var temp: any; ---temp ** 3; -++temp ** 3; -temp-- ** 3; -temp++ ** 3; +(temp) ** 3; +(--temp) ** 3; +(++temp) ** 3; +(temp--) ** 3; +(temp++) ** 3; -1 ** --temp ** 3; -1 ** ++temp ** 3; -1 ** temp-- ** 3; -1 ** temp++ ** 3; +1 ** (--temp) ** 3; +1 ** (++temp) ** 3; +1 ** (temp--) ** 3; +1 ** (temp++) ** 3; (void --temp) ** 3; (void temp--) ** 3; diff --git a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts index da7cf7f0d85..e5118d18551 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts @@ -61,3 +61,9 @@ void temp-- ** 4; 1 ** !3 ** 4; 1 ** !temp++ ** 4; 1 ** !temp-- ** 4; + +temp ** 3; +++temp ** 3; +--temp ** 3; +temp++ ** 3; +temp-- ** 3; \ No newline at end of file From f52b7cc2c5c31decb76c6221c81bda16b6b98c8b Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 6 Oct 2015 15:41:47 -0700 Subject: [PATCH 067/121] Removed unnecessary check --- src/compiler/emitter.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index c00c7e50076..312ea42eefb 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4785,10 +4785,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // emit name if // - node has a name - // - this is default export and target is not ES6 (for ES6 `export default` does not need to be compiled downlevel) // - this is default export with static initializers - if ((node.name || (node.flags & NodeFlags.Default && (languageVersion < ScriptTarget.ES6 - || staticProperties.length > 0))) && !thisNodeIsDecorated) { + if ((node.name || (node.flags & NodeFlags.Default && staticProperties.length > 0)) && !thisNodeIsDecorated) { write(" "); emitDeclarationName(node); } From 703af074ff77a10e6468e3c367b2c7a96c93ebb1 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 6 Oct 2015 16:44:48 -0700 Subject: [PATCH 068/121] Fixes some checker errors regarding async functions. Fixes #5115. --- src/compiler/checker.ts | 28 ++++--- .../asyncFunctionDeclaration15_es6.errors.txt | 56 +++++++++++++ .../asyncFunctionDeclaration15_es6.js | 84 +++++++++++++++++++ .../asyncFunctionDeclaration15_es6.ts | 26 ++++++ 4 files changed, 183 insertions(+), 11 deletions(-) create mode 100644 tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt create mode 100644 tests/baselines/reference/asyncFunctionDeclaration15_es6.js create mode 100644 tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c1d8bd991c4..551f428ca9a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2209,7 +2209,7 @@ namespace ts { /** * Push an entry on the type resolution stack. If an entry with the given target and the given property name - * is already on the stack, and no entries in between already have a type, then a circularity has occurred. + * is already on the stack, and no entries in between already have a type, then a circularity has occurred. * In this case, the result values of the existing entry and all entries pushed after it are changed to false, * and the value false is returned. Otherwise, the new entry is just pushed onto the stack, and true is returned. * In order to see if the same query has already been done before, the target object and the propertyName both @@ -5243,7 +5243,7 @@ namespace ts { // Only want to compare the construct signatures for abstractness guarantees. // Because the "abstractness" of a class is the same across all construct signatures - // (internally we are checking the corresponding declaration), it is enough to perform + // (internally we are checking the corresponding declaration), it is enough to perform // the check and report an error once over all pairs of source and target construct signatures. // // sourceSig and targetSig are (possibly) undefined. @@ -6642,7 +6642,7 @@ namespace ts { let needToCaptureLexicalThis = false; if (!isCallExpression) { - // adjust the container reference in case if super is used inside arrow functions with arbitrary deep nesting + // adjust the container reference in case if super is used inside arrow functions with arbitrary deep nesting while (container && container.kind === SyntaxKind.ArrowFunction) { container = getSuperContainer(container, /*includeFunctions*/ true); needToCaptureLexicalThis = languageVersion < ScriptTarget.ES6; @@ -6652,7 +6652,7 @@ namespace ts { let canUseSuperExpression = isLegalUsageOfSuperExpression(container); let nodeCheckFlag: NodeCheckFlags = 0; - // always set NodeCheckFlags for 'super' expression node + // always set NodeCheckFlags for 'super' expression node if (canUseSuperExpression) { if ((container.flags & NodeFlags.Static) || isCallExpression) { nodeCheckFlag = NodeCheckFlags.SuperStatic; @@ -8568,7 +8568,7 @@ namespace ts { // A method or accessor declaration decorator will have two or three arguments (see // `PropertyDecorator` and `MethodDecorator` in core.d.ts) - // If we are emitting decorators for ES3, we will only pass two arguments. + // If we are emitting decorators for ES3, we will only pass two arguments. if (languageVersion === ScriptTarget.ES3) { return 2; } @@ -11306,7 +11306,8 @@ namespace ts { } function checkNonThenableType(type: Type, location?: Node, message?: DiagnosticMessage) { - if (!(type.flags & TypeFlags.Any) && isTypeAssignableTo(type, getGlobalThenableType())) { + type = getWidenedType(type); + if (!isTypeAny(type) && isTypeAssignableTo(type, getGlobalThenableType())) { if (location) { if (!message) { message = Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member; @@ -12544,7 +12545,12 @@ namespace ts { if (isAsyncFunctionLike(func)) { let promisedType = getPromisedType(returnType); let awaitedType = checkAwaitedType(exprType, node.expression, Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member); - checkTypeAssignableTo(awaitedType, promisedType, node.expression); + if (promisedType) { + // If the function has a return type, but promisedType is + // undefined, an error will be reported in checkAsyncFunctionReturnType + // so we don't need to report one here. + checkTypeAssignableTo(awaitedType, promisedType, node.expression); + } } else { checkTypeAssignableTo(exprType, returnType, node.expression); @@ -13154,13 +13160,13 @@ namespace ts { autoValue = computeConstantValueForEnumMemberInitializer(initializer, enumType, enumIsConst, ambient); } else if (ambient && !enumIsConst) { - // In ambient enum declarations that specify no const modifier, enum member declarations + // In ambient enum declarations that specify no const modifier, enum member declarations // that omit a value are considered computed members (as opposed to having auto-incremented values assigned). autoValue = undefined; } else if (previousEnumMemberIsNonConstant) { - // If the member declaration specifies no value, the member is considered a constant enum member. - // If the member is the first member in the enum declaration, it is assigned the value zero. + // If the member declaration specifies no value, the member is considered a constant enum member. + // If the member is the first member in the enum declaration, it is assigned the value zero. // Otherwise, it is assigned the value of the immediately preceding member plus one, // and an error occurs if the immediately preceding member is not a constant enum member error(member.name, Diagnostics.Enum_member_must_have_initializer); @@ -14100,7 +14106,7 @@ namespace ts { case SyntaxKind.ClassDeclaration: case SyntaxKind.InterfaceDeclaration: // If we didn't come from static member of class or interface, - // add the type parameters into the symbol table + // add the type parameters into the symbol table // (type parameters of classDeclaration/classExpression and interface are in member property of the symbol. // Note: that the memberFlags come from previous iteration. if (!(memberFlags & NodeFlags.Static)) { diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt new file mode 100644 index 00000000000..8c029eaaaf4 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.errors.txt @@ -0,0 +1,56 @@ +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,16): error TS1055: Type '{}' is not a valid async function return type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,16): error TS1055: Type 'any' is not a valid async function return type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,16): error TS1055: Type 'number' is not a valid async function return type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,16): error TS1055: Type 'PromiseLike' is not a valid async function return type. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,16): error TS1055: Type 'typeof Thenable' is not a valid async function return type. + Type 'Thenable' is not assignable to type 'PromiseLike'. + Types of property 'then' are incompatible. + Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled?: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; }'. + Type 'void' is not assignable to type 'PromiseLike'. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. + + +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (7 errors) ==== + declare class Thenable { then(): void; } + declare let a: any; + declare let obj: { then: string; }; + declare let thenable: Thenable; + async function fn1() { } // valid: Promise + async function fn2(): { } { } // error + ~~~ +!!! error TS1055: Type '{}' is not a valid async function return type. + async function fn3(): any { } // error + ~~~ +!!! error TS1055: Type 'any' is not a valid async function return type. + async function fn4(): number { } // error + ~~~ +!!! error TS1055: Type 'number' is not a valid async function return type. + async function fn5(): PromiseLike { } // error + ~~~ +!!! error TS1055: Type 'PromiseLike' is not a valid async function return type. + async function fn6(): Thenable { } // error + ~~~ +!!! error TS1055: Type 'typeof Thenable' is not a valid async function return type. +!!! error TS1055: Type 'Thenable' is not assignable to type 'PromiseLike'. +!!! error TS1055: Types of property 'then' are incompatible. +!!! error TS1055: Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled?: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => void): PromiseLike; }'. +!!! error TS1055: Type 'void' is not assignable to type 'PromiseLike'. + async function fn7() { return; } // valid: Promise + async function fn8() { return 1; } // valid: Promise + async function fn9() { return null; } // valid: Promise + async function fn10() { return undefined; } // valid: Promise + async function fn11() { return a; } // valid: Promise + async function fn12() { return obj; } // valid: Promise<{ then: string; }> + async function fn13() { return thenable; } // error + ~~~~ +!!! error TS1059: Return expression in async function does not have a valid callable 'then' member. + async function fn14() { await 1; } // valid: Promise + async function fn15() { await null; } // valid: Promise + async function fn16() { await undefined; } // valid: Promise + async function fn17() { await a; } // valid: Promise + async function fn18() { await obj; } // valid: Promise + async function fn19() { await thenable; } // error + ~~~~~~~~~~~~~~ +!!! error TS1058: Operand for 'await' does not have a valid callable 'then' member. + \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es6.js b/tests/baselines/reference/asyncFunctionDeclaration15_es6.js new file mode 100644 index 00000000000..c72062e24b2 --- /dev/null +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es6.js @@ -0,0 +1,84 @@ +//// [asyncFunctionDeclaration15_es6.ts] +declare class Thenable { then(): void; } +declare let a: any; +declare let obj: { then: string; }; +declare let thenable: Thenable; +async function fn1() { } // valid: Promise +async function fn2(): { } { } // error +async function fn3(): any { } // error +async function fn4(): number { } // error +async function fn5(): PromiseLike { } // error +async function fn6(): Thenable { } // error +async function fn7() { return; } // valid: Promise +async function fn8() { return 1; } // valid: Promise +async function fn9() { return null; } // valid: Promise +async function fn10() { return undefined; } // valid: Promise +async function fn11() { return a; } // valid: Promise +async function fn12() { return obj; } // valid: Promise<{ then: string; }> +async function fn13() { return thenable; } // error +async function fn14() { await 1; } // valid: Promise +async function fn15() { await null; } // valid: Promise +async function fn16() { await undefined; } // valid: Promise +async function fn17() { await a; } // valid: Promise +async function fn18() { await obj; } // valid: Promise +async function fn19() { await thenable; } // error + + +//// [asyncFunctionDeclaration15_es6.js] +function fn1() { + return __awaiter(this, void 0, Promise, function* () { }); +} // valid: Promise +function fn2() { + return __awaiter(this, void 0, Promise, function* () { }); +} // error +function fn3() { + return __awaiter(this, void 0, Promise, function* () { }); +} // error +function fn4() { + return __awaiter(this, void 0, Promise, function* () { }); +} // error +function fn5() { + return __awaiter(this, void 0, PromiseLike, function* () { }); +} // error +function fn6() { + return __awaiter(this, void 0, Thenable, function* () { }); +} // error +function fn7() { + return __awaiter(this, void 0, Promise, function* () { return; }); +} // valid: Promise +function fn8() { + return __awaiter(this, void 0, Promise, function* () { return 1; }); +} // valid: Promise +function fn9() { + return __awaiter(this, void 0, Promise, function* () { return null; }); +} // valid: Promise +function fn10() { + return __awaiter(this, void 0, Promise, function* () { return undefined; }); +} // valid: Promise +function fn11() { + return __awaiter(this, void 0, Promise, function* () { return a; }); +} // valid: Promise +function fn12() { + return __awaiter(this, void 0, Promise, function* () { return obj; }); +} // valid: Promise<{ then: string; }> +function fn13() { + return __awaiter(this, void 0, Promise, function* () { return thenable; }); +} // error +function fn14() { + return __awaiter(this, void 0, Promise, function* () { yield 1; }); +} // valid: Promise +function fn15() { + return __awaiter(this, void 0, Promise, function* () { yield null; }); +} // valid: Promise +function fn16() { + return __awaiter(this, void 0, Promise, function* () { yield undefined; }); +} // valid: Promise +function fn17() { + return __awaiter(this, void 0, Promise, function* () { yield a; }); +} // valid: Promise +function fn18() { + return __awaiter(this, void 0, Promise, function* () { yield obj; }); +} // valid: Promise +function fn19() { + return __awaiter(this, void 0, Promise, function* () { yield thenable; }); +} // error diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts new file mode 100644 index 00000000000..56bcf84911a --- /dev/null +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts @@ -0,0 +1,26 @@ +// @target: ES6 +// @noEmitHelpers: true +// @experimentalAsyncFunctions: true +declare class Thenable { then(): void; } +declare let a: any; +declare let obj: { then: string; }; +declare let thenable: Thenable; +async function fn1() { } // valid: Promise +async function fn2(): { } { } // error +async function fn3(): any { } // error +async function fn4(): number { } // error +async function fn5(): PromiseLike { } // error +async function fn6(): Thenable { } // error +async function fn7() { return; } // valid: Promise +async function fn8() { return 1; } // valid: Promise +async function fn9() { return null; } // valid: Promise +async function fn10() { return undefined; } // valid: Promise +async function fn11() { return a; } // valid: Promise +async function fn12() { return obj; } // valid: Promise<{ then: string; }> +async function fn13() { return thenable; } // error +async function fn14() { await 1; } // valid: Promise +async function fn15() { await null; } // valid: Promise +async function fn16() { await undefined; } // valid: Promise +async function fn17() { await a; } // valid: Promise +async function fn18() { await obj; } // valid: Promise +async function fn19() { await thenable; } // error From 75af4f70b6939ebed3265e69b4018dff33f271bb Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 7 Oct 2015 10:37:28 -0700 Subject: [PATCH 069/121] transpile text as tsx if jsx option is specified --- src/services/services.ts | 4 +- tests/cases/unittests/transpile.ts | 67 +++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 7 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 99c6e4d6032..9a6afb5f1e0 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1850,8 +1850,8 @@ namespace ts { // so pass --noResolve to avoid reporting missing file errors. options.noResolve = true; - // Parse - let inputFileName = transpileOptions.fileName || "module.ts"; + // if jsx is specified then treat file as .tsx + let inputFileName = transpileOptions.fileName || (options.jsx ? "module.tsx" : "module.ts"); let sourceFile = createSourceFile(inputFileName, input, options.target); if (transpileOptions.moduleName) { sourceFile.moduleName = transpileOptions.moduleName; diff --git a/tests/cases/unittests/transpile.ts b/tests/cases/unittests/transpile.ts index ca7d1faa4a9..0dd3125cda1 100644 --- a/tests/cases/unittests/transpile.ts +++ b/tests/cases/unittests/transpile.ts @@ -43,7 +43,7 @@ module ts { } if (canUseOldTranspile) { - let diagnostics: Diagnostic[] = []; + let diagnostics: Diagnostic[] = []; let transpileResult = transpile(input, transpileOptions.compilerOptions, transpileOptions.fileName, diagnostics, transpileOptions.moduleName); checkDiagnostics(diagnostics, testSettings.expectedDiagnosticCodes); if (testSettings.expectedOutput) { @@ -57,10 +57,10 @@ module ts { } if (!transpileOptions.fileName) { - transpileOptions.fileName = "file.ts"; + transpileOptions.fileName = transpileOptions.compilerOptions.jsx ? "file.tsx" : "file.ts"; } - transpileOptions.compilerOptions.sourceMap = true; + transpileOptions.compilerOptions.sourceMap = true; let transpileModuleResultWithSourceMap = transpileModule(input, transpileOptions); assert.isTrue(transpileModuleResultWithSourceMap.sourceMapText !== undefined); @@ -68,7 +68,7 @@ module ts { let expectedSourceMappingUrlLine = `//# sourceMappingURL=${expectedSourceMapFileName}`; if (testSettings.expectedOutput !== undefined) { - assert.equal(transpileModuleResultWithSourceMap.outputText, testSettings.expectedOutput + expectedSourceMappingUrlLine); + assert.equal(transpileModuleResultWithSourceMap.outputText, testSettings.expectedOutput + expectedSourceMappingUrlLine); } else { // expected output is not set, just verify that output text has sourceMappingURL as a last line @@ -78,7 +78,7 @@ module ts { assert.equal(output, expectedSourceMappingUrlLine); } else { - let suffix = getNewLineCharacter(transpileOptions.compilerOptions) + expectedSourceMappingUrlLine + let suffix = getNewLineCharacter(transpileOptions.compilerOptions) + expectedSourceMappingUrlLine assert.isTrue(output.indexOf(suffix, output.length - suffix.length) !== -1); } } @@ -274,5 +274,62 @@ var x = 0;`, it("Supports backslashes in file name", () => { test("var x", { expectedOutput: "var x;\r\n", options: { fileName: "a\\b.ts" }}); }); + + it("transpile file as 'tsx' if 'jsx' is specified", () => { + let input = `import * as React from 'react';\r\n` + +`export default class Test extends React.Component {\r\n` + +` constructor(props: any) {\r\n` + +` this.state = {\r\n` + +` text : undefined\r\n` + +` };\r\n` + +` super();\r\n` + +` }\r\n` + +` handleClick(e) {\r\n` + +` e.preventDefault();\r\n` + +` this.setState({\r\n` + +` text : 'just testing'\r\n` + +` });\r\n` + +` }\r\n` + +` render() {\r\n` + +` return (\r\n` + +` \r\n` + +` );\r\n` + +` }\r\n` + +`}`; + let output = `var __extends = (this && this.__extends) || function (d, b) {\r\n` + +` for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n` + +` function __() { this.constructor = d; }\r\n` + +` d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n` + +`};\r\n` + +`var React = require('react');\r\n` + +`var Test = (function (_super) {\r\n` + +` __extends(Test, _super);\r\n` + +` function Test(props) {\r\n` + +` this.state = {\r\n` + +` text: undefined\r\n` + +` };\r\n` + +` _super.call(this);\r\n` + +` }\r\n` + +` Test.prototype.handleClick = function (e) {\r\n` + +` e.preventDefault();\r\n` + +` this.setState({\r\n` + +` text: 'just testing'\r\n` + +` });\r\n` + +` };\r\n` + +` Test.prototype.render = function () {\r\n` + +` return (React.createElement("div", null, React.createElement("a", {"href": "#", "onClick": this.handleClick}, 'test')));\r\n` + +` };\r\n` + +` return Test;\r\n` + +`})(React.Component);\r\n` + +`exports["default"] = Test;\r\n`; + test(input, { + expectedOutput: output, + options: { compilerOptions: { jsx: JsxEmit.React, newLine: NewLineKind.CarriageReturnLineFeed } } + }) + }); }); } From 7175e5d1ae673972d4646a6450da85f47422331d Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 7 Oct 2015 14:32:17 -0700 Subject: [PATCH 070/121] fix issue 4942 --- src/lib/dom.generated.d.ts | 11 +++++------ src/lib/webworker.generated.d.ts | 5 ++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 3f3e598fb18..1d2ad26db36 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -1067,7 +1067,7 @@ declare var CanvasPattern: { interface CanvasRenderingContext2D { canvas: HTMLCanvasElement; - fillStyle: any; + fillStyle: string | CanvasGradient | CanvasPattern; font: string; globalAlpha: number; globalCompositeOperation: string; @@ -1082,7 +1082,7 @@ interface CanvasRenderingContext2D { shadowColor: string; shadowOffsetX: number; shadowOffsetY: number; - strokeStyle: any; + strokeStyle: string | CanvasGradient | CanvasPattern; textAlign: string; textBaseline: string; arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; @@ -8620,7 +8620,6 @@ declare var SVGDescElement: { interface SVGElement extends Element { id: string; - className: any; onclick: (ev: MouseEvent) => any; ondblclick: (ev: MouseEvent) => any; onfocusin: (ev: FocusEvent) => any; @@ -8634,6 +8633,7 @@ interface SVGElement extends Element { ownerSVGElement: SVGSVGElement; viewportElement: SVGElement; xmlbase: string; + className: any; addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void; @@ -12509,7 +12509,6 @@ interface XMLHttpRequestEventTarget { addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } - interface NodeListOf extends NodeList { length: number; item(index: number): TNode; @@ -12530,8 +12529,6 @@ interface EventListenerObject { handleEvent(evt: Event): void; } -declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; - interface MessageEventInit extends EventInit { data?: any; origin?: string; @@ -12547,6 +12544,8 @@ interface ProgressEventInit extends EventInit { total?: number; } +declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; + interface ErrorEventHandler { (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void; } diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index f37ea5c6ed2..7e160fffa45 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -894,7 +894,6 @@ interface WorkerUtils extends Object, WindowBase64 { setTimeout(handler: any, timeout?: any, ...args: any[]): number; } - interface BlobPropertyBag { type?: string; endings?: string; @@ -909,8 +908,6 @@ interface EventListenerObject { handleEvent(evt: Event): void; } -declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; - interface MessageEventInit extends EventInit { data?: any; origin?: string; @@ -926,6 +923,8 @@ interface ProgressEventInit extends EventInit { total?: number; } +declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; + interface ErrorEventHandler { (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void; } From 37db03ae6af3862b000cc1bf31d0941af5d0e48d Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 7 Oct 2015 14:50:58 -0700 Subject: [PATCH 071/121] Address feedback on diagnostic message --- .../diagnosticInformationMap.generated.ts | 3 +- src/compiler/diagnosticMessages.json | 6 +- src/compiler/parser.ts | 60 ++-- ...nTemplateStringWithSyntaxError1.errors.txt | 180 +++++----- ...nTemplateStringWithSyntaxError2.errors.txt | 180 +++++----- ...nTemplateStringWithSyntaxError3.errors.txt | 180 +++++----- ...onentiationOperatorSyntaxError1.errors.txt | 186 +++++----- ...onentiationOperatorSyntaxError2.errors.txt | 318 +++++++++--------- 8 files changed, 564 insertions(+), 549 deletions(-) diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 5b12e5ac215..54b31f2477a 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -618,6 +618,7 @@ namespace ts { JSX_attribute_expected: { code: 17003, category: DiagnosticCategory.Error, key: "JSX attribute expected." }, Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: DiagnosticCategory.Error, key: "Cannot use JSX unless the '--jsx' flag is provided." }, A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: DiagnosticCategory.Error, key: "A constructor cannot contain a 'super' call when its class extends 'null'" }, - Left_hand_side_of_Asterisk_Asterisk_cannot_be_a_simple_unary_expression_Consider_parenthesize_the_expression: { code: 17006, category: DiagnosticCategory.Error, key: "Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression." }, + An_unary_expression_with_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: DiagnosticCategory.Error, key: "An unary expression with '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, + Type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: DiagnosticCategory.Error, key: "Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, }; } \ No newline at end of file diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 34dd1ffa227..e97de6ef68b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2467,7 +2467,11 @@ "category": "Error", "code": 17005 }, - "Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.": { + "An unary expression with '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { + "category": "Error", + "code": 17006 + }, + "Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { "category": "Error", "code": 17006 } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index c283ec0fc95..4046d4a7c36 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3206,9 +3206,17 @@ namespace ts { incrementExpression; } + let unaryOperator = token; let simpleUnaryExpression = parseSimpleUnaryExpression(); if (token === SyntaxKind.AsteriskAsteriskToken) { - parseErrorAtCurrentToken(Diagnostics.Left_hand_side_of_Asterisk_Asterisk_cannot_be_a_simple_unary_expression_Consider_parenthesize_the_expression) + let diagnostic: Diagnostic; + let start = skipTrivia(sourceText, simpleUnaryExpression.pos); + if (simpleUnaryExpression.kind === SyntaxKind.TypeAssertionExpression) { + parseErrorAtPosition(start, simpleUnaryExpression.end - start, Diagnostics.Type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); + } + else { + parseErrorAtPosition(start, simpleUnaryExpression.end - start, Diagnostics.An_unary_expression_with_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator)); + } } return simpleUnaryExpression; } @@ -3240,16 +3248,10 @@ namespace ts { case SyntaxKind.VoidKeyword: return parseVoidExpression(); case SyntaxKind.LessThanToken: - if (sourceFile.languageVariant !== LanguageVariant.JSX) { - // This is modified UnaryExpression grammar in TypeScript - // UnaryExpression (modified): - // < type > UnaryExpression - return parseTypeAssertion(); - } - if (lookAhead(nextTokenIsIdentifierOrKeyword)) { - return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); - } - // Fall through + // This is modified UnaryExpression grammar in TypeScript + // UnaryExpression (modified): + // < type > UnaryExpression + return parseTypeAssertion(); default: return parseIncrementExpression(); } @@ -3276,8 +3278,13 @@ namespace ts { case SyntaxKind.DeleteKeyword: case SyntaxKind.TypeOfKeyword: case SyntaxKind.VoidKeyword: + return false case SyntaxKind.LessThanToken: - return false; + // TODO (yuisu): comment + if (sourceFile.languageVariant !== LanguageVariant.JSX) { + return false; + } + // Fall through default: return true; } @@ -3302,20 +3309,23 @@ namespace ts { node.operand = parseLeftHandSideExpressionOrHigher(); return finishNode(node); } - else { - let expression = parseLeftHandSideExpressionOrHigher(); - - Debug.assert(isLeftHandSideExpression(expression)); - if ((token === SyntaxKind.PlusPlusToken || token === SyntaxKind.MinusMinusToken) && !scanner.hasPrecedingLineBreak()) { - let node = createNode(SyntaxKind.PostfixUnaryExpression, expression.pos); - node.operand = expression; - node.operator = token; - nextToken(); - return finishNode(node); - } - - return expression; + else if (sourceFile.languageVariant === LanguageVariant.JSX && token === SyntaxKind.LessThanToken && lookAhead(nextTokenIsIdentifierOrKeyword)) { + // TODO (yuisu) : comment + return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); } + + let expression = parseLeftHandSideExpressionOrHigher(); + + Debug.assert(isLeftHandSideExpression(expression)); + if ((token === SyntaxKind.PlusPlusToken || token === SyntaxKind.MinusMinusToken) && !scanner.hasPrecedingLineBreak()) { + let node = createNode(SyntaxKind.PostfixUnaryExpression, expression.pos); + node.operand = expression; + node.operator = token; + nextToken(); + return finishNode(node); + } + + return expression; } function parseLeftHandSideExpressionOrHigher(): LeftHandSideExpression { diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt index dee60064e85..56ffea60a18 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt @@ -1,48 +1,48 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(9,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(10,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(11,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(9,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(10,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(11,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,25): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,21): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,23): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,23): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,25): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,25): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,28): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,28): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,36): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,46): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,36): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,34): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,36): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,36): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,38): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,38): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,41): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,51): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,41): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,49): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,59): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,49): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts (45 errors) ==== @@ -56,110 +56,110 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTempl `${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. \ No newline at end of file + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt index b73c8b44932..4cdc5ca3b8f 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt @@ -1,48 +1,48 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(8,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(9,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(10,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(8,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(9,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(10,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,10): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,10): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,24): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,31): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,35): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,35): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,14): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,27): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,29): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,29): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,10): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,31): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,35): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,31): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,10): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,34): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,44): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,34): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,24): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,14): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,42): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,52): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,44): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,48): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,48): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,42): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,40): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,42): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,42): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,10): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,44): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,48): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,44): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,10): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,47): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,57): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,47): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,24): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,14): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,55): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,65): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,55): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts (45 errors) ==== @@ -54,113 +54,113 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTempl // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () // With templateHead `hello ${-t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-++t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1++ ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt index 9fdf5712851..1c79166c04a 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt @@ -1,48 +1,48 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(8,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(9,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(10,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(8,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(9,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(10,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,25): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,21): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,23): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,23): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,25): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,25): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,28): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,28): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,36): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,46): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,36): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,34): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,36): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,36): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,38): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,38): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,41): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,51): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,41): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,49): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,59): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,49): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts (45 errors) ==== @@ -54,112 +54,112 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTempl // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () // With TemplateTail `${-t1 ** t2 - t1} world`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1} world`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1} world`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 } world`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1} world`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1} world`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. \ No newline at end of file + ~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt b/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt index 774f733748d..c824a8fe57e 100644 --- a/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt @@ -1,135 +1,135 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(3,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(4,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(5,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(6,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(8,11): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(12,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(13,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(14,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(15,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(16,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(17,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(18,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(19,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(21,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(22,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(23,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(24,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(25,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(26,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(27,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(28,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(29,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(30,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(31,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(32,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(33,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(34,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(35,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(36,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(3,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(4,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(5,6): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(6,6): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,7): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(8,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(12,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(13,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(14,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(15,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(16,6): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(17,6): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(18,6): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(19,6): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(21,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(22,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(23,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(24,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(25,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(26,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(27,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(28,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(29,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(30,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(31,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(32,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(33,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(34,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(35,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(36,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts (31 errors) ==== // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () -1 ** 2; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +1 ** 2 - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** -2 ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** -2 ** -3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -1 ** -2 ** -3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -(1 ** 2) ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. var temp = 10; -++temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +--temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -temp++ ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +temp-- ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** -++temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** +--temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** -temp++ ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** +temp-- ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** temp++; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** temp--; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** ++temp; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** --temp; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** temp++; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** temp--; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** ++temp; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** --temp; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** temp++ ** 2; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** temp-- ** 2; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** ++temp ** 2; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** --temp ** 2; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** temp++ ** 2; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** temp-- ** 2; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** ++temp ** 2; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** --temp ** 2; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt index 45d0854a07f..a39b7c69bc4 100644 --- a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt @@ -1,84 +1,84 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(28,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(29,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(30,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(31,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(32,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(34,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(35,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(36,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(37,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(38,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(40,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(41,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(42,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(43,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(44,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(46,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(47,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(48,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(49,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(50,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(28,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(29,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(30,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(31,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(32,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(34,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(35,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(36,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(37,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(38,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(40,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(41,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(42,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(43,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(44,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(46,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(47,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(48,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(49,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(50,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(64,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(65,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(66,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(67,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(68,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(64,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(65,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(66,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(67,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(68,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts (81 errors) ==== @@ -89,226 +89,226 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE delete --temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. delete ++temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. delete temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. delete temp++ ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** delete --temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** delete ++temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** delete temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** delete temp++ ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof --temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof 3 ** 4; ~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof temp++ ** 4; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof temp-- ** 4; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof --temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof 3 ** 4; ~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof temp++ ** 4; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof temp-- ** 4; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void --temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void temp-- ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void 3 ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void temp++ ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void temp-- ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void --temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void temp-- ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void 3 ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void temp++ ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void temp-- ** 4 ; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~ +!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~ --temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~temp-- ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~3 ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~temp++ ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~temp-- ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~ --temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~temp-- ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~3 ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~temp++ ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~temp-- ** 4; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ! --temp ** 3; ~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. !temp-- ** 3; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. !3 ** 4; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. !temp++ ** 4; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. !temp-- ** 4; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ! --temp ** 3; ~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** !temp-- ** 3; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** !3 ** 4; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** !temp++ ** 4; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** !temp-- ** 4; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~ +!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~ +!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ++temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~~ +!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. --temp ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~~ +!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. temp++ ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. + ~~~~~~~~~~~~~~ +!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. temp-- ** 3; - ~~ -!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression. \ No newline at end of file + ~~~~~~~~~~~~~~ +!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file From 3b8cdb684b41726c5638756b0cbb8ec725e47ddd Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 7 Oct 2015 15:26:09 -0700 Subject: [PATCH 072/121] Address comment to increment emitCount in separate line --- src/compiler/emitter.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 115979bd30b..ce52119dbe1 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3329,7 +3329,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (!canDefineTempVariablesInPlace) { recordTempDeclaration(identifier); } - emitAssignment(identifier, expr, /*shouldEmitCommaBeforeAssignment*/ emitCount++ > 0); + emitAssignment(identifier, expr, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); + emitCount++; return identifier; } @@ -3429,7 +3430,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitArrayLiteralAssignment(target, value); } else { - emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount++ > 0); + emitAssignment(target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); + emitCount++; } } @@ -3498,7 +3500,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } else { - emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount++ > 0); + emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount> 0); + emitCount++; } } } From fb1d2cf42cd6e1b30fe91ecc04aca624f6fb5ea9 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 7 Oct 2015 15:48:53 -0700 Subject: [PATCH 073/121] address PR feedback --- tests/cases/unittests/transpile.ts | 54 ++---------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) diff --git a/tests/cases/unittests/transpile.ts b/tests/cases/unittests/transpile.ts index 0dd3125cda1..1d688f091a4 100644 --- a/tests/cases/unittests/transpile.ts +++ b/tests/cases/unittests/transpile.ts @@ -276,59 +276,11 @@ var x = 0;`, }); it("transpile file as 'tsx' if 'jsx' is specified", () => { - let input = `import * as React from 'react';\r\n` + -`export default class Test extends React.Component {\r\n` + -` constructor(props: any) {\r\n` + -` this.state = {\r\n` + -` text : undefined\r\n` + -` };\r\n` + -` super();\r\n` + -` }\r\n` + -` handleClick(e) {\r\n` + -` e.preventDefault();\r\n` + -` this.setState({\r\n` + -` text : 'just testing'\r\n` + -` });\r\n` + -` }\r\n` + -` render() {\r\n` + -` return (\r\n` + -`
\r\n` + -` \r\n` + -` {'test'}\r\n` + -` \r\n` + -`
\r\n` + -` );\r\n` + -` }\r\n` + -`}`; - let output = `var __extends = (this && this.__extends) || function (d, b) {\r\n` + -` for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n` + -` function __() { this.constructor = d; }\r\n` + -` d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n` + -`};\r\n` + -`var React = require('react');\r\n` + -`var Test = (function (_super) {\r\n` + -` __extends(Test, _super);\r\n` + -` function Test(props) {\r\n` + -` this.state = {\r\n` + -` text: undefined\r\n` + -` };\r\n` + -` _super.call(this);\r\n` + -` }\r\n` + -` Test.prototype.handleClick = function (e) {\r\n` + -` e.preventDefault();\r\n` + -` this.setState({\r\n` + -` text: 'just testing'\r\n` + -` });\r\n` + -` };\r\n` + -` Test.prototype.render = function () {\r\n` + -` return (React.createElement("div", null, React.createElement("a", {"href": "#", "onClick": this.handleClick}, 'test')));\r\n` + -` };\r\n` + -` return Test;\r\n` + -`})(React.Component);\r\n` + -`exports["default"] = Test;\r\n`; + let input = `var x =
`; + let output = `var x = React.createElement("div", null);\n`; test(input, { expectedOutput: output, - options: { compilerOptions: { jsx: JsxEmit.React, newLine: NewLineKind.CarriageReturnLineFeed } } + options: { compilerOptions: { jsx: JsxEmit.React, newLine: NewLineKind.LineFeed } } }) }); }); From 75de6d45306750cb34b253177e57451b0846c22a Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 7 Oct 2015 18:44:20 -0700 Subject: [PATCH 074/121] Add comment --- src/compiler/parser.ts | 5 +++-- src/compiler/program.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 4046d4a7c36..af3249ddca2 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3280,10 +3280,11 @@ namespace ts { case SyntaxKind.VoidKeyword: return false case SyntaxKind.LessThanToken: - // TODO (yuisu): comment + // If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression if (sourceFile.languageVariant !== LanguageVariant.JSX) { return false; } + // We are in JSX context and the token is part of JSXElement. // Fall through default: return true; @@ -3310,7 +3311,7 @@ namespace ts { return finishNode(node); } else if (sourceFile.languageVariant === LanguageVariant.JSX && token === SyntaxKind.LessThanToken && lookAhead(nextTokenIsIdentifierOrKeyword)) { - // TODO (yuisu) : comment + // JSXElement is part of primaryExpression return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true); } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 3da3c354fb2..3043f6be708 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -862,8 +862,8 @@ namespace ts { const importedFile = findModuleSourceFile(resolution.resolvedFileName, file.imports[i]); if (importedFile && resolution.isExternalLibraryImport) { if (!isExternalModule(importedFile)) { - let start = getTokenPosOfNode(file.imports[i], file) - fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName)); + let start = getTokenPosOfNode(file.imports[i], file) + fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName)); } else if (!fileExtensionIs(importedFile.fileName, ".d.ts")) { let start = getTokenPosOfNode(file.imports[i], file) From 8960f523eaee101b1a60511ac638a927139f7a4c Mon Sep 17 00:00:00 2001 From: jbondc Date: Thu, 8 Oct 2015 07:57:35 -0400 Subject: [PATCH 075/121] Resolve const enum value in index access. --- src/compiler/checker.ts | 7 ++++ tests/cases/compiler/constIndexedAccess.ts | 40 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 tests/cases/compiler/constIndexedAccess.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 551f428ca9a..c36ce9a7667 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8125,6 +8125,7 @@ namespace ts { /** * If indexArgumentExpression is a string literal or number literal, returns its text. + * If indexArgumentExpression is a constant value, returns its string value. * If indexArgumentExpression is a well known symbol, returns the property name corresponding * to this symbol, as long as it is a proper symbol reference. * Otherwise, returns undefined. @@ -8133,6 +8134,12 @@ namespace ts { if (indexArgumentExpression.kind === SyntaxKind.StringLiteral || indexArgumentExpression.kind === SyntaxKind.NumericLiteral) { return (indexArgumentExpression).text; } + if (indexArgumentExpression.kind === SyntaxKind.ElementAccessExpression || indexArgumentExpression.kind === SyntaxKind.PropertyAccessExpression) { + let value = getConstantValue(indexArgumentExpression); + if (value !== undefined) { + return value.toString(); + } + } if (checkThatExpressionIsProperSymbolReference(indexArgumentExpression, indexArgumentType, /*reportError*/ false)) { let rightHandSideName = ((indexArgumentExpression).name).text; return getPropertyNameForKnownSymbolName(rightHandSideName); diff --git a/tests/cases/compiler/constIndexedAccess.ts b/tests/cases/compiler/constIndexedAccess.ts new file mode 100644 index 00000000000..a1b1acc6872 --- /dev/null +++ b/tests/cases/compiler/constIndexedAccess.ts @@ -0,0 +1,40 @@ + +const enum numbers { + zero, + one +} + +interface indexAccess { + 0: string; + 1: number; +} + +let test: indexAccess; + +let s = test[0]; +let n = test[1]; + +let s1 = test[numbers.zero]; +let n1 = test[numbers.one]; + +/* +TODO: revisit with const propagation + +const zero = 0; +const one = 1; + +let s2 = test[zero]; +let n2 = test[one]; + +const zeroRef = zero; +const oneRef = one; + +let s3 = test[zeroRef]; +let n3 = test[oneRef]; + +const zeroRefEnum = numbers.zero; +const oneRefEnum = numbers.one; + +let s4 = test[zeroRefEnum]; +let n4 = test[oneRefEnum]; +*/ \ No newline at end of file From 82eb992dc43ad91ee553b9853ef7f6501b1afd77 Mon Sep 17 00:00:00 2001 From: jbondc Date: Thu, 8 Oct 2015 08:21:28 -0400 Subject: [PATCH 076/121] Accept baselines. --- src/compiler/checker.ts | 12 ++-- .../baselines/reference/constIndexedAccess.js | 69 ++++++++++++++++++ .../reference/constIndexedAccess.symbols | 68 ++++++++++++++++++ .../reference/constIndexedAccess.types | 72 +++++++++++++++++++ 4 files changed, 215 insertions(+), 6 deletions(-) create mode 100644 tests/baselines/reference/constIndexedAccess.js create mode 100644 tests/baselines/reference/constIndexedAccess.symbols create mode 100644 tests/baselines/reference/constIndexedAccess.types diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c36ce9a7667..d6e5a73d146 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8134,12 +8134,12 @@ namespace ts { if (indexArgumentExpression.kind === SyntaxKind.StringLiteral || indexArgumentExpression.kind === SyntaxKind.NumericLiteral) { return (indexArgumentExpression).text; } - if (indexArgumentExpression.kind === SyntaxKind.ElementAccessExpression || indexArgumentExpression.kind === SyntaxKind.PropertyAccessExpression) { - let value = getConstantValue(indexArgumentExpression); - if (value !== undefined) { - return value.toString(); - } - } + if (indexArgumentExpression.kind === SyntaxKind.ElementAccessExpression || indexArgumentExpression.kind === SyntaxKind.PropertyAccessExpression) { + let value = getConstantValue(indexArgumentExpression); + if (value !== undefined) { + return value.toString(); + } + } if (checkThatExpressionIsProperSymbolReference(indexArgumentExpression, indexArgumentType, /*reportError*/ false)) { let rightHandSideName = ((indexArgumentExpression).name).text; return getPropertyNameForKnownSymbolName(rightHandSideName); diff --git a/tests/baselines/reference/constIndexedAccess.js b/tests/baselines/reference/constIndexedAccess.js new file mode 100644 index 00000000000..ee0e9b8cc36 --- /dev/null +++ b/tests/baselines/reference/constIndexedAccess.js @@ -0,0 +1,69 @@ +//// [constIndexedAccess.ts] + +const enum numbers { + zero, + one +} + +interface indexAccess { + 0: string; + 1: number; +} + +let test: indexAccess; + +let s = test[0]; +let n = test[1]; + +let s1 = test[numbers.zero]; +let n1 = test[numbers.one]; + +/* +TODO: revisit with const propagation + +const zero = 0; +const one = 1; + +let s2 = test[zero]; +let n2 = test[one]; + +const zeroRef = zero; +const oneRef = one; + +let s3 = test[zeroRef]; +let n3 = test[oneRef]; + +const zeroRefEnum = numbers.zero; +const oneRefEnum = numbers.one; + +let s4 = test[zeroRefEnum]; +let n4 = test[oneRefEnum]; +*/ + +//// [constIndexedAccess.js] +var test; +var s = test[0]; +var n = test[1]; +var s1 = test[0 /* zero */]; +var n1 = test[1 /* one */]; +/* +TODO: revisit with const propagation + +const zero = 0; +const one = 1; + +let s2 = test[zero]; +let n2 = test[one]; + +const zeroRef = zero; +const oneRef = one; + +let s3 = test[zeroRef]; +let n3 = test[oneRef]; + +const zeroRefEnum = numbers.zero; +const oneRefEnum = numbers.one; + +let s4 = test[zeroRefEnum]; +let n4 = test[oneRefEnum]; +*/ diff --git a/tests/baselines/reference/constIndexedAccess.symbols b/tests/baselines/reference/constIndexedAccess.symbols new file mode 100644 index 00000000000..ff18f84372e --- /dev/null +++ b/tests/baselines/reference/constIndexedAccess.symbols @@ -0,0 +1,68 @@ +=== tests/cases/compiler/constIndexedAccess.ts === + +const enum numbers { +>numbers : Symbol(numbers, Decl(constIndexedAccess.ts, 0, 0)) + + zero, +>zero : Symbol(numbers.zero, Decl(constIndexedAccess.ts, 1, 20)) + + one +>one : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 6)) +} + +interface indexAccess { +>indexAccess : Symbol(indexAccess, Decl(constIndexedAccess.ts, 4, 1)) + + 0: string; + 1: number; +} + +let test: indexAccess; +>test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) +>indexAccess : Symbol(indexAccess, Decl(constIndexedAccess.ts, 4, 1)) + +let s = test[0]; +>s : Symbol(s, Decl(constIndexedAccess.ts, 13, 3)) +>test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) +>0 : Symbol(indexAccess.0, Decl(constIndexedAccess.ts, 6, 23)) + +let n = test[1]; +>n : Symbol(n, Decl(constIndexedAccess.ts, 14, 3)) +>test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) +>1 : Symbol(indexAccess.1, Decl(constIndexedAccess.ts, 7, 11)) + +let s1 = test[numbers.zero]; +>s1 : Symbol(s1, Decl(constIndexedAccess.ts, 16, 3)) +>test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) +>numbers.zero : Symbol(numbers.zero, Decl(constIndexedAccess.ts, 1, 20)) +>numbers : Symbol(numbers, Decl(constIndexedAccess.ts, 0, 0)) +>zero : Symbol(numbers.zero, Decl(constIndexedAccess.ts, 1, 20)) + +let n1 = test[numbers.one]; +>n1 : Symbol(n1, Decl(constIndexedAccess.ts, 17, 3)) +>test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) +>numbers.one : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 6)) +>numbers : Symbol(numbers, Decl(constIndexedAccess.ts, 0, 0)) +>one : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 6)) + +/* +TODO: revisit with const propagation + +const zero = 0; +const one = 1; + +let s2 = test[zero]; +let n2 = test[one]; + +const zeroRef = zero; +const oneRef = one; + +let s3 = test[zeroRef]; +let n3 = test[oneRef]; + +const zeroRefEnum = numbers.zero; +const oneRefEnum = numbers.one; + +let s4 = test[zeroRefEnum]; +let n4 = test[oneRefEnum]; +*/ diff --git a/tests/baselines/reference/constIndexedAccess.types b/tests/baselines/reference/constIndexedAccess.types new file mode 100644 index 00000000000..b4cc0e930d5 --- /dev/null +++ b/tests/baselines/reference/constIndexedAccess.types @@ -0,0 +1,72 @@ +=== tests/cases/compiler/constIndexedAccess.ts === + +const enum numbers { +>numbers : numbers + + zero, +>zero : numbers + + one +>one : numbers +} + +interface indexAccess { +>indexAccess : indexAccess + + 0: string; + 1: number; +} + +let test: indexAccess; +>test : indexAccess +>indexAccess : indexAccess + +let s = test[0]; +>s : string +>test[0] : string +>test : indexAccess +>0 : number + +let n = test[1]; +>n : number +>test[1] : number +>test : indexAccess +>1 : number + +let s1 = test[numbers.zero]; +>s1 : string +>test[numbers.zero] : string +>test : indexAccess +>numbers.zero : numbers +>numbers : typeof numbers +>zero : numbers + +let n1 = test[numbers.one]; +>n1 : number +>test[numbers.one] : number +>test : indexAccess +>numbers.one : numbers +>numbers : typeof numbers +>one : numbers + +/* +TODO: revisit with const propagation + +const zero = 0; +const one = 1; + +let s2 = test[zero]; +let n2 = test[one]; + +const zeroRef = zero; +const oneRef = one; + +let s3 = test[zeroRef]; +let n3 = test[oneRef]; + +const zeroRefEnum = numbers.zero; +const oneRefEnum = numbers.one; + +let s4 = test[zeroRefEnum]; +let n4 = test[oneRefEnum]; +*/ From 2fb6eabc2e1ced76709d6545c0a1c3508d3321cf Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 8 Oct 2015 08:11:33 -0700 Subject: [PATCH 077/121] Fix this.member completion+quickinfo of overloads 1. Completion after `this.` was empty. 2. Quick info of methods with overloads always chose the first overload, regardless of whether an argument whose type matched a different overload. Both have the same cause: the type parameter introduced by polymorphic `this` is not usable, whereas the original is. In both cases, the usage is simple -- it doesn't take advantage of the capabilities of polymorphic `this`. --- src/compiler/checker.ts | 5 +++++ src/services/services.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fe203ac52c9..32fc57cee3a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7977,6 +7977,11 @@ namespace ts { return true; } // An instance property must be accessed through an instance of the enclosing class + if (type.flags & TypeFlags.ThisType) { + // get the original type -- represented as the type constraint of the this type + type = getConstraintOfTypeParameter(type); + } + // TODO: why is the first part of this check here? if (!(getTargetType(type).flags & (TypeFlags.Class | TypeFlags.Interface) && hasBaseType(type, enclosingClass))) { error(node, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass)); diff --git a/src/services/services.ts b/src/services/services.ts index 99c6e4d6032..5a8241a5c45 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4105,7 +4105,7 @@ namespace ts { let useConstructSignatures = callExpression.kind === SyntaxKind.NewExpression || callExpression.expression.kind === SyntaxKind.SuperKeyword; let allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); - if (!contains(allSignatures, signature.target || signature)) { + if (!contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { // Get the first signature if there signature = allSignatures.length ? allSignatures[0] : undefined; } From 10f9fa6da6cb02934f35b906039b09e78b6adcb4 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 8 Oct 2015 09:30:08 -0700 Subject: [PATCH 078/121] Fix lint: remove trailing whitespace on empty line --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 32fc57cee3a..24b9f1651ac 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7981,7 +7981,7 @@ namespace ts { // get the original type -- represented as the type constraint of the this type type = getConstraintOfTypeParameter(type); } - + // TODO: why is the first part of this check here? if (!(getTargetType(type).flags & (TypeFlags.Class | TypeFlags.Interface) && hasBaseType(type, enclosingClass))) { error(node, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass)); From 533c4eb0c2c16dfcc4290ec3f7f872501f28c4a1 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 8 Oct 2015 10:18:14 -0700 Subject: [PATCH 079/121] Emit export assignments when target is ES6 and module kind is not ES6 --- src/compiler/emitter.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 312ea42eefb..c998415a292 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3785,7 +3785,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(";"); } } - if (languageVersion < ScriptTarget.ES6 && node.parent === currentSourceFile) { + if (modulekind !== ModuleKind.ES6 && node.parent === currentSourceFile) { forEach(node.declarationList.declarations, emitExportVariableAssignments); } } @@ -4011,7 +4011,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } emitSignatureAndBody(node); - if (languageVersion < ScriptTarget.ES6 && node.kind === SyntaxKind.FunctionDeclaration && node.parent === currentSourceFile && node.name) { + if (modulekind !== ModuleKind.ES6 && node.kind === SyntaxKind.FunctionDeclaration && node.parent === currentSourceFile && node.name) { emitExportMemberAssignments((node).name); } @@ -4687,6 +4687,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi else { emitClassLikeDeclarationForES6AndHigher(node); } + if (modulekind !== ModuleKind.ES6 && node.parent === currentSourceFile && node.name) { + emitExportMemberAssignments(node.name); + } } function emitClassLikeDeclarationForES6AndHigher(node: ClassLikeDeclaration) { @@ -4934,10 +4937,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (node.kind === SyntaxKind.ClassDeclaration) { emitExportMemberAssignment(node); } - - if (languageVersion < ScriptTarget.ES6 && node.parent === currentSourceFile && node.name) { - emitExportMemberAssignments(node.name); - } } function emitClassMemberPrefix(node: ClassLikeDeclaration, member: Node) { @@ -5509,7 +5508,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi emitEnd(node); write(";"); } - if (languageVersion < ScriptTarget.ES6 && node.parent === currentSourceFile) { + if (modulekind !== ModuleKind.ES6 && node.parent === currentSourceFile) { if (modulekind === ModuleKind.System && (node.flags & NodeFlags.Export)) { // write the call to exporter for enum writeLine(); From cae21c09b4ab65b73f2a3a0d87bb7cace6f6eda4 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 8 Oct 2015 10:58:58 -0700 Subject: [PATCH 080/121] Adding tests --- .../reference/exportsAndImports1-es6.js | 73 ++++++++++ .../reference/exportsAndImports1-es6.symbols | 101 ++++++++++++++ .../reference/exportsAndImports1-es6.types | 102 ++++++++++++++ .../reference/exportsAndImports2-es6.js | 26 ++++ .../reference/exportsAndImports2-es6.symbols | 26 ++++ .../reference/exportsAndImports2-es6.types | 28 ++++ .../reference/exportsAndImports3-es6.js | 75 ++++++++++ .../reference/exportsAndImports3-es6.symbols | 131 +++++++++++++++++ .../reference/exportsAndImports3-es6.types | 132 ++++++++++++++++++ .../reference/exportsAndImports4-es6.js | 66 +++++++++ .../reference/exportsAndImports4-es6.symbols | 68 +++++++++ .../reference/exportsAndImports4-es6.types | 68 +++++++++ .../es6/modules/exportsAndImports1-es6.ts | 34 +++++ .../es6/modules/exportsAndImports2-es6.ts | 13 ++ .../es6/modules/exportsAndImports3-es6.ts | 34 +++++ .../es6/modules/exportsAndImports4-es6.ts | 39 ++++++ 16 files changed, 1016 insertions(+) create mode 100644 tests/baselines/reference/exportsAndImports1-es6.js create mode 100644 tests/baselines/reference/exportsAndImports1-es6.symbols create mode 100644 tests/baselines/reference/exportsAndImports1-es6.types create mode 100644 tests/baselines/reference/exportsAndImports2-es6.js create mode 100644 tests/baselines/reference/exportsAndImports2-es6.symbols create mode 100644 tests/baselines/reference/exportsAndImports2-es6.types create mode 100644 tests/baselines/reference/exportsAndImports3-es6.js create mode 100644 tests/baselines/reference/exportsAndImports3-es6.symbols create mode 100644 tests/baselines/reference/exportsAndImports3-es6.types create mode 100644 tests/baselines/reference/exportsAndImports4-es6.js create mode 100644 tests/baselines/reference/exportsAndImports4-es6.symbols create mode 100644 tests/baselines/reference/exportsAndImports4-es6.types create mode 100644 tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts create mode 100644 tests/cases/conformance/es6/modules/exportsAndImports2-es6.ts create mode 100644 tests/cases/conformance/es6/modules/exportsAndImports3-es6.ts create mode 100644 tests/cases/conformance/es6/modules/exportsAndImports4-es6.ts diff --git a/tests/baselines/reference/exportsAndImports1-es6.js b/tests/baselines/reference/exportsAndImports1-es6.js new file mode 100644 index 00000000000..5610968bf79 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports1-es6.js @@ -0,0 +1,73 @@ +//// [tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts] //// + +//// [t1.ts] + +var v = 1; +function f() { } +class C { +} +interface I { +} +enum E { + A, B, C +} +const enum D { + A, B, C +} +module M { + export var x; +} +module N { + export interface I { + } +} +type T = number; +import a = M.x; + +export { v, f, C, I, E, D, M, N, T, a }; + +//// [t2.ts] +export { v, f, C, I, E, D, M, N, T, a } from "./t1"; + +//// [t3.ts] +import { v, f, C, I, E, D, M, N, T, a } from "./t1"; +export { v, f, C, I, E, D, M, N, T, a }; + + +//// [t1.js] +var v = 1; +exports.v = v; +function f() { } +exports.f = f; +class C { +} +exports.C = C; +var E; +(function (E) { + E[E["A"] = 0] = "A"; + E[E["B"] = 1] = "B"; + E[E["C"] = 2] = "C"; +})(E || (E = {})); +exports.E = E; +var M; +(function (M) { +})(M || (M = {})); +exports.M = M; +var a = M.x; +exports.a = a; +//// [t2.js] +var t1_1 = require("./t1"); +exports.v = t1_1.v; +exports.f = t1_1.f; +exports.C = t1_1.C; +exports.E = t1_1.E; +exports.M = t1_1.M; +exports.a = t1_1.a; +//// [t3.js] +var t1_1 = require("./t1"); +exports.v = t1_1.v; +exports.f = t1_1.f; +exports.C = t1_1.C; +exports.E = t1_1.E; +exports.M = t1_1.M; +exports.a = t1_1.a; diff --git a/tests/baselines/reference/exportsAndImports1-es6.symbols b/tests/baselines/reference/exportsAndImports1-es6.symbols new file mode 100644 index 00000000000..dc90c8c7bf9 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports1-es6.symbols @@ -0,0 +1,101 @@ +=== tests/cases/conformance/es6/modules/t1.ts === + +var v = 1; +>v : Symbol(v, Decl(t1.ts, 1, 3)) + +function f() { } +>f : Symbol(f, Decl(t1.ts, 1, 10)) + +class C { +>C : Symbol(C, Decl(t1.ts, 2, 16)) +} +interface I { +>I : Symbol(I, Decl(t1.ts, 4, 1)) +} +enum E { +>E : Symbol(E, Decl(t1.ts, 6, 1)) + + A, B, C +>A : Symbol(E.A, Decl(t1.ts, 7, 8)) +>B : Symbol(E.B, Decl(t1.ts, 8, 6)) +>C : Symbol(E.C, Decl(t1.ts, 8, 9)) +} +const enum D { +>D : Symbol(D, Decl(t1.ts, 9, 1)) + + A, B, C +>A : Symbol(D.A, Decl(t1.ts, 10, 14)) +>B : Symbol(D.B, Decl(t1.ts, 11, 6)) +>C : Symbol(D.C, Decl(t1.ts, 11, 9)) +} +module M { +>M : Symbol(M, Decl(t1.ts, 12, 1)) + + export var x; +>x : Symbol(x, Decl(t1.ts, 14, 14)) +} +module N { +>N : Symbol(N, Decl(t1.ts, 15, 1)) + + export interface I { +>I : Symbol(I, Decl(t1.ts, 16, 10)) + } +} +type T = number; +>T : Symbol(T, Decl(t1.ts, 19, 1)) + +import a = M.x; +>a : Symbol(a, Decl(t1.ts, 20, 16)) +>M : Symbol(M, Decl(t1.ts, 12, 1)) +>x : Symbol(a, Decl(t1.ts, 14, 14)) + +export { v, f, C, I, E, D, M, N, T, a }; +>v : Symbol(v, Decl(t1.ts, 23, 8)) +>f : Symbol(f, Decl(t1.ts, 23, 11)) +>C : Symbol(C, Decl(t1.ts, 23, 14)) +>I : Symbol(I, Decl(t1.ts, 23, 17)) +>E : Symbol(E, Decl(t1.ts, 23, 20)) +>D : Symbol(D, Decl(t1.ts, 23, 23)) +>M : Symbol(M, Decl(t1.ts, 23, 26)) +>N : Symbol(N, Decl(t1.ts, 23, 29)) +>T : Symbol(T, Decl(t1.ts, 23, 32)) +>a : Symbol(a, Decl(t1.ts, 23, 35)) + +=== tests/cases/conformance/es6/modules/t2.ts === +export { v, f, C, I, E, D, M, N, T, a } from "./t1"; +>v : Symbol(v, Decl(t2.ts, 0, 8)) +>f : Symbol(f, Decl(t2.ts, 0, 11)) +>C : Symbol(C, Decl(t2.ts, 0, 14)) +>I : Symbol(I, Decl(t2.ts, 0, 17)) +>E : Symbol(E, Decl(t2.ts, 0, 20)) +>D : Symbol(D, Decl(t2.ts, 0, 23)) +>M : Symbol(M, Decl(t2.ts, 0, 26)) +>N : Symbol(N, Decl(t2.ts, 0, 29)) +>T : Symbol(T, Decl(t2.ts, 0, 32)) +>a : Symbol(a, Decl(t2.ts, 0, 35)) + +=== tests/cases/conformance/es6/modules/t3.ts === +import { v, f, C, I, E, D, M, N, T, a } from "./t1"; +>v : Symbol(v, Decl(t3.ts, 0, 8)) +>f : Symbol(f, Decl(t3.ts, 0, 11)) +>C : Symbol(C, Decl(t3.ts, 0, 14)) +>I : Symbol(I, Decl(t3.ts, 0, 17)) +>E : Symbol(E, Decl(t3.ts, 0, 20)) +>D : Symbol(D, Decl(t3.ts, 0, 23)) +>M : Symbol(M, Decl(t3.ts, 0, 26)) +>N : Symbol(N, Decl(t3.ts, 0, 29)) +>T : Symbol(T, Decl(t3.ts, 0, 32)) +>a : Symbol(a, Decl(t3.ts, 0, 35)) + +export { v, f, C, I, E, D, M, N, T, a }; +>v : Symbol(v, Decl(t3.ts, 1, 8)) +>f : Symbol(f, Decl(t3.ts, 1, 11)) +>C : Symbol(C, Decl(t3.ts, 1, 14)) +>I : Symbol(I, Decl(t3.ts, 1, 17)) +>E : Symbol(E, Decl(t3.ts, 1, 20)) +>D : Symbol(D, Decl(t3.ts, 1, 23)) +>M : Symbol(M, Decl(t3.ts, 1, 26)) +>N : Symbol(N, Decl(t3.ts, 1, 29)) +>T : Symbol(T, Decl(t3.ts, 1, 32)) +>a : Symbol(a, Decl(t3.ts, 1, 35)) + diff --git a/tests/baselines/reference/exportsAndImports1-es6.types b/tests/baselines/reference/exportsAndImports1-es6.types new file mode 100644 index 00000000000..4ba83121541 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports1-es6.types @@ -0,0 +1,102 @@ +=== tests/cases/conformance/es6/modules/t1.ts === + +var v = 1; +>v : number +>1 : number + +function f() { } +>f : () => void + +class C { +>C : C +} +interface I { +>I : I +} +enum E { +>E : E + + A, B, C +>A : E +>B : E +>C : E +} +const enum D { +>D : D + + A, B, C +>A : D +>B : D +>C : D +} +module M { +>M : typeof M + + export var x; +>x : any +} +module N { +>N : any + + export interface I { +>I : I + } +} +type T = number; +>T : number + +import a = M.x; +>a : any +>M : typeof M +>x : any + +export { v, f, C, I, E, D, M, N, T, a }; +>v : number +>f : () => void +>C : typeof C +>I : any +>E : typeof E +>D : typeof D +>M : typeof M +>N : any +>T : any +>a : any + +=== tests/cases/conformance/es6/modules/t2.ts === +export { v, f, C, I, E, D, M, N, T, a } from "./t1"; +>v : number +>f : () => void +>C : typeof C +>I : any +>E : typeof E +>D : typeof D +>M : typeof M +>N : any +>T : any +>a : any + +=== tests/cases/conformance/es6/modules/t3.ts === +import { v, f, C, I, E, D, M, N, T, a } from "./t1"; +>v : number +>f : () => void +>C : typeof C +>I : any +>E : typeof E +>D : typeof D +>M : typeof M +>N : any +>T : any +>a : any + +export { v, f, C, I, E, D, M, N, T, a }; +>v : number +>f : () => void +>C : typeof C +>I : any +>E : typeof E +>D : typeof D +>M : typeof M +>N : any +>T : any +>a : any + diff --git a/tests/baselines/reference/exportsAndImports2-es6.js b/tests/baselines/reference/exportsAndImports2-es6.js new file mode 100644 index 00000000000..aa58c0d8902 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports2-es6.js @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/es6/modules/exportsAndImports2-es6.ts] //// + +//// [t1.ts] + +export var x = "x"; +export var y = "y"; + +//// [t2.ts] +export { x as y, y as x } from "./t1"; + +//// [t3.ts] +import { x, y } from "./t1"; +export { x as y, y as x }; + + +//// [t1.js] +exports.x = "x"; +exports.y = "y"; +//// [t2.js] +var t1_1 = require("./t1"); +exports.y = t1_1.x; +exports.x = t1_1.y; +//// [t3.js] +var t1_1 = require("./t1"); +exports.y = t1_1.x; +exports.x = t1_1.y; diff --git a/tests/baselines/reference/exportsAndImports2-es6.symbols b/tests/baselines/reference/exportsAndImports2-es6.symbols new file mode 100644 index 00000000000..8b53794abae --- /dev/null +++ b/tests/baselines/reference/exportsAndImports2-es6.symbols @@ -0,0 +1,26 @@ +=== tests/cases/conformance/es6/modules/t1.ts === + +export var x = "x"; +>x : Symbol(x, Decl(t1.ts, 1, 10)) + +export var y = "y"; +>y : Symbol(y, Decl(t1.ts, 2, 10)) + +=== tests/cases/conformance/es6/modules/t2.ts === +export { x as y, y as x } from "./t1"; +>x : Symbol(y, Decl(t2.ts, 0, 8)) +>y : Symbol(y, Decl(t2.ts, 0, 8)) +>y : Symbol(x, Decl(t2.ts, 0, 16)) +>x : Symbol(x, Decl(t2.ts, 0, 16)) + +=== tests/cases/conformance/es6/modules/t3.ts === +import { x, y } from "./t1"; +>x : Symbol(x, Decl(t3.ts, 0, 8)) +>y : Symbol(y, Decl(t3.ts, 0, 11)) + +export { x as y, y as x }; +>x : Symbol(y, Decl(t3.ts, 1, 8)) +>y : Symbol(y, Decl(t3.ts, 1, 8)) +>y : Symbol(x, Decl(t3.ts, 1, 16)) +>x : Symbol(x, Decl(t3.ts, 1, 16)) + diff --git a/tests/baselines/reference/exportsAndImports2-es6.types b/tests/baselines/reference/exportsAndImports2-es6.types new file mode 100644 index 00000000000..32de763c567 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports2-es6.types @@ -0,0 +1,28 @@ +=== tests/cases/conformance/es6/modules/t1.ts === + +export var x = "x"; +>x : string +>"x" : string + +export var y = "y"; +>y : string +>"y" : string + +=== tests/cases/conformance/es6/modules/t2.ts === +export { x as y, y as x } from "./t1"; +>x : string +>y : string +>y : string +>x : string + +=== tests/cases/conformance/es6/modules/t3.ts === +import { x, y } from "./t1"; +>x : string +>y : string + +export { x as y, y as x }; +>x : string +>y : string +>y : string +>x : string + diff --git a/tests/baselines/reference/exportsAndImports3-es6.js b/tests/baselines/reference/exportsAndImports3-es6.js new file mode 100644 index 00000000000..d8e142de41d --- /dev/null +++ b/tests/baselines/reference/exportsAndImports3-es6.js @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/es6/modules/exportsAndImports3-es6.ts] //// + +//// [t1.ts] + +export var v = 1; +export function f() { } +export class C { +} +export interface I { +} +export enum E { + A, B, C +} +export const enum D { + A, B, C +} +export module M { + export var x; +} +export module N { + export interface I { + } +} +export type T = number; +export import a = M.x; + +export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; + +//// [t2.ts] +export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; + +//// [t3.ts] +import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; +export { v, f, C, I, E, D, M, N, T, a }; + + +//// [t1.js] +exports.v = 1; +exports.v1 = exports.v; +function f() { } +exports.f = f; +exports.f1 = f; +class C { +} +exports.C = C; +exports.C1 = C; +(function (E) { + E[E["A"] = 0] = "A"; + E[E["B"] = 1] = "B"; + E[E["C"] = 2] = "C"; +})(exports.E || (exports.E = {})); +var E = exports.E; +exports.E1 = E; +var M; +(function (M) { +})(M = exports.M || (exports.M = {})); +exports.M1 = M; +exports.a = M.x; +exports.a1 = exports.a; +//// [t2.js] +var t1_1 = require("./t1"); +exports.v = t1_1.v1; +exports.f = t1_1.f1; +exports.C = t1_1.C1; +exports.E = t1_1.E1; +exports.M = t1_1.M1; +exports.a = t1_1.a1; +//// [t3.js] +var t1_1 = require("./t1"); +exports.v = t1_1.v1; +exports.f = t1_1.f1; +exports.C = t1_1.C1; +exports.E = t1_1.E1; +exports.M = t1_1.M1; +exports.a = t1_1.a1; diff --git a/tests/baselines/reference/exportsAndImports3-es6.symbols b/tests/baselines/reference/exportsAndImports3-es6.symbols new file mode 100644 index 00000000000..a46d7df2a68 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports3-es6.symbols @@ -0,0 +1,131 @@ +=== tests/cases/conformance/es6/modules/t1.ts === + +export var v = 1; +>v : Symbol(v, Decl(t1.ts, 1, 10)) + +export function f() { } +>f : Symbol(f, Decl(t1.ts, 1, 17)) + +export class C { +>C : Symbol(C, Decl(t1.ts, 2, 23)) +} +export interface I { +>I : Symbol(I, Decl(t1.ts, 4, 1)) +} +export enum E { +>E : Symbol(E, Decl(t1.ts, 6, 1)) + + A, B, C +>A : Symbol(E.A, Decl(t1.ts, 7, 15)) +>B : Symbol(E.B, Decl(t1.ts, 8, 6)) +>C : Symbol(E.C, Decl(t1.ts, 8, 9)) +} +export const enum D { +>D : Symbol(D, Decl(t1.ts, 9, 1)) + + A, B, C +>A : Symbol(D.A, Decl(t1.ts, 10, 21)) +>B : Symbol(D.B, Decl(t1.ts, 11, 6)) +>C : Symbol(D.C, Decl(t1.ts, 11, 9)) +} +export module M { +>M : Symbol(M, Decl(t1.ts, 12, 1)) + + export var x; +>x : Symbol(x, Decl(t1.ts, 14, 14)) +} +export module N { +>N : Symbol(N, Decl(t1.ts, 15, 1)) + + export interface I { +>I : Symbol(I, Decl(t1.ts, 16, 17)) + } +} +export type T = number; +>T : Symbol(T, Decl(t1.ts, 19, 1)) + +export import a = M.x; +>a : Symbol(a, Decl(t1.ts, 20, 23)) +>M : Symbol(M, Decl(t1.ts, 12, 1)) +>x : Symbol(a, Decl(t1.ts, 14, 14)) + +export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; +>v : Symbol(v1, Decl(t1.ts, 23, 8)) +>v1 : Symbol(v1, Decl(t1.ts, 23, 8)) +>f : Symbol(f1, Decl(t1.ts, 23, 17)) +>f1 : Symbol(f1, Decl(t1.ts, 23, 17)) +>C : Symbol(C1, Decl(t1.ts, 23, 26)) +>C1 : Symbol(C1, Decl(t1.ts, 23, 26)) +>I : Symbol(I1, Decl(t1.ts, 23, 35)) +>I1 : Symbol(I1, Decl(t1.ts, 23, 35)) +>E : Symbol(E1, Decl(t1.ts, 23, 44)) +>E1 : Symbol(E1, Decl(t1.ts, 23, 44)) +>D : Symbol(D1, Decl(t1.ts, 23, 53)) +>D1 : Symbol(D1, Decl(t1.ts, 23, 53)) +>M : Symbol(M1, Decl(t1.ts, 23, 62)) +>M1 : Symbol(M1, Decl(t1.ts, 23, 62)) +>N : Symbol(N1, Decl(t1.ts, 23, 71)) +>N1 : Symbol(N1, Decl(t1.ts, 23, 71)) +>T : Symbol(T1, Decl(t1.ts, 23, 80)) +>T1 : Symbol(T1, Decl(t1.ts, 23, 80)) +>a : Symbol(a1, Decl(t1.ts, 23, 89)) +>a1 : Symbol(a1, Decl(t1.ts, 23, 89)) + +=== tests/cases/conformance/es6/modules/t2.ts === +export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; +>v1 : Symbol(v, Decl(t2.ts, 0, 8)) +>v : Symbol(v, Decl(t2.ts, 0, 8)) +>f1 : Symbol(f, Decl(t2.ts, 0, 17)) +>f : Symbol(f, Decl(t2.ts, 0, 17)) +>C1 : Symbol(C, Decl(t2.ts, 0, 26)) +>C : Symbol(C, Decl(t2.ts, 0, 26)) +>I1 : Symbol(I, Decl(t2.ts, 0, 35)) +>I : Symbol(I, Decl(t2.ts, 0, 35)) +>E1 : Symbol(E, Decl(t2.ts, 0, 44)) +>E : Symbol(E, Decl(t2.ts, 0, 44)) +>D1 : Symbol(D, Decl(t2.ts, 0, 53)) +>D : Symbol(D, Decl(t2.ts, 0, 53)) +>M1 : Symbol(M, Decl(t2.ts, 0, 62)) +>M : Symbol(M, Decl(t2.ts, 0, 62)) +>N1 : Symbol(N, Decl(t2.ts, 0, 71)) +>N : Symbol(N, Decl(t2.ts, 0, 71)) +>T1 : Symbol(T, Decl(t2.ts, 0, 80)) +>T : Symbol(T, Decl(t2.ts, 0, 80)) +>a1 : Symbol(a, Decl(t2.ts, 0, 89)) +>a : Symbol(a, Decl(t2.ts, 0, 89)) + +=== tests/cases/conformance/es6/modules/t3.ts === +import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; +>v1 : Symbol(v, Decl(t3.ts, 0, 8)) +>v : Symbol(v, Decl(t3.ts, 0, 8)) +>f1 : Symbol(f, Decl(t3.ts, 0, 17)) +>f : Symbol(f, Decl(t3.ts, 0, 17)) +>C1 : Symbol(C, Decl(t3.ts, 0, 26)) +>C : Symbol(C, Decl(t3.ts, 0, 26)) +>I1 : Symbol(I, Decl(t3.ts, 0, 35)) +>I : Symbol(I, Decl(t3.ts, 0, 35)) +>E1 : Symbol(E, Decl(t3.ts, 0, 44)) +>E : Symbol(E, Decl(t3.ts, 0, 44)) +>D1 : Symbol(D, Decl(t3.ts, 0, 53)) +>D : Symbol(D, Decl(t3.ts, 0, 53)) +>M1 : Symbol(M, Decl(t3.ts, 0, 62)) +>M : Symbol(M, Decl(t3.ts, 0, 62)) +>N1 : Symbol(N, Decl(t3.ts, 0, 71)) +>N : Symbol(N, Decl(t3.ts, 0, 71)) +>T1 : Symbol(T, Decl(t3.ts, 0, 80)) +>T : Symbol(T, Decl(t3.ts, 0, 80)) +>a1 : Symbol(a, Decl(t3.ts, 0, 89)) +>a : Symbol(a, Decl(t3.ts, 0, 89)) + +export { v, f, C, I, E, D, M, N, T, a }; +>v : Symbol(v, Decl(t3.ts, 1, 8)) +>f : Symbol(f, Decl(t3.ts, 1, 11)) +>C : Symbol(C, Decl(t3.ts, 1, 14)) +>I : Symbol(I, Decl(t3.ts, 1, 17)) +>E : Symbol(E, Decl(t3.ts, 1, 20)) +>D : Symbol(D, Decl(t3.ts, 1, 23)) +>M : Symbol(M, Decl(t3.ts, 1, 26)) +>N : Symbol(N, Decl(t3.ts, 1, 29)) +>T : Symbol(T, Decl(t3.ts, 1, 32)) +>a : Symbol(a, Decl(t3.ts, 1, 35)) + diff --git a/tests/baselines/reference/exportsAndImports3-es6.types b/tests/baselines/reference/exportsAndImports3-es6.types new file mode 100644 index 00000000000..0b8235d969c --- /dev/null +++ b/tests/baselines/reference/exportsAndImports3-es6.types @@ -0,0 +1,132 @@ +=== tests/cases/conformance/es6/modules/t1.ts === + +export var v = 1; +>v : number +>1 : number + +export function f() { } +>f : () => void + +export class C { +>C : C +} +export interface I { +>I : I +} +export enum E { +>E : E + + A, B, C +>A : E +>B : E +>C : E +} +export const enum D { +>D : D + + A, B, C +>A : D +>B : D +>C : D +} +export module M { +>M : typeof M + + export var x; +>x : any +} +export module N { +>N : any + + export interface I { +>I : I + } +} +export type T = number; +>T : number + +export import a = M.x; +>a : any +>M : typeof M +>x : any + +export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; +>v : number +>v1 : number +>f : () => void +>f1 : () => void +>C : typeof C +>C1 : typeof C +>I : any +>I1 : any +>E : typeof E +>E1 : typeof E +>D : typeof D +>D1 : typeof D +>M : typeof M +>M1 : typeof M +>N : any +>N1 : any +>T : any +>T1 : any +>a : any +>a1 : any + +=== tests/cases/conformance/es6/modules/t2.ts === +export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; +>v1 : number +>v : number +>f1 : () => void +>f : () => void +>C1 : typeof C +>C : typeof C +>I1 : any +>I : any +>E1 : typeof E +>E : typeof E +>D1 : typeof D +>D : typeof D +>M1 : typeof M +>M : typeof M +>N1 : any +>N : any +>T1 : any +>T : any +>a1 : any +>a : any + +=== tests/cases/conformance/es6/modules/t3.ts === +import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; +>v1 : number +>v : number +>f1 : () => void +>f : () => void +>C1 : typeof C +>C : typeof C +>I1 : any +>I : any +>E1 : typeof E +>E : typeof E +>D1 : typeof D +>D : typeof D +>M1 : typeof M +>M : typeof M +>N1 : any +>N : any +>T1 : any +>T : any +>a1 : any +>a : any + +export { v, f, C, I, E, D, M, N, T, a }; +>v : number +>f : () => void +>C : typeof C +>I : any +>E : typeof E +>D : typeof D +>M : typeof M +>N : any +>T : any +>a : any + diff --git a/tests/baselines/reference/exportsAndImports4-es6.js b/tests/baselines/reference/exportsAndImports4-es6.js new file mode 100644 index 00000000000..7cae0c01489 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports4-es6.js @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/es6/modules/exportsAndImports4-es6.ts] //// + +//// [t1.ts] + +export default "hello"; + +//// [t2.ts] +import a = require("./t1"); +a.default; +import b from "./t1"; +b; +import * as c from "./t1"; +c.default; +import { default as d } from "./t1"; +d; +import e1, * as e2 from "./t1"; +e1; +e2.default; +import f1, { default as f2 } from "./t1"; +f1; +f2; +import "./t1"; + +//// [t3.ts] +import a = require("./t1"); +a.default; +import b from "./t1"; +b; +import * as c from "./t1"; +c.default; +import { default as d } from "./t1"; +d; +import e1, * as e2 from "./t1"; +e1; +e2.default; +import f1, { default as f2 } from "./t1"; +f1; +f2; +export { a, b, c, d, e1, e2, f1, f2 }; + + +//// [t1.js] +exports.default = "hello"; +//// [t3.js] +var a = require("./t1"); +exports.a = a; +a.default; +var t1_1 = require("./t1"); +exports.b = t1_1.default; +t1_1.default; +var c = require("./t1"); +exports.c = c; +c.default; +var t1_2 = require("./t1"); +exports.d = t1_2.default; +t1_2.default; +var t1_3 = require("./t1"), e2 = t1_3; +exports.e1 = t1_3.default; +exports.e2 = e2; +t1_3.default; +e2.default; +var t1_4 = require("./t1"); +exports.f1 = t1_4.default; +exports.f2 = t1_4.default; +t1_4.default; +t1_4.default; diff --git a/tests/baselines/reference/exportsAndImports4-es6.symbols b/tests/baselines/reference/exportsAndImports4-es6.symbols new file mode 100644 index 00000000000..0204d9bd586 --- /dev/null +++ b/tests/baselines/reference/exportsAndImports4-es6.symbols @@ -0,0 +1,68 @@ +=== tests/cases/conformance/es6/modules/t3.ts === +import a = require("./t1"); +>a : Symbol(a, Decl(t3.ts, 0, 0)) + +a.default; +>a.default : Symbol(a.default, Decl(t1.ts, 0, 0)) +>a : Symbol(a, Decl(t3.ts, 0, 0)) +>default : Symbol(a.default, Decl(t1.ts, 0, 0)) + +import b from "./t1"; +>b : Symbol(b, Decl(t3.ts, 2, 6)) + +b; +>b : Symbol(b, Decl(t3.ts, 2, 6)) + +import * as c from "./t1"; +>c : Symbol(c, Decl(t3.ts, 4, 6)) + +c.default; +>c.default : Symbol(a.default, Decl(t1.ts, 0, 0)) +>c : Symbol(c, Decl(t3.ts, 4, 6)) +>default : Symbol(a.default, Decl(t1.ts, 0, 0)) + +import { default as d } from "./t1"; +>default : Symbol(d, Decl(t3.ts, 6, 8)) +>d : Symbol(d, Decl(t3.ts, 6, 8)) + +d; +>d : Symbol(d, Decl(t3.ts, 6, 8)) + +import e1, * as e2 from "./t1"; +>e1 : Symbol(e1, Decl(t3.ts, 8, 6)) +>e2 : Symbol(e2, Decl(t3.ts, 8, 10)) + +e1; +>e1 : Symbol(e1, Decl(t3.ts, 8, 6)) + +e2.default; +>e2.default : Symbol(a.default, Decl(t1.ts, 0, 0)) +>e2 : Symbol(e2, Decl(t3.ts, 8, 10)) +>default : Symbol(a.default, Decl(t1.ts, 0, 0)) + +import f1, { default as f2 } from "./t1"; +>f1 : Symbol(f1, Decl(t3.ts, 11, 6)) +>default : Symbol(f2, Decl(t3.ts, 11, 12)) +>f2 : Symbol(f2, Decl(t3.ts, 11, 12)) + +f1; +>f1 : Symbol(f1, Decl(t3.ts, 11, 6)) + +f2; +>f2 : Symbol(f2, Decl(t3.ts, 11, 12)) + +export { a, b, c, d, e1, e2, f1, f2 }; +>a : Symbol(a, Decl(t3.ts, 14, 8)) +>b : Symbol(b, Decl(t3.ts, 14, 11)) +>c : Symbol(c, Decl(t3.ts, 14, 14)) +>d : Symbol(d, Decl(t3.ts, 14, 17)) +>e1 : Symbol(e1, Decl(t3.ts, 14, 20)) +>e2 : Symbol(e2, Decl(t3.ts, 14, 24)) +>f1 : Symbol(f1, Decl(t3.ts, 14, 28)) +>f2 : Symbol(f2, Decl(t3.ts, 14, 32)) + +=== tests/cases/conformance/es6/modules/t1.ts === + +No type information for this code.export default "hello"; +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/exportsAndImports4-es6.types b/tests/baselines/reference/exportsAndImports4-es6.types new file mode 100644 index 00000000000..4bd6f8c0e1e --- /dev/null +++ b/tests/baselines/reference/exportsAndImports4-es6.types @@ -0,0 +1,68 @@ +=== tests/cases/conformance/es6/modules/t3.ts === +import a = require("./t1"); +>a : typeof a + +a.default; +>a.default : string +>a : typeof a +>default : string + +import b from "./t1"; +>b : string + +b; +>b : string + +import * as c from "./t1"; +>c : typeof a + +c.default; +>c.default : string +>c : typeof a +>default : string + +import { default as d } from "./t1"; +>default : string +>d : string + +d; +>d : string + +import e1, * as e2 from "./t1"; +>e1 : string +>e2 : typeof a + +e1; +>e1 : string + +e2.default; +>e2.default : string +>e2 : typeof a +>default : string + +import f1, { default as f2 } from "./t1"; +>f1 : string +>default : string +>f2 : string + +f1; +>f1 : string + +f2; +>f2 : string + +export { a, b, c, d, e1, e2, f1, f2 }; +>a : typeof a +>b : string +>c : typeof a +>d : string +>e1 : string +>e2 : typeof a +>f1 : string +>f2 : string + +=== tests/cases/conformance/es6/modules/t1.ts === + +No type information for this code.export default "hello"; +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts b/tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts new file mode 100644 index 00000000000..16d8f2addf4 --- /dev/null +++ b/tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts @@ -0,0 +1,34 @@ +// @target: es6 +// @module: commonjs + +// @filename: t1.ts +var v = 1; +function f() { } +class C { +} +interface I { +} +enum E { + A, B, C +} +const enum D { + A, B, C +} +module M { + export var x; +} +module N { + export interface I { + } +} +type T = number; +import a = M.x; + +export { v, f, C, I, E, D, M, N, T, a }; + +// @filename: t2.ts +export { v, f, C, I, E, D, M, N, T, a } from "./t1"; + +// @filename: t3.ts +import { v, f, C, I, E, D, M, N, T, a } from "./t1"; +export { v, f, C, I, E, D, M, N, T, a }; diff --git a/tests/cases/conformance/es6/modules/exportsAndImports2-es6.ts b/tests/cases/conformance/es6/modules/exportsAndImports2-es6.ts new file mode 100644 index 00000000000..5108b98f749 --- /dev/null +++ b/tests/cases/conformance/es6/modules/exportsAndImports2-es6.ts @@ -0,0 +1,13 @@ +// @target: es6 +// @module: commonjs + +// @filename: t1.ts +export var x = "x"; +export var y = "y"; + +// @filename: t2.ts +export { x as y, y as x } from "./t1"; + +// @filename: t3.ts +import { x, y } from "./t1"; +export { x as y, y as x }; diff --git a/tests/cases/conformance/es6/modules/exportsAndImports3-es6.ts b/tests/cases/conformance/es6/modules/exportsAndImports3-es6.ts new file mode 100644 index 00000000000..77cb5b9df9b --- /dev/null +++ b/tests/cases/conformance/es6/modules/exportsAndImports3-es6.ts @@ -0,0 +1,34 @@ +// @target: es6 +// @module: commonjs + +// @filename: t1.ts +export var v = 1; +export function f() { } +export class C { +} +export interface I { +} +export enum E { + A, B, C +} +export const enum D { + A, B, C +} +export module M { + export var x; +} +export module N { + export interface I { + } +} +export type T = number; +export import a = M.x; + +export { v as v1, f as f1, C as C1, I as I1, E as E1, D as D1, M as M1, N as N1, T as T1, a as a1 }; + +// @filename: t2.ts +export { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; + +// @filename: t3.ts +import { v1 as v, f1 as f, C1 as C, I1 as I, E1 as E, D1 as D, M1 as M, N1 as N, T1 as T, a1 as a } from "./t1"; +export { v, f, C, I, E, D, M, N, T, a }; diff --git a/tests/cases/conformance/es6/modules/exportsAndImports4-es6.ts b/tests/cases/conformance/es6/modules/exportsAndImports4-es6.ts new file mode 100644 index 00000000000..42994486498 --- /dev/null +++ b/tests/cases/conformance/es6/modules/exportsAndImports4-es6.ts @@ -0,0 +1,39 @@ +// @target: es6 +// @module: commonjs + +// @filename: t1.ts +export default "hello"; + +// @filename: t2.ts +import a = require("./t1"); +a.default; +import b from "./t1"; +b; +import * as c from "./t1"; +c.default; +import { default as d } from "./t1"; +d; +import e1, * as e2 from "./t1"; +e1; +e2.default; +import f1, { default as f2 } from "./t1"; +f1; +f2; +import "./t1"; + +// @filename: t3.ts +import a = require("./t1"); +a.default; +import b from "./t1"; +b; +import * as c from "./t1"; +c.default; +import { default as d } from "./t1"; +d; +import e1, * as e2 from "./t1"; +e1; +e2.default; +import f1, { default as f2 } from "./t1"; +f1; +f2; +export { a, b, c, d, e1, e2, f1, f2 }; From 9eed58db47724e34fa9ef164522bf616f8227039 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Thu, 8 Oct 2015 11:23:52 -0700 Subject: [PATCH 081/121] Fix i4684 --- src/lib/dom.generated.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 1d2ad26db36..dbf9dc23532 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -7893,6 +7893,11 @@ declare var Node: { } interface NodeFilter { + acceptNode(n: Node): number; +} + +declare var NodeFilter: { + prototype: NodeFilter; FILTER_ACCEPT: number; FILTER_REJECT: number; FILTER_SKIP: number; @@ -7910,7 +7915,6 @@ interface NodeFilter { SHOW_PROCESSING_INSTRUCTION: number; SHOW_TEXT: number; } -declare var NodeFilter: NodeFilter; interface NodeIterator { expandEntityReferences: boolean; From d229ae4be50b6acddb2d52a4deeb220bca1b975e Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 8 Oct 2015 11:28:18 -0700 Subject: [PATCH 082/121] Escape quotes when emitting React --- src/compiler/emitter.ts | 4 ++-- tests/baselines/reference/tsxReactEmit6.js | 6 ++++++ tests/baselines/reference/tsxReactEmit6.symbols | 7 +++++++ tests/baselines/reference/tsxReactEmit6.types | 8 ++++++++ tests/cases/conformance/jsx/tsxReactEmit6.tsx | 4 ++++ 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 312ea42eefb..7440c905566 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -6848,7 +6848,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (isLineBreak(c)) { if (firstNonWhitespace !== -1 && (lastNonWhitespace - firstNonWhitespace + 1 > 0)) { let part = text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1); - result = (result ? result + "\" + ' ' + \"" : "") + part; + result = (result ? result + "\" + ' ' + \"" : "") + escapeString(part); } firstNonWhitespace = -1; } @@ -6862,7 +6862,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi if (firstNonWhitespace !== -1) { let part = text.substr(firstNonWhitespace); - result = (result ? result + "\" + ' ' + \"" : "") + part; + result = (result ? result + "\" + ' ' + \"" : "") + escapeString(part); } if (result) { diff --git a/tests/baselines/reference/tsxReactEmit6.js b/tests/baselines/reference/tsxReactEmit6.js index d20ef7051e0..4f583929004 100644 --- a/tests/baselines/reference/tsxReactEmit6.js +++ b/tests/baselines/reference/tsxReactEmit6.js @@ -19,7 +19,11 @@ namespace M { // and M.React.__spread var foo; var spread1 =
; + + // Quotes + var x =
This "quote" thing
; } + //// [file.js] @@ -33,4 +37,6 @@ var M; // and M.React.__spread var foo; var spread1 = M.React.createElement("div", M.React.__spread({x: ''}, foo, {y: ''})); + // Quotes + var x = M.React.createElement("div", null, "This \"quote\" thing"); })(M || (M = {})); diff --git a/tests/baselines/reference/tsxReactEmit6.symbols b/tests/baselines/reference/tsxReactEmit6.symbols index fd717ee4a5b..8eb0561e185 100644 --- a/tests/baselines/reference/tsxReactEmit6.symbols +++ b/tests/baselines/reference/tsxReactEmit6.symbols @@ -36,5 +36,12 @@ namespace M { >x : Symbol(unknown) >foo : Symbol(foo, Decl(react-consumer.tsx, 7, 4)) >y : Symbol(unknown) + + // Quotes + var x =
This "quote" thing
; +>x : Symbol(x, Decl(react-consumer.tsx, 11, 4)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 2, 22)) +>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 2, 22)) } + diff --git a/tests/baselines/reference/tsxReactEmit6.types b/tests/baselines/reference/tsxReactEmit6.types index 1b16b84fcc7..b8a307eb9d7 100644 --- a/tests/baselines/reference/tsxReactEmit6.types +++ b/tests/baselines/reference/tsxReactEmit6.types @@ -37,5 +37,13 @@ namespace M { >x : any >foo : any >y : any + + // Quotes + var x =
This "quote" thing
; +>x : JSX.Element +>
This "quote" thing
: JSX.Element +>div : any +>div : any } + diff --git a/tests/cases/conformance/jsx/tsxReactEmit6.tsx b/tests/cases/conformance/jsx/tsxReactEmit6.tsx index 2782f90e503..0e8c772a3f1 100644 --- a/tests/cases/conformance/jsx/tsxReactEmit6.tsx +++ b/tests/cases/conformance/jsx/tsxReactEmit6.tsx @@ -19,4 +19,8 @@ namespace M { // and M.React.__spread var foo; var spread1 =
; + + // Quotes + var x =
This "quote" thing
; } + From 88bffac07ff5288531c139f221576fc4235e4923 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 8 Oct 2015 14:26:43 -0700 Subject: [PATCH 083/121] Don't issue completion in JSX text Fixes #5096 --- src/services/services.ts | 15 ++++++++++++++- tests/cases/fourslash/tsxCompletion9.ts | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/tsxCompletion9.ts diff --git a/src/services/services.ts b/src/services/services.ts index 9a6afb5f1e0..3eb5ec319ad 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3311,11 +3311,24 @@ namespace ts { let start = new Date().getTime(); let result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken) || isSolelyIdentifierDefinitionLocation(contextToken) || - isDotOfNumericLiteral(contextToken); + isDotOfNumericLiteral(contextToken) || + isInJsxText(contextToken); log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start)); return result; } + function isInJsxText(contextToken: Node): boolean { + if (contextToken.kind === SyntaxKind.JsxText) { + return true; + } + + return contextToken.kind === SyntaxKind.GreaterThanToken && + contextToken.parent && + (contextToken.parent.kind === SyntaxKind.JsxOpeningElement || + contextToken.parent.kind === SyntaxKind.JsxSelfClosingElement || + contextToken.parent.kind === SyntaxKind.JsxClosingElement); + } + function isNewIdentifierDefinitionLocation(previousToken: Node): boolean { if (previousToken) { let containingNodeKind = previousToken.parent.kind; diff --git a/tests/cases/fourslash/tsxCompletion9.ts b/tests/cases/fourslash/tsxCompletion9.ts new file mode 100644 index 00000000000..dbb6c46293b --- /dev/null +++ b/tests/cases/fourslash/tsxCompletion9.ts @@ -0,0 +1,18 @@ +/// + +//@Filename: file.tsx +//// declare module JSX { +//// interface Element { } +//// interface IntrinsicElements { +//// div: { ONE: string; TWO: number; } +//// } +//// } +//// var x1 =
/*1*/ hello /*2*/ world /*3*/
; +//// var x2 =
/*4*/
/*5*/ world /*6*/
; +//// var x3 =
/*7*/
/*8*/world/*9*/
; +//// var x4 =
/*10*/
; + +for (var i = 1; i <= 10; i++) { + goTo.marker(i + ''); + verify.completionListIsEmpty(); +} From afa08181e2a2da66cac85fdeeb71357c55842c88 Mon Sep 17 00:00:00 2001 From: jbondc Date: Thu, 8 Oct 2015 17:30:46 -0400 Subject: [PATCH 084/121] Address code review. Accept baselines. --- .../baselines/reference/constIndexedAccess.js | 66 +++++++------------ .../reference/constIndexedAccess.symbols | 61 ++++++++++------- .../reference/constIndexedAccess.types | 59 +++++++++++------ tests/cases/compiler/constIndexedAccess.ts | 35 ++++------ 4 files changed, 112 insertions(+), 109 deletions(-) diff --git a/tests/baselines/reference/constIndexedAccess.js b/tests/baselines/reference/constIndexedAccess.js index ee0e9b8cc36..db80441bd33 100644 --- a/tests/baselines/reference/constIndexedAccess.js +++ b/tests/baselines/reference/constIndexedAccess.js @@ -1,13 +1,13 @@ //// [constIndexedAccess.ts] const enum numbers { - zero, - one + zero, + one } interface indexAccess { - 0: string; - 1: number; + 0: string; + 1: number; } let test: indexAccess; @@ -18,27 +18,17 @@ let n = test[1]; let s1 = test[numbers.zero]; let n1 = test[numbers.one]; -/* -TODO: revisit with const propagation +let s2 = test[numbers["zero"]]; +let n2 = test[numbers["one"]]; -const zero = 0; -const one = 1; +enum numbersNotConst { + zero, + one +} -let s2 = test[zero]; -let n2 = test[one]; - -const zeroRef = zero; -const oneRef = one; - -let s3 = test[zeroRef]; -let n3 = test[oneRef]; - -const zeroRefEnum = numbers.zero; -const oneRefEnum = numbers.one; - -let s4 = test[zeroRefEnum]; -let n4 = test[oneRefEnum]; -*/ +let s3 = test[numbersNotConst.zero]; +let n3 = test[numbersNotConst.one]; + //// [constIndexedAccess.js] var test; @@ -46,24 +36,12 @@ var s = test[0]; var n = test[1]; var s1 = test[0 /* zero */]; var n1 = test[1 /* one */]; -/* -TODO: revisit with const propagation - -const zero = 0; -const one = 1; - -let s2 = test[zero]; -let n2 = test[one]; - -const zeroRef = zero; -const oneRef = one; - -let s3 = test[zeroRef]; -let n3 = test[oneRef]; - -const zeroRefEnum = numbers.zero; -const oneRefEnum = numbers.one; - -let s4 = test[zeroRefEnum]; -let n4 = test[oneRefEnum]; -*/ +var s2 = test[0 /* "zero" */]; +var n2 = test[1 /* "one" */]; +var numbersNotConst; +(function (numbersNotConst) { + numbersNotConst[numbersNotConst["zero"] = 0] = "zero"; + numbersNotConst[numbersNotConst["one"] = 1] = "one"; +})(numbersNotConst || (numbersNotConst = {})); +var s3 = test[numbersNotConst.zero]; +var n3 = test[numbersNotConst.one]; diff --git a/tests/baselines/reference/constIndexedAccess.symbols b/tests/baselines/reference/constIndexedAccess.symbols index ff18f84372e..2ccb7f11686 100644 --- a/tests/baselines/reference/constIndexedAccess.symbols +++ b/tests/baselines/reference/constIndexedAccess.symbols @@ -3,18 +3,18 @@ const enum numbers { >numbers : Symbol(numbers, Decl(constIndexedAccess.ts, 0, 0)) - zero, + zero, >zero : Symbol(numbers.zero, Decl(constIndexedAccess.ts, 1, 20)) - one ->one : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 6)) + one +>one : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 9)) } interface indexAccess { >indexAccess : Symbol(indexAccess, Decl(constIndexedAccess.ts, 4, 1)) - 0: string; - 1: number; + 0: string; + 1: number; } let test: indexAccess; @@ -29,7 +29,7 @@ let s = test[0]; let n = test[1]; >n : Symbol(n, Decl(constIndexedAccess.ts, 14, 3)) >test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) ->1 : Symbol(indexAccess.1, Decl(constIndexedAccess.ts, 7, 11)) +>1 : Symbol(indexAccess.1, Decl(constIndexedAccess.ts, 7, 14)) let s1 = test[numbers.zero]; >s1 : Symbol(s1, Decl(constIndexedAccess.ts, 16, 3)) @@ -41,28 +41,43 @@ let s1 = test[numbers.zero]; let n1 = test[numbers.one]; >n1 : Symbol(n1, Decl(constIndexedAccess.ts, 17, 3)) >test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) ->numbers.one : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 6)) +>numbers.one : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 9)) >numbers : Symbol(numbers, Decl(constIndexedAccess.ts, 0, 0)) ->one : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 6)) +>one : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 9)) -/* -TODO: revisit with const propagation +let s2 = test[numbers["zero"]]; +>s2 : Symbol(s2, Decl(constIndexedAccess.ts, 19, 3)) +>test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) +>numbers : Symbol(numbers, Decl(constIndexedAccess.ts, 0, 0)) +>"zero" : Symbol(numbers.zero, Decl(constIndexedAccess.ts, 1, 20)) -const zero = 0; -const one = 1; +let n2 = test[numbers["one"]]; +>n2 : Symbol(n2, Decl(constIndexedAccess.ts, 20, 3)) +>test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) +>numbers : Symbol(numbers, Decl(constIndexedAccess.ts, 0, 0)) +>"one" : Symbol(numbers.one, Decl(constIndexedAccess.ts, 2, 9)) -let s2 = test[zero]; -let n2 = test[one]; +enum numbersNotConst { +>numbersNotConst : Symbol(numbersNotConst, Decl(constIndexedAccess.ts, 20, 30)) -const zeroRef = zero; -const oneRef = one; + zero, +>zero : Symbol(numbersNotConst.zero, Decl(constIndexedAccess.ts, 22, 22)) -let s3 = test[zeroRef]; -let n3 = test[oneRef]; + one +>one : Symbol(numbersNotConst.one, Decl(constIndexedAccess.ts, 23, 9)) +} -const zeroRefEnum = numbers.zero; -const oneRefEnum = numbers.one; +let s3 = test[numbersNotConst.zero]; +>s3 : Symbol(s3, Decl(constIndexedAccess.ts, 27, 3)) +>test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) +>numbersNotConst.zero : Symbol(numbersNotConst.zero, Decl(constIndexedAccess.ts, 22, 22)) +>numbersNotConst : Symbol(numbersNotConst, Decl(constIndexedAccess.ts, 20, 30)) +>zero : Symbol(numbersNotConst.zero, Decl(constIndexedAccess.ts, 22, 22)) + +let n3 = test[numbersNotConst.one]; +>n3 : Symbol(n3, Decl(constIndexedAccess.ts, 28, 3)) +>test : Symbol(test, Decl(constIndexedAccess.ts, 11, 3)) +>numbersNotConst.one : Symbol(numbersNotConst.one, Decl(constIndexedAccess.ts, 23, 9)) +>numbersNotConst : Symbol(numbersNotConst, Decl(constIndexedAccess.ts, 20, 30)) +>one : Symbol(numbersNotConst.one, Decl(constIndexedAccess.ts, 23, 9)) -let s4 = test[zeroRefEnum]; -let n4 = test[oneRefEnum]; -*/ diff --git a/tests/baselines/reference/constIndexedAccess.types b/tests/baselines/reference/constIndexedAccess.types index b4cc0e930d5..eb02c7bde2e 100644 --- a/tests/baselines/reference/constIndexedAccess.types +++ b/tests/baselines/reference/constIndexedAccess.types @@ -3,18 +3,18 @@ const enum numbers { >numbers : numbers - zero, + zero, >zero : numbers - one + one >one : numbers } interface indexAccess { >indexAccess : indexAccess - 0: string; - 1: number; + 0: string; + 1: number; } let test: indexAccess; @@ -49,24 +49,45 @@ let n1 = test[numbers.one]; >numbers : typeof numbers >one : numbers -/* -TODO: revisit with const propagation +let s2 = test[numbers["zero"]]; +>s2 : string +>test[numbers["zero"]] : string +>test : indexAccess +>numbers["zero"] : numbers +>numbers : typeof numbers +>"zero" : string -const zero = 0; -const one = 1; +let n2 = test[numbers["one"]]; +>n2 : number +>test[numbers["one"]] : number +>test : indexAccess +>numbers["one"] : numbers +>numbers : typeof numbers +>"one" : string -let s2 = test[zero]; -let n2 = test[one]; +enum numbersNotConst { +>numbersNotConst : numbersNotConst -const zeroRef = zero; -const oneRef = one; + zero, +>zero : numbersNotConst -let s3 = test[zeroRef]; -let n3 = test[oneRef]; + one +>one : numbersNotConst +} -const zeroRefEnum = numbers.zero; -const oneRefEnum = numbers.one; +let s3 = test[numbersNotConst.zero]; +>s3 : any +>test[numbersNotConst.zero] : any +>test : indexAccess +>numbersNotConst.zero : numbersNotConst +>numbersNotConst : typeof numbersNotConst +>zero : numbersNotConst + +let n3 = test[numbersNotConst.one]; +>n3 : any +>test[numbersNotConst.one] : any +>test : indexAccess +>numbersNotConst.one : numbersNotConst +>numbersNotConst : typeof numbersNotConst +>one : numbersNotConst -let s4 = test[zeroRefEnum]; -let n4 = test[oneRefEnum]; -*/ diff --git a/tests/cases/compiler/constIndexedAccess.ts b/tests/cases/compiler/constIndexedAccess.ts index a1b1acc6872..d71a3cdb9f4 100644 --- a/tests/cases/compiler/constIndexedAccess.ts +++ b/tests/cases/compiler/constIndexedAccess.ts @@ -1,12 +1,12 @@  const enum numbers { - zero, - one + zero, + one } interface indexAccess { - 0: string; - 1: number; + 0: string; + 1: number; } let test: indexAccess; @@ -17,24 +17,13 @@ let n = test[1]; let s1 = test[numbers.zero]; let n1 = test[numbers.one]; -/* -TODO: revisit with const propagation +let s2 = test[numbers["zero"]]; +let n2 = test[numbers["one"]]; -const zero = 0; -const one = 1; +enum numbersNotConst { + zero, + one +} -let s2 = test[zero]; -let n2 = test[one]; - -const zeroRef = zero; -const oneRef = one; - -let s3 = test[zeroRef]; -let n3 = test[oneRef]; - -const zeroRefEnum = numbers.zero; -const oneRefEnum = numbers.one; - -let s4 = test[zeroRefEnum]; -let n4 = test[oneRefEnum]; -*/ \ No newline at end of file +let s3 = test[numbersNotConst.zero]; +let n3 = test[numbersNotConst.one]; From cd3f711a76e5f2cc23f300ea9db5a7f10dee67ac Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 8 Oct 2015 14:38:58 -0700 Subject: [PATCH 085/121] Address PR feedback --- .../diagnosticInformationMap.generated.ts | 4 +- src/compiler/diagnosticMessages.json | 4 +- src/compiler/emitter.ts | 26 +-- src/compiler/parser.ts | 4 +- ...nTemplateStringWithSyntaxError1.errors.txt | 120 +++++----- ...nTemplateStringWithSyntaxError2.errors.txt | 120 +++++----- ...nTemplateStringWithSyntaxError3.errors.txt | 120 +++++----- ...onentiationOperatorSyntaxError1.errors.txt | 124 +++++----- ...onentiationOperatorSyntaxError2.errors.txt | 212 +++++++++--------- 9 files changed, 367 insertions(+), 367 deletions(-) diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 54b31f2477a..7af1afb251a 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -618,7 +618,7 @@ namespace ts { JSX_attribute_expected: { code: 17003, category: DiagnosticCategory.Error, key: "JSX attribute expected." }, Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: DiagnosticCategory.Error, key: "Cannot use JSX unless the '--jsx' flag is provided." }, A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: DiagnosticCategory.Error, key: "A constructor cannot contain a 'super' call when its class extends 'null'" }, - An_unary_expression_with_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: DiagnosticCategory.Error, key: "An unary expression with '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, - Type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: DiagnosticCategory.Error, key: "Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, + An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: DiagnosticCategory.Error, key: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, + A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: DiagnosticCategory.Error, key: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, }; } \ No newline at end of file diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index e97de6ef68b..59a494629e4 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2467,11 +2467,11 @@ "category": "Error", "code": 17005 }, - "An unary expression with '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { + "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { "category": "Error", "code": 17006 }, - "Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { + "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { "category": "Error", "code": 17006 } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index ce52119dbe1..41b45524159 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -836,8 +836,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } let node = nodes[start + i]; - let leadcomment = getLeadingCommentsToEmit(node); - let trailcomment = getTrailingCommentRanges(currentSourceFile.text, node.pos); + let leadingComments = getLeadingCommentsToEmit(node); + let trailingComments = getTrailingCommentRanges(currentSourceFile.text, node.pos); // This emitting is to make sure we emit following comment properly // ...(x, /*comment1*/ y)... // ^ => node.pos @@ -2522,7 +2522,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // a[0] **= a[0] **= 2 // _a = a, _a[0] = Math.pow(_a[0], (_b = a, _b[0] = Math.pow(_b[0], 2))); // ^ -> required extra parenthesis controlled by shouldEmitParenthesis - // exponentiation compount in variable declaration + // exponentiation compound in variable declaration // var x = a[0] **= a[0] **= 2 // var x = (_a = a, _a[0] = Math.pow(_a[0], (_b = a, _b[0] = Math.pow(_b[0], 2)))); // ^ -> required extra parenthesis controlled by shouldEmitParenthesis @@ -2537,9 +2537,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } synthesizedLHS = createSynthesizedNode(SyntaxKind.ElementAccessExpression, /*startsOnNewLine*/ false); - let tempExpression = createAndRecordTempVariable(TempFlags.Auto); - emitAssignment(tempExpression, leftHandSideExpression.expression, /*shouldEmitCommaBeforeAssignment*/ false); - synthesizedLHS.expression = tempExpression + let tempVariable = createAndRecordTempVariable(TempFlags.Auto); + emitAssignment(tempVariable, leftHandSideExpression.expression, /*shouldEmitCommaBeforeAssignment*/ false); + synthesizedLHS.expression = tempVariable if (leftHandSideExpression.argumentExpression.kind !== SyntaxKind.NumericLiteral && leftHandSideExpression.argumentExpression.kind !== SyntaxKind.StringLiteral) { @@ -2560,9 +2560,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } synthesizedLHS = createSynthesizedNode(SyntaxKind.PropertyAccessExpression, /*startsOnNewLine*/ false); - let tempExpression = createAndRecordTempVariable(TempFlags.Auto); - synthesizedLHS.expression = tempExpression - emitAssignment(tempExpression, leftHandSideExpression.expression, /*shouldEmitCommaBeforeAssignment*/ false); + let tempVariable = createAndRecordTempVariable(TempFlags.Auto); + synthesizedLHS.expression = tempVariable + emitAssignment(tempVariable, leftHandSideExpression.expression, /*shouldEmitCommaBeforeAssignment*/ false); (synthesizedLHS).dotToken = leftHandSideExpression.dotToken; (synthesizedLHS).name = leftHandSideExpression.name; write(", "); @@ -3259,9 +3259,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(", "); } - const isVariableDeclarationOrBindingElement = - name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement); - let exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name); if (exportChanged) { @@ -3270,6 +3267,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(`", `); } + const isVariableDeclarationOrBindingElement = + name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement); + if (isVariableDeclarationOrBindingElement) { emitModuleMemberName(name.parent); } @@ -3500,7 +3500,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } else { - emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount> 0); + emitAssignment(target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); emitCount++; } } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index af3249ddca2..2e661b86f23 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3212,10 +3212,10 @@ namespace ts { let diagnostic: Diagnostic; let start = skipTrivia(sourceText, simpleUnaryExpression.pos); if (simpleUnaryExpression.kind === SyntaxKind.TypeAssertionExpression) { - parseErrorAtPosition(start, simpleUnaryExpression.end - start, Diagnostics.Type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); + parseErrorAtPosition(start, simpleUnaryExpression.end - start, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); } else { - parseErrorAtPosition(start, simpleUnaryExpression.end - start, Diagnostics.An_unary_expression_with_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator)); + parseErrorAtPosition(start, simpleUnaryExpression.end - start, Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator)); } } return simpleUnaryExpression; diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt index 56ffea60a18..c20e4b19008 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError1.errors.txt @@ -1,48 +1,48 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(9,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(10,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(11,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,8): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(9,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(10,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(11,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,4): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,21): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,23): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,23): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,4): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,21): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,23): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,23): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,4): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,25): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,25): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,25): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,4): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,28): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,28): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,28): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,8): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,36): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,36): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,34): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,36): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,36): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,36): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,34): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,36): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,36): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,4): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,38): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,38): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,38): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,4): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,41): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,41): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,41): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,8): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,49): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,49): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,49): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts (45 errors) ==== @@ -57,109 +57,109 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTempl ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1}`; ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt index 4cdc5ca3b8f..015d1f6d6f0 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError2.errors.txt @@ -1,48 +1,48 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(8,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(9,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(10,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(8,10): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(9,10): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(10,10): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,10): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,10): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,10): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,10): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,14): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,27): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,29): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,29): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,14): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,10): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,27): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,10): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,29): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,10): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,29): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,10): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,10): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,31): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,31): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,31): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,10): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,10): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,34): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,34): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,34): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,14): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,14): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,42): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,42): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,40): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,42): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,10): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,42): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,42): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,10): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,40): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,10): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,42): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,10): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,42): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,10): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,10): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,44): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,44): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,44): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,10): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,10): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,47): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,47): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,47): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,14): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,14): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,55): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,55): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,55): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts (45 errors) ==== @@ -55,112 +55,112 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTempl // With templateHead `hello ${-t1 ** t2 - t1}`; ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-++t1 ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1++ ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`; ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`; ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt index 1c79166c04a..320d9a4d309 100644 --- a/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorInTemplateStringWithSyntaxError3.errors.txt @@ -1,48 +1,48 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(8,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(9,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(10,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(8,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(9,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(10,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,4): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,4): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,21): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,23): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,23): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,8): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,21): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,23): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,23): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,4): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,25): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,25): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,25): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,4): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,28): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,28): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,28): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,8): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,36): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,36): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,34): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,36): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,4): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,36): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,36): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,34): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,36): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,4): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,36): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,4): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,4): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,38): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,38): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,38): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,4): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,4): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,41): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,41): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,41): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,8): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,8): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,49): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,49): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,49): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts (45 errors) ==== @@ -55,111 +55,111 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTempl // With TemplateTail `${-t1 ** t2 - t1} world`; ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1} world`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1} world`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 } world`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1} world`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1} world`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`; ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`; ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`; ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`; ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. `${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`; ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt b/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt index c824a8fe57e..4b56e4f4258 100644 --- a/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError1.errors.txt @@ -1,34 +1,34 @@ -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(3,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(4,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(5,6): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(6,6): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,7): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(8,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(12,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(13,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(14,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(15,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(16,6): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(17,6): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(18,6): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(19,6): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(21,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(22,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(23,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(24,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(25,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(26,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(27,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(28,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(29,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(30,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(31,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(32,1): error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(33,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(34,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(35,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(36,1): error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(3,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(4,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(5,6): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(6,6): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,7): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(8,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(12,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(13,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(14,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(15,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(16,6): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(17,6): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(18,6): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(19,6): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(21,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(22,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(23,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(24,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(25,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(26,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(27,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(28,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(29,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(30,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(31,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(32,1): error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(33,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(34,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(35,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(36,1): error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts (31 errors) ==== @@ -36,100 +36,100 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE // Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without () -1 ** 2; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +1 ** 2 ~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** -2 ** 3; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** -2 ** -3; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -1 ** -2 ** -3; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -(1 ** 2) ** 3; ~~~~~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. var temp = 10; -++temp ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +--temp ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -temp++ ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +temp-- ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** -++temp ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** +--temp ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** -temp++ ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** +temp-- ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** temp++; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** temp--; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** ++temp; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** --temp; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** temp++; ~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** temp--; ~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** ++temp; ~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** --temp; ~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** temp++ ** 2; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** temp-- ** 2; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** ++temp ** 2; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -3 ** --temp ** 2; ~~ -!!! error TS17006: An unary expression with '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '-' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** temp++ ** 2; ~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** temp-- ** 2; ~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** ++temp ** 2; ~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +3 ** --temp ** 2; ~~ -!!! error TS17006: An unary expression with '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '+' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt index a39b7c69bc4..2864da4a7f3 100644 --- a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt @@ -1,84 +1,84 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,1): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,1): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,1): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,1): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,1): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,6): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,6): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,6): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,6): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,6): error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(28,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(29,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(30,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(31,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(32,1): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(34,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(35,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(36,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(37,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(38,6): error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(40,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(41,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(42,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(43,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(44,1): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(46,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(47,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(48,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(49,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(50,6): error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,6): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(28,1): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(29,1): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(30,1): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(31,1): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(32,1): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(34,6): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(35,6): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(36,6): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(37,6): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(38,6): error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(40,1): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(41,1): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(42,1): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(43,1): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(44,1): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(46,6): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(47,6): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(48,6): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(49,6): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(50,6): error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,1): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,1): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,1): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,1): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,1): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,1): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,6): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,6): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,6): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,6): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(64,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(65,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(66,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(67,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(68,1): error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(64,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(65,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(66,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(67,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(68,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts (81 errors) ==== @@ -90,225 +90,225 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. delete ++temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. delete temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. delete temp++ ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** delete --temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** delete ++temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** delete temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** delete temp++ ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof --temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof 3 ** 4; ~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof temp++ ** 4; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. typeof temp-- ** 4; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof --temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof 3 ** 4; ~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof temp++ ** 4; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** typeof temp-- ** 4; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void --temp ** 3; ~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void temp-- ** 3; ~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void 3 ** 4; ~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void temp++ ** 4; ~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. void temp-- ** 4; ~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void --temp ** 3; ~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void temp-- ** 3; ~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void 3 ** 4; ~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void temp++ ** 4; ~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** void temp-- ** 4 ; ~~~~~~~~~~~ -!!! error TS17006: An unary expression with 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the 'void' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~ --temp ** 3; ~~~~~~~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~temp-- ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~3 ** 4; ~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~temp++ ** 4; ~~~~~~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~temp-- ** 4; ~~~~~~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~ --temp ** 3; ~~~~~~~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~temp-- ** 3; ~~~~~~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~3 ** 4; ~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~temp++ ** 4; ~~~~~~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ~temp-- ** 4; ~~~~~~~ -!!! error TS17006: An unary expression with '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '~' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ! --temp ** 3; ~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. !temp-- ** 3; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. !3 ** 4; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. !temp++ ** 4; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. !temp-- ** 4; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** ! --temp ** 3; ~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** !temp-- ** 3; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** !3 ** 4; ~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** !temp++ ** 4; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. 1 ** !temp-- ** 4; ~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~ -!!! error TS17006: An unary expression with '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. temp ** 3; ~~~~~~~~~~~~ -!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ++temp ** 3; ~~~~~~~~~~~~~~ -!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. --temp ** 3; ~~~~~~~~~~~~~~ -!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. temp++ ** 3; ~~~~~~~~~~~~~~ -!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. temp-- ** 3; ~~~~~~~~~~~~~~ -!!! error TS17006: Type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file +!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file From b1c83033007657b32d8ee777130357447700feed Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 8 Oct 2015 14:55:11 -0700 Subject: [PATCH 086/121] Fix case for completion on the line after a self-closing element --- src/services/services.ts | 15 ++++++++++----- tests/cases/fourslash/tsxCompletion9.ts | 6 ++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/services/services.ts b/src/services/services.ts index 3eb5ec319ad..0fd76eff61f 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3322,11 +3322,16 @@ namespace ts { return true; } - return contextToken.kind === SyntaxKind.GreaterThanToken && - contextToken.parent && - (contextToken.parent.kind === SyntaxKind.JsxOpeningElement || - contextToken.parent.kind === SyntaxKind.JsxSelfClosingElement || - contextToken.parent.kind === SyntaxKind.JsxClosingElement); + if (contextToken.kind === SyntaxKind.GreaterThanToken && contextToken.parent) { + if (contextToken.parent.kind === SyntaxKind.JsxOpeningElement) { + return true; + } + + if (contextToken.parent.kind === SyntaxKind.JsxClosingElement || contextToken.parent.kind === SyntaxKind.JsxSelfClosingElement) { + return contextToken.parent.parent && contextToken.parent.parent.kind === SyntaxKind.JsxElement; + } + } + return false; } function isNewIdentifierDefinitionLocation(previousToken: Node): boolean { diff --git a/tests/cases/fourslash/tsxCompletion9.ts b/tests/cases/fourslash/tsxCompletion9.ts index dbb6c46293b..12542cc6b5b 100644 --- a/tests/cases/fourslash/tsxCompletion9.ts +++ b/tests/cases/fourslash/tsxCompletion9.ts @@ -11,8 +11,14 @@ //// var x2 =
/*4*/
/*5*/ world /*6*/
; //// var x3 =
/*7*/
/*8*/world/*9*/
; //// var x4 =
/*10*/
; +////
+//// /*end*/ +//// for (var i = 1; i <= 10; i++) { goTo.marker(i + ''); verify.completionListIsEmpty(); } + +goTo.marker('end'); +verify.not.completionListIsEmpty(); From 1e708b46a7251ea9a8b6b4b8c5c1d925e098fed6 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 8 Oct 2015 15:31:59 -0700 Subject: [PATCH 087/121] Implement not.greaterThan for completion list --- src/harness/fourslash.ts | 13 ++++++++++--- tests/cases/fourslash/fourslash.ts | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index a846077a85f..2b6f6ee8d0e 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -588,14 +588,21 @@ namespace FourSlash { } } - public verifyCompletionListItemsCountIsGreaterThan(count: number) { + public verifyCompletionListItemsCountIsGreaterThan(count: number, negative: boolean) { this.taoInvalidReason = "verifyCompletionListItemsCountIsGreaterThan NYI"; let completions = this.getCompletionListAtCaret(); let itemsCount = completions.entries.length; - if (itemsCount <= count) { - this.raiseError(`Expected completion list items count to be greater than ${count}, but is actually ${itemsCount}`); + if (negative) { + if (itemsCount > count) { + this.raiseError(`Expected completion list items count to not be greater than ${count}, but is actually ${itemsCount}`); + } + } + else { + if (itemsCount <= count) { + this.raiseError(`Expected completion list items count to be greater than ${count}, but is actually ${itemsCount}`); + } } } diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 42cfc1248b0..8d1ee35dc1a 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -205,7 +205,7 @@ module FourSlashInterface { // Verifies the completion list items count to be greater than the specified amount. The // completion list is brought up if necessary public completionListItemsCountIsGreaterThan(count: number) { - FourSlash.currentTestState.verifyCompletionListItemsCountIsGreaterThan(count); + FourSlash.currentTestState.verifyCompletionListItemsCountIsGreaterThan(count, this.negative); } public completionListIsEmpty() { From 24334b506c28b58ba3c30528b5044cd4db05e778 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Thu, 8 Oct 2015 15:32:36 -0700 Subject: [PATCH 088/121] Only show the opening tag name when completing a close tag Fixes #5096 --- src/services/services.ts | 19 ++++++++++++++++--- tests/cases/fourslash/tsxCompletion10.ts | 15 +++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 tests/cases/fourslash/tsxCompletion10.ts diff --git a/src/services/services.ts b/src/services/services.ts index 0fd76eff61f..84794e95a6e 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3105,6 +3105,7 @@ namespace ts { let node = currentToken; let isRightOfDot = false; let isRightOfOpenTag = false; + let isStartingCloseTag = false; let location = getTouchingPropertyName(sourceFile, position); if (contextToken) { @@ -3130,9 +3131,14 @@ namespace ts { return undefined; } } - else if (kind === SyntaxKind.LessThanToken && sourceFile.languageVariant === LanguageVariant.JSX) { - isRightOfOpenTag = true; - location = contextToken; + else if (sourceFile.languageVariant === LanguageVariant.JSX) { + if (kind === SyntaxKind.LessThanToken) { + isRightOfOpenTag = true; + location = contextToken; + } + else if (kind === SyntaxKind.SlashToken && contextToken.parent.kind === SyntaxKind.JsxClosingElement) { + isStartingCloseTag = true; + } } } @@ -3155,6 +3161,13 @@ namespace ts { isMemberCompletion = true; isNewIdentifierLocation = false; } + else if (isStartingCloseTag) { + let tagName = (contextToken.parent.parent).openingElement.tagName; + symbols = [typeChecker.getSymbolAtLocation(tagName)]; + + isMemberCompletion = true; + isNewIdentifierLocation = false; + } else { // For JavaScript or TypeScript, if we're not after a dot, then just try to get the // global symbols in scope. These results should be valid for either language as diff --git a/tests/cases/fourslash/tsxCompletion10.ts b/tests/cases/fourslash/tsxCompletion10.ts new file mode 100644 index 00000000000..cf8b3068f10 --- /dev/null +++ b/tests/cases/fourslash/tsxCompletion10.ts @@ -0,0 +1,15 @@ +/// + +//@Filename: file.tsx +//// declare module JSX { +//// interface Element { } +//// interface IntrinsicElements { +//// div: { ONE: string; TWO: number; } +//// } +//// } +//// var x1 =
Date: Thu, 8 Oct 2015 16:59:49 -0700 Subject: [PATCH 089/121] Address PR feedback. Always emit parentheses around emit capturing --- src/compiler/emitter.ts | 74 +++++++++---------- ...dExponentiationAssignmentLHSIsReference.js | 4 +- ...poundExponentiationAssignmentLHSIsValue.js | 6 +- ...onentiationAssignmentWithIndexingOnLHS1.js | 8 +- ...onentiationAssignmentWithIndexingOnLHS2.js | 6 +- ...onentiationAssignmentWithIndexingOnLHS3.js | 6 +- ...onentiationAssignmentWithIndexingOnLHS4.js | 6 +- ...onAssignmentWithPropertyAccessingOnLHS1.js | 6 +- 8 files changed, 57 insertions(+), 59 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 41b45524159..467b3a4d536 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2509,37 +2509,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi /** * Emit ES7 exponentiation operator downlevel using Math.pow - * @param node {BinaryExpression} a binary expression node containing exponentiationOperator (**, **=) + * @param node a binary expression node containing exponentiationOperator (**, **=) */ function emitExponentiationOperator(node: BinaryExpression) { let leftHandSideExpression = node.left; if (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) { let synthesizedLHS: ElementAccessExpression | PropertyAccessExpression; - - // This is used to decide whether to emit parenthesis around the expresison. - // Parenthesis is required for following cases: - // capture variable while emitting right-hand side operand. - // a[0] **= a[0] **= 2 - // _a = a, _a[0] = Math.pow(_a[0], (_b = a, _b[0] = Math.pow(_b[0], 2))); - // ^ -> required extra parenthesis controlled by shouldEmitParenthesis - // exponentiation compound in variable declaration - // var x = a[0] **= a[0] **= 2 - // var x = (_a = a, _a[0] = Math.pow(_a[0], (_b = a, _b[0] = Math.pow(_b[0], 2)))); - // ^ -> required extra parenthesis controlled by shouldEmitParenthesis - // Otherwise, false - let shouldEmitParenthesis = false; - + let shouldEmitParentheses = false; if (isElementAccessExpression(leftHandSideExpression)) { - shouldEmitParenthesis = node.parent.kind === SyntaxKind.VariableDeclaration || node.parent.kind === SyntaxKind.BinaryExpression; - - if (shouldEmitParenthesis) { - write("("); - } + shouldEmitParentheses = true; + write("("); synthesizedLHS = createSynthesizedNode(SyntaxKind.ElementAccessExpression, /*startsOnNewLine*/ false); - let tempVariable = createAndRecordTempVariable(TempFlags.Auto); - emitAssignment(tempVariable, leftHandSideExpression.expression, /*shouldEmitCommaBeforeAssignment*/ false); - synthesizedLHS.expression = tempVariable + + let identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefinedTempVariablesInPlaces*/ false, /*shouldemitCommaBeforeAssignment*/ false); + synthesizedLHS.expression = identifier; if (leftHandSideExpression.argumentExpression.kind !== SyntaxKind.NumericLiteral && leftHandSideExpression.argumentExpression.kind !== SyntaxKind.StringLiteral) { @@ -2553,16 +2537,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(", "); } else if (isPropertyAccessExpression(leftHandSideExpression)) { - shouldEmitParenthesis = node.parent.kind === SyntaxKind.VariableDeclaration || node.parent.kind === SyntaxKind.BinaryExpression; - - if (shouldEmitParenthesis) { - write("("); - } - + shouldEmitParentheses = true; + write("("); synthesizedLHS = createSynthesizedNode(SyntaxKind.PropertyAccessExpression, /*startsOnNewLine*/ false); - let tempVariable = createAndRecordTempVariable(TempFlags.Auto); - synthesizedLHS.expression = tempVariable - emitAssignment(tempVariable, leftHandSideExpression.expression, /*shouldEmitCommaBeforeAssignment*/ false); + + let identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefinedTempVariablesInPlaces*/ false, /*shouldemitCommaBeforeAssignment*/ false); + synthesizedLHS.expression = identifier; + (synthesizedLHS).dotToken = leftHandSideExpression.dotToken; (synthesizedLHS).name = leftHandSideExpression.name; write(", "); @@ -2575,7 +2556,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(", "); emit(node.right); write(")"); - if (shouldEmitParenthesis) { + if (shouldEmitParentheses) { write(")"); } } @@ -3254,6 +3235,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(";"); } + /** + * Emit an assignment to a given identifier, 'name', with a given expression, 'value'. + * @param name an identifier as a left-hand-side operand of the assignment + * @param value an expression as a right-hand-side operand of the assignment + * @param shouldEmitCommaBeforeAssignment a boolean indicating whether to prefix an assignment with comma + */ function emitAssignment(name: Identifier, value: Expression, shouldEmitCommaBeforeAssignment: boolean) { if (shouldEmitCommaBeforeAssignment) { write(", "); @@ -3285,6 +3272,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } + /** + * Create temporary variable, emit an assignment of the variable the given expression + * @param expression an expression to assign to the newly created temporary variable + * @param canDefineTempVariablesInPlace a boolean indicating whether you can define the temporary variable at an assignment location + * @param shouldEmitCommaBeforeAssignment a boolean indicating whether an assignment should prefix with comma + */ + function emitTempVariableAssignment(expression: Expression, canDefineTempVariablesInPlace: boolean, shouldEmitCommaBeforeAssignment: boolean): Identifier { + let identifier = createTempVariable(TempFlags.Auto); + if (!canDefineTempVariablesInPlace) { + recordTempDeclaration(identifier); + } + emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment); + return identifier; + } + function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration, isAssignmentExpressionStatement: boolean, value?: Expression) { let emitCount = 0; @@ -3325,11 +3327,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi return expr; } - let identifier = createTempVariable(TempFlags.Auto); - if (!canDefineTempVariablesInPlace) { - recordTempDeclaration(identifier); - } - emitAssignment(identifier, expr, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0); + let identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0); emitCount++; return identifier; } diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js index cca4a7b55bf..f41962cf9e1 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsReference.js @@ -36,8 +36,8 @@ function fn1(x2) { } // property accesses var x3; -_a = x3, _a.a = Math.pow(_a.a, value); -_b = x3, _b['a'] = Math.pow(_b['a'], value); +(_a = x3, _a.a = Math.pow(_a.a, value)); +(_b = x3, _b['a'] = Math.pow(_b['a'], value)); // parentheses, the contained expression is reference (x1) = Math.pow((x1), value); function fn2(x4) { diff --git a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js index ed825904d7a..f4e14e54242 100644 --- a/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js +++ b/tests/baselines/reference/compoundExponentiationAssignmentLHSIsValue.js @@ -140,15 +140,15 @@ var Derived = (function (_super) { __extends(Derived, _super); function Derived() { _super.call(this); - _a = _super.prototype, _a. = Math.pow(_a., value); + (_a = _super.prototype, _a. = Math.pow(_a., value)); var _a; } Derived.prototype.foo = function () { - _a = _super.prototype, _a. = Math.pow(_a., value); + (_a = _super.prototype, _a. = Math.pow(_a., value)); var _a; }; Derived.sfoo = function () { - _a = _super, _a. = Math.pow(_a., value); + (_a = _super, _a. = Math.pow(_a., value)); var _a; }; return Derived; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js index fb2a7d5a88d..3b9db4c6998 100644 --- a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js @@ -19,14 +19,14 @@ array3[j0++] **= array3[j1++] **= array3[j0++] **= 1; //// [emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js] var array0 = [1, 2, 3]; var i0 = 0; -_a = array0, _i = ++i0, _a[_i] = Math.pow(_a[_i], 2); +(_a = array0, _i = ++i0, _a[_i] = Math.pow(_a[_i], 2)); var array1 = [1, 2, 3]; var i1 = 0; -_b = array1, _c = ++i1, _b[_c] = Math.pow(_b[_c], (_d = array1, _e = ++i1, _d[_e] = Math.pow(_d[_e], 2))); +(_b = array1, _c = ++i1, _b[_c] = Math.pow(_b[_c], (_d = array1, _e = ++i1, _d[_e] = Math.pow(_d[_e], 2)))); var array2 = [1, 2, 3]; var i2 = 0; -_f = array2, _g = ++i2, _f[_g] = Math.pow(_f[_g], Math.pow(array2[++i2], 2)); +(_f = array2, _g = ++i2, _f[_g] = Math.pow(_f[_g], Math.pow(array2[++i2], 2))); var array3 = [2, 2, 3]; var j0 = 0, j1 = 1; -_h = array3, _j = j0++, _h[_j] = Math.pow(_h[_j], (_k = array3, _l = j1++, _k[_l] = Math.pow(_k[_l], (_m = array3, _o = j0++, _m[_o] = Math.pow(_m[_o], 1))))); +(_h = array3, _j = j0++, _h[_j] = Math.pow(_h[_j], (_k = array3, _l = j1++, _k[_l] = Math.pow(_k[_l], (_m = array3, _o = j0++, _m[_o] = Math.pow(_m[_o], 1)))))); var _a, _i, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js index e2392e4074b..83e0b2473e8 100644 --- a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js @@ -17,10 +17,10 @@ function foo() { globalCounter += 1; return { 0: 2 }; } -_a = foo(), _a[0] = Math.pow(_a[0], foo()[0]); +(_a = foo(), _a[0] = Math.pow(_a[0], foo()[0])); var result_foo1 = (_b = foo(), _b[0] = Math.pow(_b[0], foo()[0])); -_c = foo(), _c[0] = Math.pow(_c[0], (_d = foo(), _d[0] = Math.pow(_d[0], 2))); +(_c = foo(), _c[0] = Math.pow(_c[0], (_d = foo(), _d[0] = Math.pow(_d[0], 2)))); var result_foo2 = (_e = foo(), _e[0] = Math.pow(_e[0], (_f = foo(), _f[0] = Math.pow(_f[0], 2)))); -_g = foo(), _g[0] = Math.pow(_g[0], Math.pow(foo()[0], 2)); +(_g = foo(), _g[0] = Math.pow(_g[0], Math.pow(foo()[0], 2))); var result_foo3 = (_h = foo(), _h[0] = Math.pow(_h[0], Math.pow(foo()[0], 2))); var _a, _b, _c, _d, _e, _f, _g, _h; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js index b4b8a8a1b1f..797ccccc331 100644 --- a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js @@ -23,7 +23,7 @@ var object = { this._0 = x; }, }; -_a = object, _a[0] = Math.pow(_a[0], object[0]); -_b = object, _b[0] = Math.pow(_b[0], (_c = object, _c[0] = Math.pow(_c[0], 2))); -_d = object, _d[0] = Math.pow(_d[0], Math.pow(object[0], 2)); +(_a = object, _a[0] = Math.pow(_a[0], object[0])); +(_b = object, _b[0] = Math.pow(_b[0], (_c = object, _c[0] = Math.pow(_c[0], 2)))); +(_d = object, _d[0] = Math.pow(_d[0], Math.pow(object[0], 2))); var _a, _b, _c, _d; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js index 001f970b0d3..f61693f192c 100644 --- a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js @@ -23,7 +23,7 @@ function incrementIdx(max) { return idx; } var array1 = [1, 2, 3, 4, 5]; -_a = array1, _i = incrementIdx(array1.length), _a[_i] = Math.pow(_a[_i], 3); -_b = array1, _c = incrementIdx(array1.length), _b[_c] = Math.pow(_b[_c], (_d = array1, _e = incrementIdx(array1.length), _d[_e] = Math.pow(_d[_e], 2))); -_f = array1, _g = incrementIdx(array1.length), _f[_g] = Math.pow(_f[_g], Math.pow(array1[incrementIdx(array1.length)], 2)); +(_a = array1, _i = incrementIdx(array1.length), _a[_i] = Math.pow(_a[_i], 3)); +(_b = array1, _c = incrementIdx(array1.length), _b[_c] = Math.pow(_b[_c], (_d = array1, _e = incrementIdx(array1.length), _d[_e] = Math.pow(_d[_e], 2)))); +(_f = array1, _g = incrementIdx(array1.length), _f[_g] = Math.pow(_f[_g], Math.pow(array1[incrementIdx(array1.length)], 2))); var _a, _i, _b, _c, _d, _e, _f, _g; diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js index 5f51b432e20..99204e6362c 100644 --- a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js @@ -18,10 +18,10 @@ function foo() { globalCounter += 1; return { prop: 2 }; } -_a = foo(), _a.prop = Math.pow(_a.prop, 2); +(_a = foo(), _a.prop = Math.pow(_a.prop, 2)); var result0 = (_b = foo(), _b.prop = Math.pow(_b.prop, 2)); -_c = foo(), _c.prop = Math.pow(_c.prop, (_d = foo(), _d.prop = Math.pow(_d.prop, 2))); +(_c = foo(), _c.prop = Math.pow(_c.prop, (_d = foo(), _d.prop = Math.pow(_d.prop, 2)))); var result1 = (_e = foo(), _e.prop = Math.pow(_e.prop, (_f = foo(), _f.prop = Math.pow(_f.prop, 2)))); -_g = foo(), _g.prop = Math.pow(_g.prop, Math.pow(foo().prop, 2)); +(_g = foo(), _g.prop = Math.pow(_g.prop, Math.pow(foo().prop, 2))); var result2 = (_h = foo(), _h.prop = Math.pow(_h.prop, Math.pow(foo().prop, 2))); var _a, _b, _c, _d, _e, _f, _g, _h; From 5e921c1d8dbb595bf7e7feac22999ce4517e2d6a Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 8 Oct 2015 17:12:22 -0700 Subject: [PATCH 090/121] Address PR feedback, remove scriptTarget ES7 --- src/compiler/commandLineParser.ts | 2 +- .../diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- src/compiler/emitter.ts | 5 +- src/compiler/types.ts | 1 - src/harness/harness.ts | 11 +- .../emitCompoundExponentiationOperator1ES7.js | 43 --- ...CompoundExponentiationOperator1ES7.symbols | 83 ----- ...itCompoundExponentiationOperator1ES7.types | 171 --------- .../emitCompoundExponentiationOperator2ES7.js | 47 --- ...CompoundExponentiationOperator2ES7.symbols | 76 ---- ...itCompoundExponentiationOperator2ES7.types | 185 ---------- .../emitExponentiationOperator1ES7.js | 62 ---- .../emitExponentiationOperator1ES7.symbols | 34 -- .../emitExponentiationOperator1ES7.types | 207 ----------- .../emitExponentiationOperator2ES7.js | 104 ------ .../emitExponentiationOperator2ES7.symbols | 152 -------- .../emitExponentiationOperator2ES7.types | 344 ------------------ .../emitExponentiationOperator3ES7.js | 78 ---- .../emitExponentiationOperator3ES7.symbols | 107 ------ .../emitExponentiationOperator3ES7.types | 314 ---------------- .../emitExponentiationOperator4ES7.js | 70 ---- .../emitExponentiationOperator4ES7.symbols | 84 ----- .../emitExponentiationOperator4ES7.types | 260 ------------- ...onentiationOperatorSyntaxError2.errors.txt | 20 +- .../emitCompoundExponentiationOperator1ES7.ts | 22 -- .../emitCompoundExponentiationOperator2ES7.ts | 25 -- .../emitExponentiationOperator1ES7.ts | 33 -- .../emitExponentiationOperator2ES7.ts | 56 --- .../emitExponentiationOperator3ES7.ts | 40 -- .../emitExponentiationOperator4ES7.ts | 38 -- 31 files changed, 16 insertions(+), 2662 deletions(-) delete mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator1ES7.js delete mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator1ES7.symbols delete mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator1ES7.types delete mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator2ES7.js delete mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator2ES7.symbols delete mode 100644 tests/baselines/reference/emitCompoundExponentiationOperator2ES7.types delete mode 100644 tests/baselines/reference/emitExponentiationOperator1ES7.js delete mode 100644 tests/baselines/reference/emitExponentiationOperator1ES7.symbols delete mode 100644 tests/baselines/reference/emitExponentiationOperator1ES7.types delete mode 100644 tests/baselines/reference/emitExponentiationOperator2ES7.js delete mode 100644 tests/baselines/reference/emitExponentiationOperator2ES7.symbols delete mode 100644 tests/baselines/reference/emitExponentiationOperator2ES7.types delete mode 100644 tests/baselines/reference/emitExponentiationOperator3ES7.js delete mode 100644 tests/baselines/reference/emitExponentiationOperator3ES7.symbols delete mode 100644 tests/baselines/reference/emitExponentiationOperator3ES7.types delete mode 100644 tests/baselines/reference/emitExponentiationOperator4ES7.js delete mode 100644 tests/baselines/reference/emitExponentiationOperator4ES7.symbols delete mode 100644 tests/baselines/reference/emitExponentiationOperator4ES7.types delete mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts delete mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts delete mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts delete mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts delete mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts delete mode 100644 tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index f63cb36f9ec..1670251973a 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -204,7 +204,7 @@ namespace ts { { name: "target", shortName: "t", - type: { "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, "es6": ScriptTarget.ES6, "es7": ScriptTarget.ES7 }, + type: { "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, "es6": ScriptTarget.ES6 }, description: Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental, paramType: Diagnostics.VERSION, error: Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES6 diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 7af1afb251a..103b29b20fb 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -619,6 +619,6 @@ namespace ts { Cannot_use_JSX_unless_the_jsx_flag_is_provided: { code: 17004, category: DiagnosticCategory.Error, key: "Cannot use JSX unless the '--jsx' flag is provided." }, A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: { code: 17005, category: DiagnosticCategory.Error, key: "A constructor cannot contain a 'super' call when its class extends 'null'" }, An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: DiagnosticCategory.Error, key: "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, - A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17006, category: DiagnosticCategory.Error, key: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, + A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: DiagnosticCategory.Error, key: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." }, }; } \ No newline at end of file diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 59a494629e4..5298d123299 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2473,6 +2473,6 @@ }, "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { "category": "Error", - "code": 17006 + "code": 17007 } } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 467b3a4d536..a4ff544a132 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -836,8 +836,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } } let node = nodes[start + i]; - let leadingComments = getLeadingCommentsToEmit(node); - let trailingComments = getTrailingCommentRanges(currentSourceFile.text, node.pos); // This emitting is to make sure we emit following comment properly // ...(x, /*comment1*/ y)... // ^ => node.pos @@ -2587,7 +2585,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi write(`", `); } - if (languageVersion < ScriptTarget.ES7 && (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskToken || node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken)) { + if (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskToken || node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) { + // Downleveled emit exponentiation operator using Math.pow emitExponentiationOperator(node); } else { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 2b8c2624819..67d93f9c50e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2107,7 +2107,6 @@ namespace ts { ES3 = 0, ES5 = 1, ES6 = 2, - ES7 = 3, Latest = ES6, } diff --git a/src/harness/harness.ts b/src/harness/harness.ts index f149ceeb268..57eb848ac23 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -932,16 +932,7 @@ module Harness { } else { if (fn === defaultLibFileName) { - switch (languageVersion) { - case ts.ScriptTarget.ES6: - case ts.ScriptTarget.ES7: - // TODO : Update to use ES7 specific lib file - return defaultES6LibSourceFile; - case ts.ScriptTarget.ES3: - case ts.ScriptTarget.ES5: - default: - return defaultLibSourceFile; - } + return languageVersion === ts.ScriptTarget.ES6 ? defaultES6LibSourceFile : defaultLibSourceFile; } // Don't throw here -- the compiler might be looking for a test that actually doesn't exist as part of the TC return undefined; diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.js b/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.js deleted file mode 100644 index a1039555694..00000000000 --- a/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.js +++ /dev/null @@ -1,43 +0,0 @@ -//// [emitCompoundExponentiationOperator1ES7.ts] - -var comp: number; - -comp **= 1; -comp **= comp ** comp; -comp **= comp ** comp ** 2; -comp **= comp ** comp + 2; -comp **= comp ** comp - 2; -comp **= comp ** comp * 2; -comp **= comp ** comp / 2; -comp **= comp ** comp % 2; -comp **= (comp - 2) ** 5; -comp **= (comp + 2) ** 5; -comp **= (comp * 2) ** 5; -comp **= (comp / 2) ** 5; -comp **= (comp % 2) ** 5; -comp **= comp ** (5 + 2); -comp **= comp ** (5 - 2); -comp **= comp ** (5 * 2); -comp **= comp ** (5 / 2); -comp **= comp ** (5 % 2); - -//// [emitCompoundExponentiationOperator1ES7.js] -var comp; -comp **= 1; -comp **= comp ** comp; -comp **= comp ** comp ** 2; -comp **= comp ** comp + 2; -comp **= comp ** comp - 2; -comp **= comp ** comp * 2; -comp **= comp ** comp / 2; -comp **= comp ** comp % 2; -comp **= (comp - 2) ** 5; -comp **= (comp + 2) ** 5; -comp **= (comp * 2) ** 5; -comp **= (comp / 2) ** 5; -comp **= (comp % 2) ** 5; -comp **= comp ** (5 + 2); -comp **= comp ** (5 - 2); -comp **= comp ** (5 * 2); -comp **= comp ** (5 / 2); -comp **= comp ** (5 % 2); diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.symbols b/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.symbols deleted file mode 100644 index 07037222df8..00000000000 --- a/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.symbols +++ /dev/null @@ -1,83 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts === - -var comp: number; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= 1; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** comp; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** comp ** 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** comp + 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** comp - 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** comp * 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** comp / 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** comp % 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= (comp - 2) ** 5; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= (comp + 2) ** 5; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= (comp * 2) ** 5; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= (comp / 2) ** 5; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= (comp % 2) ** 5; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** (5 + 2); ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** (5 - 2); ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** (5 * 2); ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** (5 / 2); ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - -comp **= comp ** (5 % 2); ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1ES7.ts, 1, 3)) - diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.types b/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.types deleted file mode 100644 index 6937e381a22..00000000000 --- a/tests/baselines/reference/emitCompoundExponentiationOperator1ES7.types +++ /dev/null @@ -1,171 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts === - -var comp: number; ->comp : number - -comp **= 1; ->comp **= 1 : number ->comp : number ->1 : number - -comp **= comp ** comp; ->comp **= comp ** comp : number ->comp : number ->comp ** comp : number ->comp : number ->comp : number - -comp **= comp ** comp ** 2; ->comp **= comp ** comp ** 2 : number ->comp : number ->comp ** comp ** 2 : number ->comp : number ->comp ** 2 : number ->comp : number ->2 : number - -comp **= comp ** comp + 2; ->comp **= comp ** comp + 2 : number ->comp : number ->comp ** comp + 2 : number ->comp ** comp : number ->comp : number ->comp : number ->2 : number - -comp **= comp ** comp - 2; ->comp **= comp ** comp - 2 : number ->comp : number ->comp ** comp - 2 : number ->comp ** comp : number ->comp : number ->comp : number ->2 : number - -comp **= comp ** comp * 2; ->comp **= comp ** comp * 2 : number ->comp : number ->comp ** comp * 2 : number ->comp ** comp : number ->comp : number ->comp : number ->2 : number - -comp **= comp ** comp / 2; ->comp **= comp ** comp / 2 : number ->comp : number ->comp ** comp / 2 : number ->comp ** comp : number ->comp : number ->comp : number ->2 : number - -comp **= comp ** comp % 2; ->comp **= comp ** comp % 2 : number ->comp : number ->comp ** comp % 2 : number ->comp ** comp : number ->comp : number ->comp : number ->2 : number - -comp **= (comp - 2) ** 5; ->comp **= (comp - 2) ** 5 : number ->comp : number ->(comp - 2) ** 5 : number ->(comp - 2) : number ->comp - 2 : number ->comp : number ->2 : number ->5 : number - -comp **= (comp + 2) ** 5; ->comp **= (comp + 2) ** 5 : number ->comp : number ->(comp + 2) ** 5 : number ->(comp + 2) : number ->comp + 2 : number ->comp : number ->2 : number ->5 : number - -comp **= (comp * 2) ** 5; ->comp **= (comp * 2) ** 5 : number ->comp : number ->(comp * 2) ** 5 : number ->(comp * 2) : number ->comp * 2 : number ->comp : number ->2 : number ->5 : number - -comp **= (comp / 2) ** 5; ->comp **= (comp / 2) ** 5 : number ->comp : number ->(comp / 2) ** 5 : number ->(comp / 2) : number ->comp / 2 : number ->comp : number ->2 : number ->5 : number - -comp **= (comp % 2) ** 5; ->comp **= (comp % 2) ** 5 : number ->comp : number ->(comp % 2) ** 5 : number ->(comp % 2) : number ->comp % 2 : number ->comp : number ->2 : number ->5 : number - -comp **= comp ** (5 + 2); ->comp **= comp ** (5 + 2) : number ->comp : number ->comp ** (5 + 2) : number ->comp : number ->(5 + 2) : number ->5 + 2 : number ->5 : number ->2 : number - -comp **= comp ** (5 - 2); ->comp **= comp ** (5 - 2) : number ->comp : number ->comp ** (5 - 2) : number ->comp : number ->(5 - 2) : number ->5 - 2 : number ->5 : number ->2 : number - -comp **= comp ** (5 * 2); ->comp **= comp ** (5 * 2) : number ->comp : number ->comp ** (5 * 2) : number ->comp : number ->(5 * 2) : number ->5 * 2 : number ->5 : number ->2 : number - -comp **= comp ** (5 / 2); ->comp **= comp ** (5 / 2) : number ->comp : number ->comp ** (5 / 2) : number ->comp : number ->(5 / 2) : number ->5 / 2 : number ->5 : number ->2 : number - -comp **= comp ** (5 % 2); ->comp **= comp ** (5 % 2) : number ->comp : number ->comp ** (5 % 2) : number ->comp : number ->(5 % 2) : number ->5 % 2 : number ->5 : number ->2 : number - diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.js b/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.js deleted file mode 100644 index ac504150bec..00000000000 --- a/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.js +++ /dev/null @@ -1,47 +0,0 @@ -//// [emitCompoundExponentiationOperator2ES7.ts] - -var comp: number; - -comp **= 1; -comp **= comp **= 1; -comp **= comp **= 1 + 2; -comp **= comp **= 1 - 2; -comp **= comp **= 1 * 2; -comp **= comp **= 1 / 2; - -comp **= comp **= (1 + 2); -comp **= comp **= (1 - 2); -comp **= comp **= (1 * 2); -comp **= comp **= (1 / 2); - -comp **= comp **= 1 + 2 ** 3; -comp **= comp **= 1 - 2 ** 4; -comp **= comp **= 1 * 2 ** 5; -comp **= comp **= 1 / 2 ** 6; - -comp **= comp **= (1 + 2) ** 3; -comp **= comp **= (1 - 2) ** 4; -comp **= comp **= (1 * 2) ** 5; -comp **= comp **= (1 / 2) ** 6; - - -//// [emitCompoundExponentiationOperator2ES7.js] -var comp; -comp **= 1; -comp **= comp **= 1; -comp **= comp **= 1 + 2; -comp **= comp **= 1 - 2; -comp **= comp **= 1 * 2; -comp **= comp **= 1 / 2; -comp **= comp **= (1 + 2); -comp **= comp **= (1 - 2); -comp **= comp **= (1 * 2); -comp **= comp **= (1 / 2); -comp **= comp **= 1 + 2 ** 3; -comp **= comp **= 1 - 2 ** 4; -comp **= comp **= 1 * 2 ** 5; -comp **= comp **= 1 / 2 ** 6; -comp **= comp **= (1 + 2) ** 3; -comp **= comp **= (1 - 2) ** 4; -comp **= comp **= (1 * 2) ** 5; -comp **= comp **= (1 / 2) ** 6; diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.symbols b/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.symbols deleted file mode 100644 index b3e56cbdbae..00000000000 --- a/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.symbols +++ /dev/null @@ -1,76 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts === - -var comp: number; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= 1; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= 1; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= 1 + 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= 1 - 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= 1 * 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= 1 / 2; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= (1 + 2); ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= (1 - 2); ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= (1 * 2); ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= (1 / 2); ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= 1 + 2 ** 3; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= 1 - 2 ** 4; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= 1 * 2 ** 5; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= 1 / 2 ** 6; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= (1 + 2) ** 3; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= (1 - 2) ** 4; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= (1 * 2) ** 5; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - -comp **= comp **= (1 / 2) ** 6; ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) ->comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2ES7.ts, 1, 3)) - diff --git a/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.types b/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.types deleted file mode 100644 index 97a61ec4af4..00000000000 --- a/tests/baselines/reference/emitCompoundExponentiationOperator2ES7.types +++ /dev/null @@ -1,185 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts === - -var comp: number; ->comp : number - -comp **= 1; ->comp **= 1 : number ->comp : number ->1 : number - -comp **= comp **= 1; ->comp **= comp **= 1 : number ->comp : number ->comp **= 1 : number ->comp : number ->1 : number - -comp **= comp **= 1 + 2; ->comp **= comp **= 1 + 2 : number ->comp : number ->comp **= 1 + 2 : number ->comp : number ->1 + 2 : number ->1 : number ->2 : number - -comp **= comp **= 1 - 2; ->comp **= comp **= 1 - 2 : number ->comp : number ->comp **= 1 - 2 : number ->comp : number ->1 - 2 : number ->1 : number ->2 : number - -comp **= comp **= 1 * 2; ->comp **= comp **= 1 * 2 : number ->comp : number ->comp **= 1 * 2 : number ->comp : number ->1 * 2 : number ->1 : number ->2 : number - -comp **= comp **= 1 / 2; ->comp **= comp **= 1 / 2 : number ->comp : number ->comp **= 1 / 2 : number ->comp : number ->1 / 2 : number ->1 : number ->2 : number - -comp **= comp **= (1 + 2); ->comp **= comp **= (1 + 2) : number ->comp : number ->comp **= (1 + 2) : number ->comp : number ->(1 + 2) : number ->1 + 2 : number ->1 : number ->2 : number - -comp **= comp **= (1 - 2); ->comp **= comp **= (1 - 2) : number ->comp : number ->comp **= (1 - 2) : number ->comp : number ->(1 - 2) : number ->1 - 2 : number ->1 : number ->2 : number - -comp **= comp **= (1 * 2); ->comp **= comp **= (1 * 2) : number ->comp : number ->comp **= (1 * 2) : number ->comp : number ->(1 * 2) : number ->1 * 2 : number ->1 : number ->2 : number - -comp **= comp **= (1 / 2); ->comp **= comp **= (1 / 2) : number ->comp : number ->comp **= (1 / 2) : number ->comp : number ->(1 / 2) : number ->1 / 2 : number ->1 : number ->2 : number - -comp **= comp **= 1 + 2 ** 3; ->comp **= comp **= 1 + 2 ** 3 : number ->comp : number ->comp **= 1 + 2 ** 3 : number ->comp : number ->1 + 2 ** 3 : number ->1 : number ->2 ** 3 : number ->2 : number ->3 : number - -comp **= comp **= 1 - 2 ** 4; ->comp **= comp **= 1 - 2 ** 4 : number ->comp : number ->comp **= 1 - 2 ** 4 : number ->comp : number ->1 - 2 ** 4 : number ->1 : number ->2 ** 4 : number ->2 : number ->4 : number - -comp **= comp **= 1 * 2 ** 5; ->comp **= comp **= 1 * 2 ** 5 : number ->comp : number ->comp **= 1 * 2 ** 5 : number ->comp : number ->1 * 2 ** 5 : number ->1 : number ->2 ** 5 : number ->2 : number ->5 : number - -comp **= comp **= 1 / 2 ** 6; ->comp **= comp **= 1 / 2 ** 6 : number ->comp : number ->comp **= 1 / 2 ** 6 : number ->comp : number ->1 / 2 ** 6 : number ->1 : number ->2 ** 6 : number ->2 : number ->6 : number - -comp **= comp **= (1 + 2) ** 3; ->comp **= comp **= (1 + 2) ** 3 : number ->comp : number ->comp **= (1 + 2) ** 3 : number ->comp : number ->(1 + 2) ** 3 : number ->(1 + 2) : number ->1 + 2 : number ->1 : number ->2 : number ->3 : number - -comp **= comp **= (1 - 2) ** 4; ->comp **= comp **= (1 - 2) ** 4 : number ->comp : number ->comp **= (1 - 2) ** 4 : number ->comp : number ->(1 - 2) ** 4 : number ->(1 - 2) : number ->1 - 2 : number ->1 : number ->2 : number ->4 : number - -comp **= comp **= (1 * 2) ** 5; ->comp **= comp **= (1 * 2) ** 5 : number ->comp : number ->comp **= (1 * 2) ** 5 : number ->comp : number ->(1 * 2) ** 5 : number ->(1 * 2) : number ->1 * 2 : number ->1 : number ->2 : number ->5 : number - -comp **= comp **= (1 / 2) ** 6; ->comp **= comp **= (1 / 2) ** 6 : number ->comp : number ->comp **= (1 / 2) ** 6 : number ->comp : number ->(1 / 2) ** 6 : number ->(1 / 2) : number ->1 / 2 : number ->1 : number ->2 : number ->6 : number - diff --git a/tests/baselines/reference/emitExponentiationOperator1ES7.js b/tests/baselines/reference/emitExponentiationOperator1ES7.js deleted file mode 100644 index f9e4924d4b5..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator1ES7.js +++ /dev/null @@ -1,62 +0,0 @@ -//// [emitExponentiationOperator1ES7.ts] - -1 ** -2; -1 ** 2; -(-1) ** 2 -1 ** 2 ** 3; -1 ** 2 ** -3; -1 ** -(2 ** 3); -(-(1 ** 2)) ** 3; -(-(1 ** 2)) ** -3; - -1 ** 2 + 3; -1 ** 2 - 3; -1 ** 2 * 3; -1 ** 2 / 3; -1 ** 2 % 3; - -1 ** -2 + 3; -1 ** -2 - 3; -1 ** -2 * 3; -1 ** -2 / 3; -1 ** -2 % 3; - -2 + 3 ** 3; -2 - 3 ** 3; -2 * 3 ** 3; -2 / 3 ** 3; -2 % 3 ** 3; - -(2 + 3) ** 4; -(2 - 3) ** 4; -(2 * 3) ** 4; -(2 / 3) ** 4; - -//// [emitExponentiationOperator1ES7.js] -1 ** -2; -1 ** 2; -(-1) ** 2; -1 ** 2 ** 3; -1 ** 2 ** -3; -1 ** -(2 ** 3); -(-(1 ** 2)) ** 3; -(-(1 ** 2)) ** -3; -1 ** 2 + 3; -1 ** 2 - 3; -1 ** 2 * 3; -1 ** 2 / 3; -1 ** 2 % 3; -1 ** -2 + 3; -1 ** -2 - 3; -1 ** -2 * 3; -1 ** -2 / 3; -1 ** -2 % 3; -2 + 3 ** 3; -2 - 3 ** 3; -2 * 3 ** 3; -2 / 3 ** 3; -2 % 3 ** 3; -(2 + 3) ** 4; -(2 - 3) ** 4; -(2 * 3) ** 4; -(2 / 3) ** 4; diff --git a/tests/baselines/reference/emitExponentiationOperator1ES7.symbols b/tests/baselines/reference/emitExponentiationOperator1ES7.symbols deleted file mode 100644 index c0cc50e7083..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator1ES7.symbols +++ /dev/null @@ -1,34 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts === - -No type information for this code.1 ** -2; -No type information for this code.1 ** 2; -No type information for this code.(-1) ** 2 -No type information for this code.1 ** 2 ** 3; -No type information for this code.1 ** 2 ** -3; -No type information for this code.1 ** -(2 ** 3); -No type information for this code.(-(1 ** 2)) ** 3; -No type information for this code.(-(1 ** 2)) ** -3; -No type information for this code. -No type information for this code.1 ** 2 + 3; -No type information for this code.1 ** 2 - 3; -No type information for this code.1 ** 2 * 3; -No type information for this code.1 ** 2 / 3; -No type information for this code.1 ** 2 % 3; -No type information for this code. -No type information for this code.1 ** -2 + 3; -No type information for this code.1 ** -2 - 3; -No type information for this code.1 ** -2 * 3; -No type information for this code.1 ** -2 / 3; -No type information for this code.1 ** -2 % 3; -No type information for this code. -No type information for this code.2 + 3 ** 3; -No type information for this code.2 - 3 ** 3; -No type information for this code.2 * 3 ** 3; -No type information for this code.2 / 3 ** 3; -No type information for this code.2 % 3 ** 3; -No type information for this code. -No type information for this code.(2 + 3) ** 4; -No type information for this code.(2 - 3) ** 4; -No type information for this code.(2 * 3) ** 4; -No type information for this code.(2 / 3) ** 4; -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/emitExponentiationOperator1ES7.types b/tests/baselines/reference/emitExponentiationOperator1ES7.types deleted file mode 100644 index 067d992c446..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator1ES7.types +++ /dev/null @@ -1,207 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts === - -1 ** -2; ->1 ** -2 : number ->1 : number ->-2 : number ->2 : number - -1 ** 2; ->1 ** 2 : number ->1 : number ->2 : number - -(-1) ** 2 ->(-1) ** 2 : number ->(-1) : number ->-1 : number ->1 : number ->2 : number - -1 ** 2 ** 3; ->1 ** 2 ** 3 : number ->1 : number ->2 ** 3 : number ->2 : number ->3 : number - -1 ** 2 ** -3; ->1 ** 2 ** -3 : number ->1 : number ->2 ** -3 : number ->2 : number ->-3 : number ->3 : number - -1 ** -(2 ** 3); ->1 ** -(2 ** 3) : number ->1 : number ->-(2 ** 3) : number ->(2 ** 3) : number ->2 ** 3 : number ->2 : number ->3 : number - -(-(1 ** 2)) ** 3; ->(-(1 ** 2)) ** 3 : number ->(-(1 ** 2)) : number ->-(1 ** 2) : number ->(1 ** 2) : number ->1 ** 2 : number ->1 : number ->2 : number ->3 : number - -(-(1 ** 2)) ** -3; ->(-(1 ** 2)) ** -3 : number ->(-(1 ** 2)) : number ->-(1 ** 2) : number ->(1 ** 2) : number ->1 ** 2 : number ->1 : number ->2 : number ->-3 : number ->3 : number - -1 ** 2 + 3; ->1 ** 2 + 3 : number ->1 ** 2 : number ->1 : number ->2 : number ->3 : number - -1 ** 2 - 3; ->1 ** 2 - 3 : number ->1 ** 2 : number ->1 : number ->2 : number ->3 : number - -1 ** 2 * 3; ->1 ** 2 * 3 : number ->1 ** 2 : number ->1 : number ->2 : number ->3 : number - -1 ** 2 / 3; ->1 ** 2 / 3 : number ->1 ** 2 : number ->1 : number ->2 : number ->3 : number - -1 ** 2 % 3; ->1 ** 2 % 3 : number ->1 ** 2 : number ->1 : number ->2 : number ->3 : number - -1 ** -2 + 3; ->1 ** -2 + 3 : number ->1 ** -2 : number ->1 : number ->-2 : number ->2 : number ->3 : number - -1 ** -2 - 3; ->1 ** -2 - 3 : number ->1 ** -2 : number ->1 : number ->-2 : number ->2 : number ->3 : number - -1 ** -2 * 3; ->1 ** -2 * 3 : number ->1 ** -2 : number ->1 : number ->-2 : number ->2 : number ->3 : number - -1 ** -2 / 3; ->1 ** -2 / 3 : number ->1 ** -2 : number ->1 : number ->-2 : number ->2 : number ->3 : number - -1 ** -2 % 3; ->1 ** -2 % 3 : number ->1 ** -2 : number ->1 : number ->-2 : number ->2 : number ->3 : number - -2 + 3 ** 3; ->2 + 3 ** 3 : number ->2 : number ->3 ** 3 : number ->3 : number ->3 : number - -2 - 3 ** 3; ->2 - 3 ** 3 : number ->2 : number ->3 ** 3 : number ->3 : number ->3 : number - -2 * 3 ** 3; ->2 * 3 ** 3 : number ->2 : number ->3 ** 3 : number ->3 : number ->3 : number - -2 / 3 ** 3; ->2 / 3 ** 3 : number ->2 : number ->3 ** 3 : number ->3 : number ->3 : number - -2 % 3 ** 3; ->2 % 3 ** 3 : number ->2 : number ->3 ** 3 : number ->3 : number ->3 : number - -(2 + 3) ** 4; ->(2 + 3) ** 4 : number ->(2 + 3) : number ->2 + 3 : number ->2 : number ->3 : number ->4 : number - -(2 - 3) ** 4; ->(2 - 3) ** 4 : number ->(2 - 3) : number ->2 - 3 : number ->2 : number ->3 : number ->4 : number - -(2 * 3) ** 4; ->(2 * 3) ** 4 : number ->(2 * 3) : number ->2 * 3 : number ->2 : number ->3 : number ->4 : number - -(2 / 3) ** 4; ->(2 / 3) ** 4 : number ->(2 / 3) : number ->2 / 3 : number ->2 : number ->3 : number ->4 : number - diff --git a/tests/baselines/reference/emitExponentiationOperator2ES7.js b/tests/baselines/reference/emitExponentiationOperator2ES7.js deleted file mode 100644 index 89cef39ebf3..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator2ES7.js +++ /dev/null @@ -1,104 +0,0 @@ -//// [emitExponentiationOperator2ES7.ts] - -var temp = 10; - -++temp ** 3; ---temp ** 3; -temp++ ** 3; -temp-- ** 3; ---temp + temp ** 3; ---temp - temp ** 3; ---temp * temp ** 3; ---temp / temp ** 3; ---temp % temp ** 3; -temp-- ** 3; -temp++ ** 3; -temp-- ** -temp; -temp++ ** +temp; - -temp-- + temp ** 3; -temp-- - temp ** 3; -temp-- * temp ** 3; -temp-- / temp ** 3; -temp-- % temp ** 3; - ---temp + 2 ** 3; ---temp - 2 ** 3; ---temp * 2 ** 3; ---temp / 2 ** 3; ---temp % 2 ** 3; - -++temp + 2 ** 3; -++temp - 2 ** 3; -++temp * 2 ** 3; -++temp / 2 ** 3; - -3 ** ++temp; -3 ** --temp; -3 ** temp++; -3 ** temp--; - -3 ** ++temp ** 2; -3 ** --temp ** 2; -3 ** temp++ ** 2; -3 ** temp-- ** 2; - -3 ** ++temp + 2; -3 ** ++temp - 2; -3 ** ++temp * 2; -3 ** ++temp / 2; -3 ** ++temp % 2; - -3 ** --temp + 2; -3 ** --temp - 2; -3 ** --temp * 2; -3 ** --temp / 2; -3 ** --temp % 2; - -//// [emitExponentiationOperator2ES7.js] -var temp = 10; -++temp ** 3; ---temp ** 3; -temp++ ** 3; -temp-- ** 3; ---temp + temp ** 3; ---temp - temp ** 3; ---temp * temp ** 3; ---temp / temp ** 3; ---temp % temp ** 3; -temp-- ** 3; -temp++ ** 3; -temp-- ** -temp; -temp++ ** +temp; -temp-- + temp ** 3; -temp-- - temp ** 3; -temp-- * temp ** 3; -temp-- / temp ** 3; -temp-- % temp ** 3; ---temp + 2 ** 3; ---temp - 2 ** 3; ---temp * 2 ** 3; ---temp / 2 ** 3; ---temp % 2 ** 3; -++temp + 2 ** 3; -++temp - 2 ** 3; -++temp * 2 ** 3; -++temp / 2 ** 3; -3 ** ++temp; -3 ** --temp; -3 ** temp++; -3 ** temp--; -3 ** ++temp ** 2; -3 ** --temp ** 2; -3 ** temp++ ** 2; -3 ** temp-- ** 2; -3 ** ++temp + 2; -3 ** ++temp - 2; -3 ** ++temp * 2; -3 ** ++temp / 2; -3 ** ++temp % 2; -3 ** --temp + 2; -3 ** --temp - 2; -3 ** --temp * 2; -3 ** --temp / 2; -3 ** --temp % 2; diff --git a/tests/baselines/reference/emitExponentiationOperator2ES7.symbols b/tests/baselines/reference/emitExponentiationOperator2ES7.symbols deleted file mode 100644 index 0e0ce52a297..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator2ES7.symbols +++ /dev/null @@ -1,152 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts === - -var temp = 10; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -++temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp++ ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp + temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp - temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp * temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp / temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp % temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp-- ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp++ ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp-- ** -temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp++ ** +temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp-- + temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp-- - temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp-- * temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp-- / temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -temp-- % temp ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp + 2 ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp - 2 ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp * 2 ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp / 2 ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - ---temp % 2 ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -++temp + 2 ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -++temp - 2 ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -++temp * 2 ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -++temp / 2 ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** ++temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** --temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** temp++; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** temp--; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** ++temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** --temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** temp++ ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** temp-- ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** ++temp + 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** ++temp - 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** ++temp * 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** ++temp / 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** ++temp % 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** --temp + 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** --temp - 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** --temp * 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** --temp / 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - -3 ** --temp % 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator2ES7.ts, 1, 3)) - diff --git a/tests/baselines/reference/emitExponentiationOperator2ES7.types b/tests/baselines/reference/emitExponentiationOperator2ES7.types deleted file mode 100644 index 73fe09c6d87..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator2ES7.types +++ /dev/null @@ -1,344 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts === - -var temp = 10; ->temp : number ->10 : number - -++temp ** 3; ->++temp ** 3 : number ->++temp : number ->temp : number ->3 : number - ---temp ** 3; ->--temp ** 3 : number ->--temp : number ->temp : number ->3 : number - -temp++ ** 3; ->temp++ ** 3 : number ->temp++ : number ->temp : number ->3 : number - -temp-- ** 3; ->temp-- ** 3 : number ->temp-- : number ->temp : number ->3 : number - ---temp + temp ** 3; ->--temp + temp ** 3 : number ->--temp : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - ---temp - temp ** 3; ->--temp - temp ** 3 : number ->--temp : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - ---temp * temp ** 3; ->--temp * temp ** 3 : number ->--temp : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - ---temp / temp ** 3; ->--temp / temp ** 3 : number ->--temp : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - ---temp % temp ** 3; ->--temp % temp ** 3 : number ->--temp : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - -temp-- ** 3; ->temp-- ** 3 : number ->temp-- : number ->temp : number ->3 : number - -temp++ ** 3; ->temp++ ** 3 : number ->temp++ : number ->temp : number ->3 : number - -temp-- ** -temp; ->temp-- ** -temp : number ->temp-- : number ->temp : number ->-temp : number ->temp : number - -temp++ ** +temp; ->temp++ ** +temp : number ->temp++ : number ->temp : number ->+temp : number ->temp : number - -temp-- + temp ** 3; ->temp-- + temp ** 3 : number ->temp-- : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - -temp-- - temp ** 3; ->temp-- - temp ** 3 : number ->temp-- : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - -temp-- * temp ** 3; ->temp-- * temp ** 3 : number ->temp-- : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - -temp-- / temp ** 3; ->temp-- / temp ** 3 : number ->temp-- : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - -temp-- % temp ** 3; ->temp-- % temp ** 3 : number ->temp-- : number ->temp : number ->temp ** 3 : number ->temp : number ->3 : number - ---temp + 2 ** 3; ->--temp + 2 ** 3 : number ->--temp : number ->temp : number ->2 ** 3 : number ->2 : number ->3 : number - ---temp - 2 ** 3; ->--temp - 2 ** 3 : number ->--temp : number ->temp : number ->2 ** 3 : number ->2 : number ->3 : number - ---temp * 2 ** 3; ->--temp * 2 ** 3 : number ->--temp : number ->temp : number ->2 ** 3 : number ->2 : number ->3 : number - ---temp / 2 ** 3; ->--temp / 2 ** 3 : number ->--temp : number ->temp : number ->2 ** 3 : number ->2 : number ->3 : number - ---temp % 2 ** 3; ->--temp % 2 ** 3 : number ->--temp : number ->temp : number ->2 ** 3 : number ->2 : number ->3 : number - -++temp + 2 ** 3; ->++temp + 2 ** 3 : number ->++temp : number ->temp : number ->2 ** 3 : number ->2 : number ->3 : number - -++temp - 2 ** 3; ->++temp - 2 ** 3 : number ->++temp : number ->temp : number ->2 ** 3 : number ->2 : number ->3 : number - -++temp * 2 ** 3; ->++temp * 2 ** 3 : number ->++temp : number ->temp : number ->2 ** 3 : number ->2 : number ->3 : number - -++temp / 2 ** 3; ->++temp / 2 ** 3 : number ->++temp : number ->temp : number ->2 ** 3 : number ->2 : number ->3 : number - -3 ** ++temp; ->3 ** ++temp : number ->3 : number ->++temp : number ->temp : number - -3 ** --temp; ->3 ** --temp : number ->3 : number ->--temp : number ->temp : number - -3 ** temp++; ->3 ** temp++ : number ->3 : number ->temp++ : number ->temp : number - -3 ** temp--; ->3 ** temp-- : number ->3 : number ->temp-- : number ->temp : number - -3 ** ++temp ** 2; ->3 ** ++temp ** 2 : number ->3 : number ->++temp ** 2 : number ->++temp : number ->temp : number ->2 : number - -3 ** --temp ** 2; ->3 ** --temp ** 2 : number ->3 : number ->--temp ** 2 : number ->--temp : number ->temp : number ->2 : number - -3 ** temp++ ** 2; ->3 ** temp++ ** 2 : number ->3 : number ->temp++ ** 2 : number ->temp++ : number ->temp : number ->2 : number - -3 ** temp-- ** 2; ->3 ** temp-- ** 2 : number ->3 : number ->temp-- ** 2 : number ->temp-- : number ->temp : number ->2 : number - -3 ** ++temp + 2; ->3 ** ++temp + 2 : number ->3 ** ++temp : number ->3 : number ->++temp : number ->temp : number ->2 : number - -3 ** ++temp - 2; ->3 ** ++temp - 2 : number ->3 ** ++temp : number ->3 : number ->++temp : number ->temp : number ->2 : number - -3 ** ++temp * 2; ->3 ** ++temp * 2 : number ->3 ** ++temp : number ->3 : number ->++temp : number ->temp : number ->2 : number - -3 ** ++temp / 2; ->3 ** ++temp / 2 : number ->3 ** ++temp : number ->3 : number ->++temp : number ->temp : number ->2 : number - -3 ** ++temp % 2; ->3 ** ++temp % 2 : number ->3 ** ++temp : number ->3 : number ->++temp : number ->temp : number ->2 : number - -3 ** --temp + 2; ->3 ** --temp + 2 : number ->3 ** --temp : number ->3 : number ->--temp : number ->temp : number ->2 : number - -3 ** --temp - 2; ->3 ** --temp - 2 : number ->3 ** --temp : number ->3 : number ->--temp : number ->temp : number ->2 : number - -3 ** --temp * 2; ->3 ** --temp * 2 : number ->3 ** --temp : number ->3 : number ->--temp : number ->temp : number ->2 : number - -3 ** --temp / 2; ->3 ** --temp / 2 : number ->3 ** --temp : number ->3 : number ->--temp : number ->temp : number ->2 : number - -3 ** --temp % 2; ->3 ** --temp % 2 : number ->3 ** --temp : number ->3 : number ->--temp : number ->temp : number ->2 : number - diff --git a/tests/baselines/reference/emitExponentiationOperator3ES7.js b/tests/baselines/reference/emitExponentiationOperator3ES7.js deleted file mode 100644 index 5d556c7f20e..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator3ES7.js +++ /dev/null @@ -1,78 +0,0 @@ -//// [emitExponentiationOperator3ES7.ts] - -var temp = 10; - -(-++temp) ** 3; -(+--temp) ** 3; -(-temp++) ** 3; -(+temp--) ** 3; -(-(1 ** ++temp)) ** 3; -(-(1 ** --temp)) ** 3; -(-(1 ** temp++)) ** 3; -(-(1 ** temp--)) ** 3; - -(-3) ** temp++; -(-3) ** temp--; -(-3) ** ++temp; -(-3) ** --temp; -(+3) ** temp++; -(+3) ** temp--; -(+3) ** ++temp; -(+3) ** --temp; -(-3) ** temp++ ** 2; -(-3) ** temp-- ** 2; -(-3) ** ++temp ** 2; -(-3) ** --temp ** 2; -(+3) ** temp++ ** 2; -(+3) ** temp-- ** 2; -(+3) ** ++temp ** 2; -(+3) ** --temp ** 2; - -3 ** -temp++; -3 ** -temp--; -3 ** -++temp; -3 ** +--temp; -3 ** (-temp++) ** 2; -3 ** (-temp--) ** 2; -3 ** (+temp++) ** 2; -3 ** (+temp--) ** 2; -3 ** (-++temp) ** 2; -3 ** (+--temp) ** 2; - - -//// [emitExponentiationOperator3ES7.js] -var temp = 10; -(-++temp) ** 3; -(+--temp) ** 3; -(-temp++) ** 3; -(+temp--) ** 3; -(-(1 ** ++temp)) ** 3; -(-(1 ** --temp)) ** 3; -(-(1 ** temp++)) ** 3; -(-(1 ** temp--)) ** 3; -(-3) ** temp++; -(-3) ** temp--; -(-3) ** ++temp; -(-3) ** --temp; -(+3) ** temp++; -(+3) ** temp--; -(+3) ** ++temp; -(+3) ** --temp; -(-3) ** temp++ ** 2; -(-3) ** temp-- ** 2; -(-3) ** ++temp ** 2; -(-3) ** --temp ** 2; -(+3) ** temp++ ** 2; -(+3) ** temp-- ** 2; -(+3) ** ++temp ** 2; -(+3) ** --temp ** 2; -3 ** -temp++; -3 ** -temp--; -3 ** -++temp; -3 ** +--temp; -3 ** (-temp++) ** 2; -3 ** (-temp--) ** 2; -3 ** (+temp++) ** 2; -3 ** (+temp--) ** 2; -3 ** (-++temp) ** 2; -3 ** (+--temp) ** 2; diff --git a/tests/baselines/reference/emitExponentiationOperator3ES7.symbols b/tests/baselines/reference/emitExponentiationOperator3ES7.symbols deleted file mode 100644 index cd668fcf8b7..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator3ES7.symbols +++ /dev/null @@ -1,107 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts === - -var temp = 10; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-++temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+--temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-temp++) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+temp--) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-(1 ** ++temp)) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-(1 ** --temp)) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-(1 ** temp++)) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-(1 ** temp--)) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-3) ** temp++; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-3) ** temp--; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-3) ** ++temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-3) ** --temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+3) ** temp++; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+3) ** temp--; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+3) ** ++temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+3) ** --temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-3) ** temp++ ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-3) ** temp-- ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-3) ** ++temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(-3) ** --temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+3) ** temp++ ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+3) ** temp-- ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+3) ** ++temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -(+3) ** --temp ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** -temp++; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** -temp--; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** -++temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** +--temp; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** (-temp++) ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** (-temp--) ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** (+temp++) ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** (+temp--) ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** (-++temp) ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - -3 ** (+--temp) ** 2; ->temp : Symbol(temp, Decl(emitExponentiationOperator3ES7.ts, 1, 3)) - diff --git a/tests/baselines/reference/emitExponentiationOperator3ES7.types b/tests/baselines/reference/emitExponentiationOperator3ES7.types deleted file mode 100644 index 0585b282b0f..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator3ES7.types +++ /dev/null @@ -1,314 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts === - -var temp = 10; ->temp : number ->10 : number - -(-++temp) ** 3; ->(-++temp) ** 3 : number ->(-++temp) : number ->-++temp : number ->++temp : number ->temp : number ->3 : number - -(+--temp) ** 3; ->(+--temp) ** 3 : number ->(+--temp) : number ->+--temp : number ->--temp : number ->temp : number ->3 : number - -(-temp++) ** 3; ->(-temp++) ** 3 : number ->(-temp++) : number ->-temp++ : number ->temp++ : number ->temp : number ->3 : number - -(+temp--) ** 3; ->(+temp--) ** 3 : number ->(+temp--) : number ->+temp-- : number ->temp-- : number ->temp : number ->3 : number - -(-(1 ** ++temp)) ** 3; ->(-(1 ** ++temp)) ** 3 : number ->(-(1 ** ++temp)) : number ->-(1 ** ++temp) : number ->(1 ** ++temp) : number ->1 ** ++temp : number ->1 : number ->++temp : number ->temp : number ->3 : number - -(-(1 ** --temp)) ** 3; ->(-(1 ** --temp)) ** 3 : number ->(-(1 ** --temp)) : number ->-(1 ** --temp) : number ->(1 ** --temp) : number ->1 ** --temp : number ->1 : number ->--temp : number ->temp : number ->3 : number - -(-(1 ** temp++)) ** 3; ->(-(1 ** temp++)) ** 3 : number ->(-(1 ** temp++)) : number ->-(1 ** temp++) : number ->(1 ** temp++) : number ->1 ** temp++ : number ->1 : number ->temp++ : number ->temp : number ->3 : number - -(-(1 ** temp--)) ** 3; ->(-(1 ** temp--)) ** 3 : number ->(-(1 ** temp--)) : number ->-(1 ** temp--) : number ->(1 ** temp--) : number ->1 ** temp-- : number ->1 : number ->temp-- : number ->temp : number ->3 : number - -(-3) ** temp++; ->(-3) ** temp++ : number ->(-3) : number ->-3 : number ->3 : number ->temp++ : number ->temp : number - -(-3) ** temp--; ->(-3) ** temp-- : number ->(-3) : number ->-3 : number ->3 : number ->temp-- : number ->temp : number - -(-3) ** ++temp; ->(-3) ** ++temp : number ->(-3) : number ->-3 : number ->3 : number ->++temp : number ->temp : number - -(-3) ** --temp; ->(-3) ** --temp : number ->(-3) : number ->-3 : number ->3 : number ->--temp : number ->temp : number - -(+3) ** temp++; ->(+3) ** temp++ : number ->(+3) : number ->+3 : number ->3 : number ->temp++ : number ->temp : number - -(+3) ** temp--; ->(+3) ** temp-- : number ->(+3) : number ->+3 : number ->3 : number ->temp-- : number ->temp : number - -(+3) ** ++temp; ->(+3) ** ++temp : number ->(+3) : number ->+3 : number ->3 : number ->++temp : number ->temp : number - -(+3) ** --temp; ->(+3) ** --temp : number ->(+3) : number ->+3 : number ->3 : number ->--temp : number ->temp : number - -(-3) ** temp++ ** 2; ->(-3) ** temp++ ** 2 : number ->(-3) : number ->-3 : number ->3 : number ->temp++ ** 2 : number ->temp++ : number ->temp : number ->2 : number - -(-3) ** temp-- ** 2; ->(-3) ** temp-- ** 2 : number ->(-3) : number ->-3 : number ->3 : number ->temp-- ** 2 : number ->temp-- : number ->temp : number ->2 : number - -(-3) ** ++temp ** 2; ->(-3) ** ++temp ** 2 : number ->(-3) : number ->-3 : number ->3 : number ->++temp ** 2 : number ->++temp : number ->temp : number ->2 : number - -(-3) ** --temp ** 2; ->(-3) ** --temp ** 2 : number ->(-3) : number ->-3 : number ->3 : number ->--temp ** 2 : number ->--temp : number ->temp : number ->2 : number - -(+3) ** temp++ ** 2; ->(+3) ** temp++ ** 2 : number ->(+3) : number ->+3 : number ->3 : number ->temp++ ** 2 : number ->temp++ : number ->temp : number ->2 : number - -(+3) ** temp-- ** 2; ->(+3) ** temp-- ** 2 : number ->(+3) : number ->+3 : number ->3 : number ->temp-- ** 2 : number ->temp-- : number ->temp : number ->2 : number - -(+3) ** ++temp ** 2; ->(+3) ** ++temp ** 2 : number ->(+3) : number ->+3 : number ->3 : number ->++temp ** 2 : number ->++temp : number ->temp : number ->2 : number - -(+3) ** --temp ** 2; ->(+3) ** --temp ** 2 : number ->(+3) : number ->+3 : number ->3 : number ->--temp ** 2 : number ->--temp : number ->temp : number ->2 : number - -3 ** -temp++; ->3 ** -temp++ : number ->3 : number ->-temp++ : number ->temp++ : number ->temp : number - -3 ** -temp--; ->3 ** -temp-- : number ->3 : number ->-temp-- : number ->temp-- : number ->temp : number - -3 ** -++temp; ->3 ** -++temp : number ->3 : number ->-++temp : number ->++temp : number ->temp : number - -3 ** +--temp; ->3 ** +--temp : number ->3 : number ->+--temp : number ->--temp : number ->temp : number - -3 ** (-temp++) ** 2; ->3 ** (-temp++) ** 2 : number ->3 : number ->(-temp++) ** 2 : number ->(-temp++) : number ->-temp++ : number ->temp++ : number ->temp : number ->2 : number - -3 ** (-temp--) ** 2; ->3 ** (-temp--) ** 2 : number ->3 : number ->(-temp--) ** 2 : number ->(-temp--) : number ->-temp-- : number ->temp-- : number ->temp : number ->2 : number - -3 ** (+temp++) ** 2; ->3 ** (+temp++) ** 2 : number ->3 : number ->(+temp++) ** 2 : number ->(+temp++) : number ->+temp++ : number ->temp++ : number ->temp : number ->2 : number - -3 ** (+temp--) ** 2; ->3 ** (+temp--) ** 2 : number ->3 : number ->(+temp--) ** 2 : number ->(+temp--) : number ->+temp-- : number ->temp-- : number ->temp : number ->2 : number - -3 ** (-++temp) ** 2; ->3 ** (-++temp) ** 2 : number ->3 : number ->(-++temp) ** 2 : number ->(-++temp) : number ->-++temp : number ->++temp : number ->temp : number ->2 : number - -3 ** (+--temp) ** 2; ->3 ** (+--temp) ** 2 : number ->3 : number ->(+--temp) ** 2 : number ->(+--temp) : number ->+--temp : number ->--temp : number ->temp : number ->2 : number - diff --git a/tests/baselines/reference/emitExponentiationOperator4ES7.js b/tests/baselines/reference/emitExponentiationOperator4ES7.js deleted file mode 100644 index 2602fd2b8e6..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator4ES7.js +++ /dev/null @@ -1,70 +0,0 @@ -//// [emitExponentiationOperator4ES7.ts] -var temp: any; - -(temp) ** 3; -(--temp) ** 3; -(++temp) ** 3; -(temp--) ** 3; -(temp++) ** 3; - -1 ** (--temp) ** 3; -1 ** (++temp) ** 3; -1 ** (temp--) ** 3; -1 ** (temp++) ** 3; - -(void --temp) ** 3; -(void temp--) ** 3; -(void 3) ** 4; -(void temp++) ** 4; -(void temp--) ** 4; - - -1 ** (void --temp) ** 3; -1 ** (void temp--) ** 3; -1 ** (void 3) ** 4; -1 ** (void temp++) ** 4; -1 ** (void temp--) ** 4; - -(~ --temp) ** 3; -(~temp--) ** 3; -(~3) ** 4; -(~temp++) ** 4; -(~temp--) ** 4; - -1 ** (~ --temp) ** 3; -1 ** (~temp--) ** 3; -1 ** (~3) ** 4; -1 ** (~temp++) ** 4; -1 ** (~temp--) ** 4; - -//// [emitExponentiationOperator4ES7.js] -var temp; -temp ** 3; -(--temp) ** 3; -(++temp) ** 3; -(temp--) ** 3; -(temp++) ** 3; -1 ** (--temp) ** 3; -1 ** (++temp) ** 3; -1 ** (temp--) ** 3; -1 ** (temp++) ** 3; -(void --temp) ** 3; -(void temp--) ** 3; -(void 3) ** 4; -(void temp++) ** 4; -(void temp--) ** 4; -1 ** (void --temp) ** 3; -1 ** (void temp--) ** 3; -1 ** (void 3) ** 4; -1 ** (void temp++) ** 4; -1 ** (void temp--) ** 4; -(~--temp) ** 3; -(~temp--) ** 3; -(~3) ** 4; -(~temp++) ** 4; -(~temp--) ** 4; -1 ** (~--temp) ** 3; -1 ** (~temp--) ** 3; -1 ** (~3) ** 4; -1 ** (~temp++) ** 4; -1 ** (~temp--) ** 4; diff --git a/tests/baselines/reference/emitExponentiationOperator4ES7.symbols b/tests/baselines/reference/emitExponentiationOperator4ES7.symbols deleted file mode 100644 index d66e1379908..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator4ES7.symbols +++ /dev/null @@ -1,84 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts === -var temp: any; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(--temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(++temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(temp--) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(temp++) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (--temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (++temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (temp--) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (temp++) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(void --temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(void temp--) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(void 3) ** 4; -(void temp++) ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(void temp--) ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - - -1 ** (void --temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (void temp--) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (void 3) ** 4; -1 ** (void temp++) ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (void temp--) ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(~ --temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(~temp--) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(~3) ** 4; -(~temp++) ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -(~temp--) ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (~ --temp) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (~temp--) ** 3; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (~3) ** 4; -1 ** (~temp++) ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - -1 ** (~temp--) ** 4; ->temp : Symbol(temp, Decl(emitExponentiationOperator4ES7.ts, 0, 3)) - diff --git a/tests/baselines/reference/emitExponentiationOperator4ES7.types b/tests/baselines/reference/emitExponentiationOperator4ES7.types deleted file mode 100644 index 5449c898946..00000000000 --- a/tests/baselines/reference/emitExponentiationOperator4ES7.types +++ /dev/null @@ -1,260 +0,0 @@ -=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts === -var temp: any; ->temp : any - -(temp) ** 3; ->(temp) ** 3 : number ->(temp) : number ->temp : number ->temp : any ->3 : number - -(--temp) ** 3; ->(--temp) ** 3 : number ->(--temp) : number ->--temp : number ->--temp : number ->temp : any ->3 : number - -(++temp) ** 3; ->(++temp) ** 3 : number ->(++temp) : number ->++temp : number ->++temp : number ->temp : any ->3 : number - -(temp--) ** 3; ->(temp--) ** 3 : number ->(temp--) : number ->temp-- : number ->temp-- : number ->temp : any ->3 : number - -(temp++) ** 3; ->(temp++) ** 3 : number ->(temp++) : number ->temp++ : number ->temp++ : number ->temp : any ->3 : number - -1 ** (--temp) ** 3; ->1 ** (--temp) ** 3 : number ->1 : number ->(--temp) ** 3 : number ->(--temp) : number ->--temp : number ->--temp : number ->temp : any ->3 : number - -1 ** (++temp) ** 3; ->1 ** (++temp) ** 3 : number ->1 : number ->(++temp) ** 3 : number ->(++temp) : number ->++temp : number ->++temp : number ->temp : any ->3 : number - -1 ** (temp--) ** 3; ->1 ** (temp--) ** 3 : number ->1 : number ->(temp--) ** 3 : number ->(temp--) : number ->temp-- : number ->temp-- : number ->temp : any ->3 : number - -1 ** (temp++) ** 3; ->1 ** (temp++) ** 3 : number ->1 : number ->(temp++) ** 3 : number ->(temp++) : number ->temp++ : number ->temp++ : number ->temp : any ->3 : number - -(void --temp) ** 3; ->(void --temp) ** 3 : number ->(void --temp) : undefined ->void --temp : undefined ->--temp : number ->temp : any ->3 : number - -(void temp--) ** 3; ->(void temp--) ** 3 : number ->(void temp--) : undefined ->void temp-- : undefined ->temp-- : number ->temp : any ->3 : number - -(void 3) ** 4; ->(void 3) ** 4 : number ->(void 3) : undefined ->void 3 : undefined ->3 : number ->4 : number - -(void temp++) ** 4; ->(void temp++) ** 4 : number ->(void temp++) : undefined ->void temp++ : undefined ->temp++ : number ->temp : any ->4 : number - -(void temp--) ** 4; ->(void temp--) ** 4 : number ->(void temp--) : undefined ->void temp-- : undefined ->temp-- : number ->temp : any ->4 : number - - -1 ** (void --temp) ** 3; ->1 ** (void --temp) ** 3 : number ->1 : number ->(void --temp) ** 3 : number ->(void --temp) : undefined ->void --temp : undefined ->--temp : number ->temp : any ->3 : number - -1 ** (void temp--) ** 3; ->1 ** (void temp--) ** 3 : number ->1 : number ->(void temp--) ** 3 : number ->(void temp--) : undefined ->void temp-- : undefined ->temp-- : number ->temp : any ->3 : number - -1 ** (void 3) ** 4; ->1 ** (void 3) ** 4 : number ->1 : number ->(void 3) ** 4 : number ->(void 3) : undefined ->void 3 : undefined ->3 : number ->4 : number - -1 ** (void temp++) ** 4; ->1 ** (void temp++) ** 4 : number ->1 : number ->(void temp++) ** 4 : number ->(void temp++) : undefined ->void temp++ : undefined ->temp++ : number ->temp : any ->4 : number - -1 ** (void temp--) ** 4; ->1 ** (void temp--) ** 4 : number ->1 : number ->(void temp--) ** 4 : number ->(void temp--) : undefined ->void temp-- : undefined ->temp-- : number ->temp : any ->4 : number - -(~ --temp) ** 3; ->(~ --temp) ** 3 : number ->(~ --temp) : number ->~ --temp : number ->--temp : number ->temp : any ->3 : number - -(~temp--) ** 3; ->(~temp--) ** 3 : number ->(~temp--) : number ->~temp-- : number ->temp-- : number ->temp : any ->3 : number - -(~3) ** 4; ->(~3) ** 4 : number ->(~3) : number ->~3 : number ->3 : number ->4 : number - -(~temp++) ** 4; ->(~temp++) ** 4 : number ->(~temp++) : number ->~temp++ : number ->temp++ : number ->temp : any ->4 : number - -(~temp--) ** 4; ->(~temp--) ** 4 : number ->(~temp--) : number ->~temp-- : number ->temp-- : number ->temp : any ->4 : number - -1 ** (~ --temp) ** 3; ->1 ** (~ --temp) ** 3 : number ->1 : number ->(~ --temp) ** 3 : number ->(~ --temp) : number ->~ --temp : number ->--temp : number ->temp : any ->3 : number - -1 ** (~temp--) ** 3; ->1 ** (~temp--) ** 3 : number ->1 : number ->(~temp--) ** 3 : number ->(~temp--) : number ->~temp-- : number ->temp-- : number ->temp : any ->3 : number - -1 ** (~3) ** 4; ->1 ** (~3) ** 4 : number ->1 : number ->(~3) ** 4 : number ->(~3) : number ->~3 : number ->3 : number ->4 : number - -1 ** (~temp++) ** 4; ->1 ** (~temp++) ** 4 : number ->1 : number ->(~temp++) ** 4 : number ->(~temp++) : number ->~temp++ : number ->temp++ : number ->temp : any ->4 : number - -1 ** (~temp--) ** 4; ->1 ** (~temp--) ** 4 : number ->1 : number ->(~temp--) ** 4 : number ->(~temp--) : number ->~temp-- : number ->temp-- : number ->temp : any ->4 : number - diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt index 2864da4a7f3..af17a7ddf7a 100644 --- a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt @@ -74,11 +74,11 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,6): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS17006: An unary expression with the '!' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(64,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(65,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(66,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(67,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(68,1): error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(64,1): error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(65,1): error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(66,1): error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(67,1): error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(68,1): error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts (81 errors) ==== @@ -299,16 +299,16 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE temp ** 3; ~~~~~~~~~~~~ -!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ++temp ** 3; ~~~~~~~~~~~~~~ -!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. --temp ** 3; ~~~~~~~~~~~~~~ -!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. temp++ ** 3; ~~~~~~~~~~~~~~ -!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. +!!! error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. temp-- ** 3; ~~~~~~~~~~~~~~ -!!! error TS17006: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file +!!! error TS17007: A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts deleted file mode 100644 index ca2514b53f9..00000000000 --- a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1ES7.ts +++ /dev/null @@ -1,22 +0,0 @@ -// @target: es7 - -var comp: number; - -comp **= 1; -comp **= comp ** comp; -comp **= comp ** comp ** 2; -comp **= comp ** comp + 2; -comp **= comp ** comp - 2; -comp **= comp ** comp * 2; -comp **= comp ** comp / 2; -comp **= comp ** comp % 2; -comp **= (comp - 2) ** 5; -comp **= (comp + 2) ** 5; -comp **= (comp * 2) ** 5; -comp **= (comp / 2) ** 5; -comp **= (comp % 2) ** 5; -comp **= comp ** (5 + 2); -comp **= comp ** (5 - 2); -comp **= comp ** (5 * 2); -comp **= comp ** (5 / 2); -comp **= comp ** (5 % 2); \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts deleted file mode 100644 index 4cc1a29a5f7..00000000000 --- a/tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2ES7.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @target:es7 - -var comp: number; - -comp **= 1; -comp **= comp **= 1; -comp **= comp **= 1 + 2; -comp **= comp **= 1 - 2; -comp **= comp **= 1 * 2; -comp **= comp **= 1 / 2; - -comp **= comp **= (1 + 2); -comp **= comp **= (1 - 2); -comp **= comp **= (1 * 2); -comp **= comp **= (1 / 2); - -comp **= comp **= 1 + 2 ** 3; -comp **= comp **= 1 - 2 ** 4; -comp **= comp **= 1 * 2 ** 5; -comp **= comp **= 1 / 2 ** 6; - -comp **= comp **= (1 + 2) ** 3; -comp **= comp **= (1 - 2) ** 4; -comp **= comp **= (1 * 2) ** 5; -comp **= comp **= (1 / 2) ** 6; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts deleted file mode 100644 index f99051f6500..00000000000 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1ES7.ts +++ /dev/null @@ -1,33 +0,0 @@ -// @target: es7 - -1 ** -2; -1 ** 2; -(-1) ** 2 -1 ** 2 ** 3; -1 ** 2 ** -3; -1 ** -(2 ** 3); -(-(1 ** 2)) ** 3; -(-(1 ** 2)) ** -3; - -1 ** 2 + 3; -1 ** 2 - 3; -1 ** 2 * 3; -1 ** 2 / 3; -1 ** 2 % 3; - -1 ** -2 + 3; -1 ** -2 - 3; -1 ** -2 * 3; -1 ** -2 / 3; -1 ** -2 % 3; - -2 + 3 ** 3; -2 - 3 ** 3; -2 * 3 ** 3; -2 / 3 ** 3; -2 % 3 ** 3; - -(2 + 3) ** 4; -(2 - 3) ** 4; -(2 * 3) ** 4; -(2 / 3) ** 4; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts deleted file mode 100644 index f5429d1ddd5..00000000000 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2ES7.ts +++ /dev/null @@ -1,56 +0,0 @@ -// @target:es7 - -var temp = 10; - -++temp ** 3; ---temp ** 3; -temp++ ** 3; -temp-- ** 3; ---temp + temp ** 3; ---temp - temp ** 3; ---temp * temp ** 3; ---temp / temp ** 3; ---temp % temp ** 3; -temp-- ** 3; -temp++ ** 3; -temp-- ** -temp; -temp++ ** +temp; - -temp-- + temp ** 3; -temp-- - temp ** 3; -temp-- * temp ** 3; -temp-- / temp ** 3; -temp-- % temp ** 3; - ---temp + 2 ** 3; ---temp - 2 ** 3; ---temp * 2 ** 3; ---temp / 2 ** 3; ---temp % 2 ** 3; - -++temp + 2 ** 3; -++temp - 2 ** 3; -++temp * 2 ** 3; -++temp / 2 ** 3; - -3 ** ++temp; -3 ** --temp; -3 ** temp++; -3 ** temp--; - -3 ** ++temp ** 2; -3 ** --temp ** 2; -3 ** temp++ ** 2; -3 ** temp-- ** 2; - -3 ** ++temp + 2; -3 ** ++temp - 2; -3 ** ++temp * 2; -3 ** ++temp / 2; -3 ** ++temp % 2; - -3 ** --temp + 2; -3 ** --temp - 2; -3 ** --temp * 2; -3 ** --temp / 2; -3 ** --temp % 2; \ No newline at end of file diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts deleted file mode 100644 index 8ebe25e9be1..00000000000 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3ES7.ts +++ /dev/null @@ -1,40 +0,0 @@ -// @target:es7 - -var temp = 10; - -(-++temp) ** 3; -(+--temp) ** 3; -(-temp++) ** 3; -(+temp--) ** 3; -(-(1 ** ++temp)) ** 3; -(-(1 ** --temp)) ** 3; -(-(1 ** temp++)) ** 3; -(-(1 ** temp--)) ** 3; - -(-3) ** temp++; -(-3) ** temp--; -(-3) ** ++temp; -(-3) ** --temp; -(+3) ** temp++; -(+3) ** temp--; -(+3) ** ++temp; -(+3) ** --temp; -(-3) ** temp++ ** 2; -(-3) ** temp-- ** 2; -(-3) ** ++temp ** 2; -(-3) ** --temp ** 2; -(+3) ** temp++ ** 2; -(+3) ** temp-- ** 2; -(+3) ** ++temp ** 2; -(+3) ** --temp ** 2; - -3 ** -temp++; -3 ** -temp--; -3 ** -++temp; -3 ** +--temp; -3 ** (-temp++) ** 2; -3 ** (-temp--) ** 2; -3 ** (+temp++) ** 2; -3 ** (+temp--) ** 2; -3 ** (-++temp) ** 2; -3 ** (+--temp) ** 2; diff --git a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts b/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts deleted file mode 100644 index 6da1f54b701..00000000000 --- a/tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4ES7.ts +++ /dev/null @@ -1,38 +0,0 @@ -// @target: es7 -var temp: any; - -(temp) ** 3; -(--temp) ** 3; -(++temp) ** 3; -(temp--) ** 3; -(temp++) ** 3; - -1 ** (--temp) ** 3; -1 ** (++temp) ** 3; -1 ** (temp--) ** 3; -1 ** (temp++) ** 3; - -(void --temp) ** 3; -(void temp--) ** 3; -(void 3) ** 4; -(void temp++) ** 4; -(void temp--) ** 4; - - -1 ** (void --temp) ** 3; -1 ** (void temp--) ** 3; -1 ** (void 3) ** 4; -1 ** (void temp++) ** 4; -1 ** (void temp--) ** 4; - -(~ --temp) ** 3; -(~temp--) ** 3; -(~3) ** 4; -(~temp++) ** 4; -(~temp--) ** 4; - -1 ** (~ --temp) ** 3; -1 ** (~temp--) ** 3; -1 ** (~3) ** 4; -1 ** (~temp++) ** 4; -1 ** (~temp--) ** 4; \ No newline at end of file From 1fc11aa18f4e8103b344492cba06b18e296b0401 Mon Sep 17 00:00:00 2001 From: Yui T Date: Thu, 8 Oct 2015 23:25:05 -0700 Subject: [PATCH 091/121] Address PR feedback, add comment --- src/compiler/emitter.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index a4ff544a132..2ebfe367d3c 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2591,6 +2591,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } else { emit(node.left); + // Add indentation before emit the operator if the operator is on different line + // For example: + // 3 + // + 2; + // emitted as + // 3 + // + 2; let indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== SyntaxKind.CommaToken ? " " : undefined); write(tokenToString(node.operatorToken.kind)); let indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); From 3d6398162e1fe19d7d8da6d17f6eb98ba9998212 Mon Sep 17 00:00:00 2001 From: jbondc Date: Fri, 9 Oct 2015 11:16:36 -0400 Subject: [PATCH 092/121] Typo --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d6e5a73d146..228b1067bb0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -9751,7 +9751,7 @@ namespace ts { return !symbol || symbol === unknownSymbol || (symbol.flags & ~SymbolFlags.EnumMember) !== 0; } case SyntaxKind.ElementAccessExpression: - // old compiler doesn't check indexed assess + // old compiler doesn't check indexed access return true; case SyntaxKind.ParenthesizedExpression: return isReferenceOrErrorExpression((n).expression); From f19a2f54ed9186d866350d53ed6341d95645c869 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Fri, 9 Oct 2015 09:02:42 -0700 Subject: [PATCH 093/121] Fixup comments --- src/compiler/checker.ts | 2 +- src/services/services.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 24b9f1651ac..7027cbd7568 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7978,7 +7978,7 @@ namespace ts { } // An instance property must be accessed through an instance of the enclosing class if (type.flags & TypeFlags.ThisType) { - // get the original type -- represented as the type constraint of the this type + // get the original type -- represented as the type constraint of the 'this' type type = getConstraintOfTypeParameter(type); } diff --git a/src/services/services.ts b/src/services/services.ts index 5a8241a5c45..b707afa9ab5 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -4106,7 +4106,8 @@ namespace ts { let allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { - // Get the first signature if there + // Get the first signature if there is one -- allSignatures may contain + // either the original signature or its target, so check for either signature = allSignatures.length ? allSignatures[0] : undefined; } From a556209b7e68306bcb9faaa36ac57e0624e3ca8e Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Fri, 9 Oct 2015 09:55:25 -0700 Subject: [PATCH 094/121] addressed PR feedback --- src/compiler/checker.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- .../shorthandPropertyAssignmentsInDestructuring.errors.txt | 4 ++-- ...shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ece6860e5b2..2ede84062ce 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -15477,7 +15477,7 @@ namespace ts { if (prop.kind === SyntaxKind.ShorthandPropertyAssignment && !inDestructuring && (prop).objectAssignmentInitializer) { // having objectAssignmentInitializer is only valid in ObjectAssignmentPattern // outside of destructuring it is a syntax error - return grammarErrorOnNode((prop).equalsToken, Diagnostics.can_only_be_used_in_object_literal_properties_inside_destructuring_assignment); + return grammarErrorOnNode((prop).equalsToken, Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment); } // ECMA-262 11.1.5 Object Initialiser diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index a41d5d99005..ae54fda8496 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -800,7 +800,7 @@ "category": "Error", "code": 1311 }, - "'=' can only be used in object literal properties inside destructuring assignment.": { + "'=' can only be used in an object literal property inside a destructuring assignment.": { "category": "Error", "code": 1312 }, diff --git a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt index 844078cd8f1..7ac5fe9a26c 100644 --- a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt +++ b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring.errors.txt @@ -13,7 +13,7 @@ tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(87,19): erro Types of property 'x' are incompatible. Type 'number' is not assignable to type 'string'. tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(113,12): error TS2304: Cannot find name 's'. -tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(113,14): error TS1312: '=' can only be used in object literal properties inside destructuring assignment. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(113,14): error TS1312: '=' can only be used in an object literal property inside a destructuring assignment. ==== tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts (12 errors) ==== @@ -157,7 +157,7 @@ tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring.ts(113,14): err ~ !!! error TS2304: Cannot find name 's'. ~ -!!! error TS1312: '=' can only be used in object literal properties inside destructuring assignment. +!!! error TS1312: '=' can only be used in an object literal property inside a destructuring assignment. }); function foo({a = 4, b = { x: 5 }}) { diff --git a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt index 208a8798c39..7e6b6b35d7f 100644 --- a/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt +++ b/tests/baselines/reference/shorthandPropertyAssignmentsInDestructuring_ES6.errors.txt @@ -13,7 +13,7 @@ tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(87,19): Types of property 'x' are incompatible. Type 'number' is not assignable to type 'string'. tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(113,12): error TS2304: Cannot find name 's'. -tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(113,14): error TS1312: '=' can only be used in object literal properties inside destructuring assignment. +tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(113,14): error TS1312: '=' can only be used in an object literal property inside a destructuring assignment. ==== tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts (12 errors) ==== @@ -157,7 +157,7 @@ tests/cases/compiler/shorthandPropertyAssignmentsInDestructuring_ES6.ts(113,14): ~ !!! error TS2304: Cannot find name 's'. ~ -!!! error TS1312: '=' can only be used in object literal properties inside destructuring assignment. +!!! error TS1312: '=' can only be used in an object literal property inside a destructuring assignment. }); function foo({a = 4, b = { x: 5 }}) { From 69ff6f50903aee59cd0aade2ad67558e599976ca Mon Sep 17 00:00:00 2001 From: Martin Vseticka Date: Fri, 2 Oct 2015 21:54:32 +0200 Subject: [PATCH 095/121] Add "A module cannot have multiple default exports." message for multiple "default" exports --- src/compiler/binder.ts | 10 +++++++- src/compiler/diagnosticMessages.json | 4 ++++ .../reference/defaultExportWithOverloads01.js | 16 +++++++++++++ .../defaultExportWithOverloads01.symbols | 13 +++++++++++ .../defaultExportWithOverloads01.types | 13 +++++++++++ .../multipleDefaultExports01.errors.txt | 12 +++++----- .../multipleDefaultExports03.errors.txt | 15 ++++++++++++ .../reference/multipleDefaultExports03.js | 23 +++++++++++++++++++ .../multipleDefaultExports04.errors.txt | 15 ++++++++++++ .../reference/multipleDefaultExports04.js | 17 ++++++++++++++ .../modules/defaultExportWithOverloads01.ts | 7 ++++++ .../es6/modules/multipleDefaultExports03.ts | 8 +++++++ .../es6/modules/multipleDefaultExports04.ts | 8 +++++++ 13 files changed, 154 insertions(+), 7 deletions(-) create mode 100644 tests/baselines/reference/defaultExportWithOverloads01.js create mode 100644 tests/baselines/reference/defaultExportWithOverloads01.symbols create mode 100644 tests/baselines/reference/defaultExportWithOverloads01.types create mode 100644 tests/baselines/reference/multipleDefaultExports03.errors.txt create mode 100644 tests/baselines/reference/multipleDefaultExports03.js create mode 100644 tests/baselines/reference/multipleDefaultExports04.errors.txt create mode 100644 tests/baselines/reference/multipleDefaultExports04.js create mode 100644 tests/cases/conformance/es6/modules/defaultExportWithOverloads01.ts create mode 100644 tests/cases/conformance/es6/modules/multipleDefaultExports03.ts create mode 100644 tests/cases/conformance/es6/modules/multipleDefaultExports04.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 65768332360..c12a9afad62 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -185,8 +185,9 @@ namespace ts { function declareSymbol(symbolTable: SymbolTable, parent: Symbol, node: Declaration, includes: SymbolFlags, excludes: SymbolFlags): Symbol { Debug.assert(!hasDynamicName(node)); + let isDefaultExport = node.flags & NodeFlags.Default; // The exported symbol for an export default function/class node is always named "default" - let name = node.flags & NodeFlags.Default && parent ? "default" : getDeclarationName(node); + let name = isDefaultExport && parent ? "default" : getDeclarationName(node); let symbol: Symbol; if (name !== undefined) { @@ -227,6 +228,13 @@ namespace ts { let message = symbol.flags & SymbolFlags.BlockScopedVariable ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0; + + forEach(symbol.declarations, declaration => { + if (declaration.flags & NodeFlags.Default) { + message = Diagnostics.A_module_cannot_have_multiple_default_exports; + } + }); + forEach(symbol.declarations, declaration => { file.bindDiagnostics.push(createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); }); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index f6656edb250..22b65b58111 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1656,6 +1656,10 @@ "category": "Error", "code": 2527 }, + "A module cannot have multiple default exports.": { + "category": "Error", + "code": 2528 + }, "JSX element attributes type '{0}' must be an object type.": { "category": "Error", "code": 2600 diff --git a/tests/baselines/reference/defaultExportWithOverloads01.js b/tests/baselines/reference/defaultExportWithOverloads01.js new file mode 100644 index 00000000000..9ec8cccf5bf --- /dev/null +++ b/tests/baselines/reference/defaultExportWithOverloads01.js @@ -0,0 +1,16 @@ +//// [defaultExportWithOverloads01.ts] + +export default function f(); +export default function f(x: string); +export default function f(...args: any[]) { +} + +//// [defaultExportWithOverloads01.js] +function f() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i - 0] = arguments[_i]; + } +} +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = f; diff --git a/tests/baselines/reference/defaultExportWithOverloads01.symbols b/tests/baselines/reference/defaultExportWithOverloads01.symbols new file mode 100644 index 00000000000..a5ff0df5262 --- /dev/null +++ b/tests/baselines/reference/defaultExportWithOverloads01.symbols @@ -0,0 +1,13 @@ +=== tests/cases/conformance/es6/modules/defaultExportWithOverloads01.ts === + +export default function f(); +>f : Symbol(f, Decl(defaultExportWithOverloads01.ts, 0, 0), Decl(defaultExportWithOverloads01.ts, 1, 28), Decl(defaultExportWithOverloads01.ts, 2, 37)) + +export default function f(x: string); +>f : Symbol(f, Decl(defaultExportWithOverloads01.ts, 0, 0), Decl(defaultExportWithOverloads01.ts, 1, 28), Decl(defaultExportWithOverloads01.ts, 2, 37)) +>x : Symbol(x, Decl(defaultExportWithOverloads01.ts, 2, 26)) + +export default function f(...args: any[]) { +>f : Symbol(f, Decl(defaultExportWithOverloads01.ts, 0, 0), Decl(defaultExportWithOverloads01.ts, 1, 28), Decl(defaultExportWithOverloads01.ts, 2, 37)) +>args : Symbol(args, Decl(defaultExportWithOverloads01.ts, 3, 26)) +} diff --git a/tests/baselines/reference/defaultExportWithOverloads01.types b/tests/baselines/reference/defaultExportWithOverloads01.types new file mode 100644 index 00000000000..c006083b4ba --- /dev/null +++ b/tests/baselines/reference/defaultExportWithOverloads01.types @@ -0,0 +1,13 @@ +=== tests/cases/conformance/es6/modules/defaultExportWithOverloads01.ts === + +export default function f(); +>f : { (): any; (x: string): any; } + +export default function f(x: string); +>f : { (): any; (x: string): any; } +>x : string + +export default function f(...args: any[]) { +>f : { (): any; (x: string): any; } +>args : any[] +} diff --git a/tests/baselines/reference/multipleDefaultExports01.errors.txt b/tests/baselines/reference/multipleDefaultExports01.errors.txt index 72898d474e8..16aa3b2f7b1 100644 --- a/tests/baselines/reference/multipleDefaultExports01.errors.txt +++ b/tests/baselines/reference/multipleDefaultExports01.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/es6/modules/m1.ts(2,22): error TS2300: Duplicate identifier 'foo'. -tests/cases/conformance/es6/modules/m1.ts(6,25): error TS2300: Duplicate identifier 'bar'. -tests/cases/conformance/es6/modules/m1.ts(11,1): error TS2300: Duplicate identifier 'default'. +tests/cases/conformance/es6/modules/m1.ts(2,22): error TS2528: A module cannot have multiple default exports. +tests/cases/conformance/es6/modules/m1.ts(6,25): error TS2528: A module cannot have multiple default exports. +tests/cases/conformance/es6/modules/m1.ts(11,1): error TS2528: A module cannot have multiple default exports. tests/cases/conformance/es6/modules/m2.ts(3,1): error TS2348: Value of type 'typeof foo' is not callable. Did you mean to include 'new'? @@ -8,20 +8,20 @@ tests/cases/conformance/es6/modules/m2.ts(3,1): error TS2348: Value of type 'typ export default class foo { ~~~ -!!! error TS2300: Duplicate identifier 'foo'. +!!! error TS2528: A module cannot have multiple default exports. } export default function bar() { ~~~ -!!! error TS2300: Duplicate identifier 'bar'. +!!! error TS2528: A module cannot have multiple default exports. } var x = 10; export default x; ~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'default'. +!!! error TS2528: A module cannot have multiple default exports. ==== tests/cases/conformance/es6/modules/m2.ts (1 errors) ==== import Entity from "./m1" diff --git a/tests/baselines/reference/multipleDefaultExports03.errors.txt b/tests/baselines/reference/multipleDefaultExports03.errors.txt new file mode 100644 index 00000000000..5c4b075b009 --- /dev/null +++ b/tests/baselines/reference/multipleDefaultExports03.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/es6/modules/multipleDefaultExports03.ts(2,22): error TS2528: A module cannot have multiple default exports. +tests/cases/conformance/es6/modules/multipleDefaultExports03.ts(5,22): error TS2528: A module cannot have multiple default exports. + + +==== tests/cases/conformance/es6/modules/multipleDefaultExports03.ts (2 errors) ==== + + export default class C { + ~ +!!! error TS2528: A module cannot have multiple default exports. + } + + export default class C { + ~ +!!! error TS2528: A module cannot have multiple default exports. + } \ No newline at end of file diff --git a/tests/baselines/reference/multipleDefaultExports03.js b/tests/baselines/reference/multipleDefaultExports03.js new file mode 100644 index 00000000000..2824c7a5ac1 --- /dev/null +++ b/tests/baselines/reference/multipleDefaultExports03.js @@ -0,0 +1,23 @@ +//// [multipleDefaultExports03.ts] + +export default class C { +} + +export default class C { +} + +//// [multipleDefaultExports03.js] +var C = (function () { + function C() { + } + return C; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = C; +var C = (function () { + function C() { + } + return C; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = C; diff --git a/tests/baselines/reference/multipleDefaultExports04.errors.txt b/tests/baselines/reference/multipleDefaultExports04.errors.txt new file mode 100644 index 00000000000..e67659f6b9f --- /dev/null +++ b/tests/baselines/reference/multipleDefaultExports04.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/es6/modules/multipleDefaultExports04.ts(2,25): error TS2393: Duplicate function implementation. +tests/cases/conformance/es6/modules/multipleDefaultExports04.ts(5,25): error TS2393: Duplicate function implementation. + + +==== tests/cases/conformance/es6/modules/multipleDefaultExports04.ts (2 errors) ==== + + export default function f() { + ~ +!!! error TS2393: Duplicate function implementation. + } + + export default function f() { + ~ +!!! error TS2393: Duplicate function implementation. + } \ No newline at end of file diff --git a/tests/baselines/reference/multipleDefaultExports04.js b/tests/baselines/reference/multipleDefaultExports04.js new file mode 100644 index 00000000000..73582d7389e --- /dev/null +++ b/tests/baselines/reference/multipleDefaultExports04.js @@ -0,0 +1,17 @@ +//// [multipleDefaultExports04.ts] + +export default function f() { +} + +export default function f() { +} + +//// [multipleDefaultExports04.js] +function f() { +} +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = f; +function f() { +} +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = f; diff --git a/tests/cases/conformance/es6/modules/defaultExportWithOverloads01.ts b/tests/cases/conformance/es6/modules/defaultExportWithOverloads01.ts new file mode 100644 index 00000000000..a6761600a1d --- /dev/null +++ b/tests/cases/conformance/es6/modules/defaultExportWithOverloads01.ts @@ -0,0 +1,7 @@ +// @module: commonjs +// @target: ES5 + +export default function f(); +export default function f(x: string); +export default function f(...args: any[]) { +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/modules/multipleDefaultExports03.ts b/tests/cases/conformance/es6/modules/multipleDefaultExports03.ts new file mode 100644 index 00000000000..f2fe7f1a6c3 --- /dev/null +++ b/tests/cases/conformance/es6/modules/multipleDefaultExports03.ts @@ -0,0 +1,8 @@ +// @module: commonjs +// @target: ES5 + +export default class C { +} + +export default class C { +} \ No newline at end of file diff --git a/tests/cases/conformance/es6/modules/multipleDefaultExports04.ts b/tests/cases/conformance/es6/modules/multipleDefaultExports04.ts new file mode 100644 index 00000000000..1dec7b8bea5 --- /dev/null +++ b/tests/cases/conformance/es6/modules/multipleDefaultExports04.ts @@ -0,0 +1,8 @@ +// @module: commonjs +// @target: ES5 + +export default function f() { +} + +export default function f() { +} \ No newline at end of file From 573652160cb1ae5be28cdc77cd049bbd3cc5764b Mon Sep 17 00:00:00 2001 From: Paul van Brenk Date: Fri, 9 Oct 2015 16:46:31 -0700 Subject: [PATCH 096/121] Merge pull request #5197 from Microsoft/supportIndentStyle Support different indentation styles --- src/harness/fourslash.ts | 19 ++- src/server/editorServices.ts | 2 +- src/server/session.ts | 1 + src/services/formatting/smartIndenter.ts | 32 +++- src/services/services.ts | 7 + tests/cases/fourslash/fourslash.ts | 11 +- tests/cases/fourslash/indentationBlock.ts | 183 ++++++++++++++++++++++ tests/cases/fourslash/indentationNone.ts | 183 ++++++++++++++++++++++ 8 files changed, 426 insertions(+), 12 deletions(-) create mode 100644 tests/cases/fourslash/indentationBlock.ts create mode 100644 tests/cases/fourslash/indentationNone.ts diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index a846077a85f..3a628bb62c1 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -100,6 +100,8 @@ namespace FourSlash { end: number; } + export import IndentStyle = ts.IndentStyle; + let entityMap: ts.Map = { "&": "&", "\"": """, @@ -309,6 +311,7 @@ namespace FourSlash { TabSize: 4, NewLineCharacter: Harness.IO.newLine(), ConvertTabsToSpaces: true, + IndentStyle: ts.IndentStyle.Smart, InsertSpaceAfterCommaDelimiter: true, InsertSpaceAfterSemicolonInForStatements: true, InsertSpaceBeforeAndAfterBinaryOperators: true, @@ -1695,24 +1698,28 @@ namespace FourSlash { } } - private getIndentation(fileName: string, position: number): number { - return this.languageService.getIndentationAtPosition(fileName, position, this.formatCodeOptions); + private getIndentation(fileName: string, position: number, indentStyle: ts.IndentStyle): number { + + let formatOptions = ts.clone(this.formatCodeOptions); + formatOptions.IndentStyle = indentStyle; + + return this.languageService.getIndentationAtPosition(fileName, position, formatOptions); } - public verifyIndentationAtCurrentPosition(numberOfSpaces: number) { + public verifyIndentationAtCurrentPosition(numberOfSpaces: number, indentStyle: ts.IndentStyle = ts.IndentStyle.Smart) { this.taoInvalidReason = "verifyIndentationAtCurrentPosition NYI"; - let actual = this.getIndentation(this.activeFile.fileName, this.currentCaretPosition); + let actual = this.getIndentation(this.activeFile.fileName, this.currentCaretPosition, indentStyle); let lineCol = this.getLineColStringAtPosition(this.currentCaretPosition); if (actual !== numberOfSpaces) { this.raiseError(`verifyIndentationAtCurrentPosition failed at ${lineCol} - expected: ${numberOfSpaces}, actual: ${actual}`); } } - public verifyIndentationAtPosition(fileName: string, position: number, numberOfSpaces: number) { + public verifyIndentationAtPosition(fileName: string, position: number, numberOfSpaces: number, indentStyle: ts.IndentStyle = ts.IndentStyle.Smart) { this.taoInvalidReason = "verifyIndentationAtPosition NYI"; - let actual = this.getIndentation(fileName, position); + let actual = this.getIndentation(fileName, position, indentStyle); let lineCol = this.getLineColStringAtPosition(position); if (actual !== numberOfSpaces) { this.raiseError(`verifyIndentationAtPosition failed at ${lineCol} - expected: ${numberOfSpaces}, actual: ${actual}`); diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 7ab46fc689e..436b97821cc 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -1177,6 +1177,7 @@ namespace ts.server { TabSize: 4, NewLineCharacter: ts.sys ? ts.sys.newLine : '\n', ConvertTabsToSpaces: true, + IndentStyle: ts.IndentStyle.Smart, InsertSpaceAfterCommaDelimiter: true, InsertSpaceAfterSemicolonInForStatements: true, InsertSpaceBeforeAndAfterBinaryOperators: true, @@ -1187,7 +1188,6 @@ namespace ts.server { PlaceOpenBraceOnNewLineForFunctions: false, PlaceOpenBraceOnNewLineForControlBlocks: false, } - } export interface LineCollection { diff --git a/src/server/session.ts b/src/server/session.ts index da044e7b4c6..f3d3826409e 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -606,6 +606,7 @@ namespace ts.server { TabSize: formatOptions.TabSize, NewLineCharacter: "\n", ConvertTabsToSpaces: formatOptions.ConvertTabsToSpaces, + IndentStyle: ts.IndentStyle.Smart, }; var indentPosition = compilerService.languageService.getIndentationAtPosition(file, position, editorOptions); diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 8035c963cf3..3b68cd0ebb2 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -13,6 +13,12 @@ namespace ts.formatting { return 0; // past EOF } + // no indentation when the indent style is set to none, + // so we can return fast + if (options.IndentStyle === IndentStyle.None) { + return 0; + } + let precedingToken = findPrecedingToken(position, sourceFile); if (!precedingToken) { return 0; @@ -26,6 +32,26 @@ namespace ts.formatting { let lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; + // indentation is first non-whitespace character in a previous line + // for block indentation, we should look for a line which contains something that's not + // whitespace. + if (options.IndentStyle === IndentStyle.Block) { + + // move backwards until we find a line with a non-whitespace character, + // then find the first non-whitespace character for that line. + let current = position; + while (current > 0){ + let char = sourceFile.text.charCodeAt(current); + if (!isWhiteSpace(char) && !isLineBreak(char)) { + break; + } + current--; + } + + let lineStart = ts.getLineStartPositionForPosition(current, sourceFile); + return SmartIndenter.findFirstNonWhitespaceColumn(lineStart, current, sourceFile, options); + } + if (precedingToken.kind === SyntaxKind.CommaToken && precedingToken.parent.kind !== SyntaxKind.BinaryExpression) { // previous token is comma that separates items in list - find the previous item and try to derive indentation from it let actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); @@ -218,7 +244,7 @@ namespace ts.formatting { function getStartLineAndCharacterForNode(n: Node, sourceFile: SourceFile): LineAndCharacter { return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } - + export function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: TextRangeWithKind, childStartLine: number, sourceFile: SourceFile): boolean { if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { let elseKeyword = findChildOfKind(parent, SyntaxKind.ElseKeyword, sourceFile); @@ -319,7 +345,7 @@ namespace ts.formatting { } return Value.Unknown; - + function getStartingExpression(node: PropertyAccessExpression | CallExpression | ElementAccessExpression) { while (true) { switch (node.kind) { @@ -465,4 +491,4 @@ namespace ts.formatting { } } } -} \ No newline at end of file +} diff --git a/src/services/services.ts b/src/services/services.ts index 9a6afb5f1e0..118c4ef3b7f 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1189,6 +1189,13 @@ namespace ts { TabSize: number; NewLineCharacter: string; ConvertTabsToSpaces: boolean; + IndentStyle: IndentStyle; + } + + export enum IndentStyle { + None = 0, + Block = 1, + Smart = 2, } export interface FormatCodeOptions extends EditorOptions { diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 42cfc1248b0..54e86786d14 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -68,6 +68,13 @@ enum EmitReturnStatus { EmitErrorsEncountered = 4 // Emitter errors occurred during emitting process } +// This is a duplicate of the indentstyle in services.ts to expose it to testcases in fourslash +enum IndentStyle { + None, + Block, + Smart, +} + module FourSlashInterface { export interface Marker { @@ -278,8 +285,8 @@ module FourSlashInterface { FourSlash.currentTestState.verifyIndentationAtCurrentPosition(numberOfSpaces); } - public indentationAtPositionIs(fileName: string, position: number, numberOfSpaces: number) { - FourSlash.currentTestState.verifyIndentationAtPosition(fileName, position, numberOfSpaces); + public indentationAtPositionIs(fileName: string, position: number, numberOfSpaces: number, indentStyle = IndentStyle.Smart) { + FourSlash.currentTestState.verifyIndentationAtPosition(fileName, position, numberOfSpaces, indentStyle); } public textAtCaretIs(text: string) { diff --git a/tests/cases/fourslash/indentationBlock.ts b/tests/cases/fourslash/indentationBlock.ts new file mode 100644 index 00000000000..e880c4a0957 --- /dev/null +++ b/tests/cases/fourslash/indentationBlock.ts @@ -0,0 +1,183 @@ +/// + +//// +////module classes { +////{| "indent": 0 |} +//// class Bar { +////{| "indent": 4 |} +//// +//// constructor() { +////{| "indent": 8 |} +//// } +//// +//// private foo: string = ""; +////{| "indent": 8 |} +//// +//// private f() { +//// var a: any[] = [[1, 2], [3, 4], 5]; +////{| "indent": 12 |} +//// return ((1 + 1)); +//// } +//// +////{| "indent": 8 |} +//// private f2() { +//// if (true) { } { }; +//// } +//// } +////} +//// +//// +////module interfaces { +////{| "indent": 0 |} +//// interface Foo { +////{| "indent": 4 |} +//// +//// x: number; +////{| "indent": 8 |} +//// +//// foo(): number; +////{| "indent": 8 |} +//// } +////} +//// +//// +////module nestedModules { +//// module Foo2 { +////{| "indent": 4 |} +//// function f() { +//// } +////{| "indent": 8 |} +//// var x: number; +////{| "indent": 8 |} +//// } +////} +//// +//// +////module Enums { +//// enum Foo3 { +////{| "indent": 4 |} +//// val1, +////{| "indent": 8 |} +//// val2, +////{| "indent": 8 |} +//// } +////{| "indent": 4 |} +////} +//// +//// +////function controlStatements() { +//// for (var i = 0; i < 10; i++) { +////{| "indent": 4 |} +//// } +//// +//// for (var e in foo.bar) { +////{| "indent": 4 |} +//// } +//// +//// with (foo.bar) { +////{| "indent": 4 |} +//// } +//// +//// while (false) { +////{| "indent": 4 |} +//// } +//// +//// do { +////{| "indent": 4 |} +//// } while (false); +//// +//// switch (foo.bar) { +////{| "indent": 4 |} +//// } +//// +//// switch (foo.bar) { +////{| "indent": 4 |} +//// case 1: +////{| "indent": 8 |} +//// break; +//// default: +////{| "indent": 8 |} +//// break; +//// } +////} +//// +//// +////function tryCatch() { +////{| "indent": 0 |} +//// try { +////{| "indent": 4 |} +//// } +////{| "indent": 4 |} +//// catch (err) { +////{| "indent": 4 |} +//// } +////{| "indent": 4 |} +////} +//// +//// +////function tryFinally() { +////{| "indent": 0 |} +//// try { +////{| "indent": 4 |} +//// } +////{| "indent": 4 |} +//// finally { +////{| "indent": 4 |} +//// } +////{| "indent": 4 |} +////} +//// +//// +////function tryCatchFinally() { +////{| "indent": 0 |} +//// try { +////{| "indent": 4 |} +//// } +////{| "indent": 4 |} +//// catch (err) { +////{| "indent": 4 |} +//// } +////{| "indent": 4 |} +//// finally { +////{| "indent": 4 |} +//// } +////{| "indent": 4 |} +////} +//// +//// +////class indentBeforeCurly +////{| "indent": 0 |} +////{| "indent": 0 |}{ +////{| "indent": 0 |} +////} +//// +//// +////function argumentsListIndentation(bar, +//// blah, +//// {| "indent": 13 |} +////); +//// +//// +////function blockIndentAfterIndentedParameter1(bar, +//// blah) { +////{| "indent": 13 |} +////} +//// +//// +////function blockIndentAfterIndentedParameter2(bar, +//// blah) { +//// if (foo) { +////{| "indent": 4 |} +//// } +////} +//// +//// +////// Note: Do not add more tests at the end of this file, as +////// the purpose of this test is to verity smart indent +////// works for unterminated function arguments at the end of a file. +////function unterminatedListIndentation(a, +////{| "indent": 0 |} + +test.markers().forEach(marker => { + verify.indentationAtPositionIs(marker.fileName, marker.position, marker.data.indent, IndentStyle.Block); +}); diff --git a/tests/cases/fourslash/indentationNone.ts b/tests/cases/fourslash/indentationNone.ts new file mode 100644 index 00000000000..078f5ab35f6 --- /dev/null +++ b/tests/cases/fourslash/indentationNone.ts @@ -0,0 +1,183 @@ +/// + +//// +////module classes { +////{| "indent": 0 |} +//// class Bar { +////{| "indent": 0 |} +//// +//// constructor() { +////{| "indent": 0 |} +//// } +//// +//// private foo: string = ""; +////{| "indent": 0 |} +//// +//// private f() { +//// var a: any[] = [[1, 2], [3, 4], 5]; +////{| "indent": 0 |} +//// return ((1 + 1)); +//// } +//// +////{| "indent": 0 |} +//// private f2() { +//// if (true) { } { }; +//// } +//// } +////} +//// +//// +////module interfaces { +////{| "indent": 0 |} +//// interface Foo { +////{| "indent": 0 |} +//// +//// x: number; +////{| "indent": 0 |} +//// +//// foo(): number; +////{| "indent": 0 |} +//// } +////} +//// +//// +////module nestedModules { +//// module Foo2 { +////{| "indent": 0 |} +//// function f() { +//// } +////{| "indent": 0 |} +//// var x: number; +////{| "indent": 0 |} +//// } +////} +//// +//// +////module Enums { +//// enum Foo3 { +////{| "indent": 0 |} +//// val1, +////{| "indent": 0 |} +//// val2, +////{| "indent": 0 |} +//// } +////{| "indent": 0 |} +////} +//// +//// +////function controlStatements() { +//// for (var i = 0; i < 10; i++) { +////{| "indent": 0 |} +//// } +//// +//// for (var e in foo.bar) { +////{| "indent": 0 |} +//// } +//// +//// with (foo.bar) { +////{| "indent": 0 |} +//// } +//// +//// while (false) { +////{| "indent": 0 |} +//// } +//// +//// do { +////{| "indent": 0 |} +//// } while (false); +//// +//// switch (foo.bar) { +////{| "indent": 0 |} +//// } +//// +//// switch (foo.bar) { +////{| "indent": 0 |} +//// case 1: +////{| "indent": 0 |} +//// break; +//// default: +////{| "indent": 0 |} +//// break; +//// } +////} +//// +//// +////function tryCatch() { +////{| "indent": 0 |} +//// try { +////{| "indent": 0 |} +//// } +////{| "indent": 0 |} +//// catch (err) { +////{| "indent": 0 |} +//// } +////{| "indent": 0 |} +////} +//// +//// +////function tryFinally() { +////{| "indent": 0 |} +//// try { +////{| "indent": 0 |} +//// } +////{| "indent": 0 |} +//// finally { +////{| "indent": 0 |} +//// } +////{| "indent": 0 |} +////} +//// +//// +////function tryCatchFinally() { +////{| "indent": 0 |} +//// try { +////{| "indent": 0 |} +//// } +////{| "indent": 0 |} +//// catch (err) { +////{| "indent": 0 |} +//// } +////{| "indent": 0 |} +//// finally { +////{| "indent": 0 |} +//// } +////{| "indent": 0 |} +////} +//// +//// +////class indentBeforeCurly +////{| "indent": 0 |} +////{| "indent": 0 |}{ +////{| "indent": 0 |} +////} +//// +//// +////function argumentsListIndentation(bar, +//// blah, +//// {| "indent": 0 |} +////); +//// +//// +////function blockIndentAfterIndentedParameter1(bar, +//// blah) { +////{| "indent": 0 |} +////} +//// +//// +////function blockIndentAfterIndentedParameter2(bar, +//// blah) { +//// if (foo) { +////{| "indent": 0 |} +//// } +////} +//// +//// +////// Note: Do not add more tests at the end of this file, as +////// the purpose of this test is to verity smart indent +////// works for unterminated function arguments at the end of a file. +////function unterminatedListIndentation(a, +////{| "indent": 0 |} + +test.markers().forEach(marker => { + verify.indentationAtPositionIs(marker.fileName, marker.position, marker.data.indent, IndentStyle.None); +}); From a0683276d183f85a1302d52a3a2a6bbc60663d25 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 11 Oct 2015 21:57:17 -0700 Subject: [PATCH 097/121] check functions in class expressions --- src/compiler/checker.ts | 1 + .../reference/functionsInClassExpressions.js | 25 +++++++++++++++ .../functionsInClassExpressions.symbols | 27 ++++++++++++++++ .../functionsInClassExpressions.types | 32 +++++++++++++++++++ .../compiler/functionsInClassExpressions.ts | 10 ++++++ 5 files changed, 95 insertions(+) create mode 100644 tests/baselines/reference/functionsInClassExpressions.js create mode 100644 tests/baselines/reference/functionsInClassExpressions.symbols create mode 100644 tests/baselines/reference/functionsInClassExpressions.types create mode 100644 tests/cases/compiler/functionsInClassExpressions.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d4ce6655a21..b65761eb80b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -13897,6 +13897,7 @@ namespace ts { break; case SyntaxKind.ClassExpression: forEach((node).members, checkSourceElement); + forEachChild(node, checkFunctionAndClassExpressionBodies); break; case SyntaxKind.MethodDeclaration: case SyntaxKind.MethodSignature: diff --git a/tests/baselines/reference/functionsInClassExpressions.js b/tests/baselines/reference/functionsInClassExpressions.js new file mode 100644 index 00000000000..debd8138831 --- /dev/null +++ b/tests/baselines/reference/functionsInClassExpressions.js @@ -0,0 +1,25 @@ +//// [functionsInClassExpressions.ts] +let Foo = class { + constructor() { + this.bar++; + } + bar = 0; + inc = () => { + this.bar++; + } + m() { return this.bar; } +} + +//// [functionsInClassExpressions.js] +var Foo = (function () { + function class_1() { + var _this = this; + this.bar = 0; + this.inc = function () { + _this.bar++; + }; + this.bar++; + } + class_1.prototype.m = function () { return this.bar; }; + return class_1; +})(); diff --git a/tests/baselines/reference/functionsInClassExpressions.symbols b/tests/baselines/reference/functionsInClassExpressions.symbols new file mode 100644 index 00000000000..a1da3a3175c --- /dev/null +++ b/tests/baselines/reference/functionsInClassExpressions.symbols @@ -0,0 +1,27 @@ +=== tests/cases/compiler/functionsInClassExpressions.ts === +let Foo = class { +>Foo : Symbol(Foo, Decl(functionsInClassExpressions.ts, 0, 3)) + + constructor() { + this.bar++; +>this.bar : Symbol((Anonymous class).bar, Decl(functionsInClassExpressions.ts, 3, 5)) +>this : Symbol((Anonymous class), Decl(functionsInClassExpressions.ts, 0, 9)) +>bar : Symbol((Anonymous class).bar, Decl(functionsInClassExpressions.ts, 3, 5)) + } + bar = 0; +>bar : Symbol((Anonymous class).bar, Decl(functionsInClassExpressions.ts, 3, 5)) + + inc = () => { +>inc : Symbol((Anonymous class).inc, Decl(functionsInClassExpressions.ts, 4, 12)) + + this.bar++; +>this.bar : Symbol((Anonymous class).bar, Decl(functionsInClassExpressions.ts, 3, 5)) +>this : Symbol((Anonymous class), Decl(functionsInClassExpressions.ts, 0, 9)) +>bar : Symbol((Anonymous class).bar, Decl(functionsInClassExpressions.ts, 3, 5)) + } + m() { return this.bar; } +>m : Symbol((Anonymous class).m, Decl(functionsInClassExpressions.ts, 7, 5)) +>this.bar : Symbol((Anonymous class).bar, Decl(functionsInClassExpressions.ts, 3, 5)) +>this : Symbol((Anonymous class), Decl(functionsInClassExpressions.ts, 0, 9)) +>bar : Symbol((Anonymous class).bar, Decl(functionsInClassExpressions.ts, 3, 5)) +} diff --git a/tests/baselines/reference/functionsInClassExpressions.types b/tests/baselines/reference/functionsInClassExpressions.types new file mode 100644 index 00000000000..ee4b5696cc1 --- /dev/null +++ b/tests/baselines/reference/functionsInClassExpressions.types @@ -0,0 +1,32 @@ +=== tests/cases/compiler/functionsInClassExpressions.ts === +let Foo = class { +>Foo : typeof (Anonymous class) +>class { constructor() { this.bar++; } bar = 0; inc = () => { this.bar++; } m() { return this.bar; }} : typeof (Anonymous class) + + constructor() { + this.bar++; +>this.bar++ : number +>this.bar : number +>this : this +>bar : number + } + bar = 0; +>bar : number +>0 : number + + inc = () => { +>inc : () => void +>() => { this.bar++; } : () => void + + this.bar++; +>this.bar++ : number +>this.bar : number +>this : this +>bar : number + } + m() { return this.bar; } +>m : () => number +>this.bar : number +>this : this +>bar : number +} diff --git a/tests/cases/compiler/functionsInClassExpressions.ts b/tests/cases/compiler/functionsInClassExpressions.ts new file mode 100644 index 00000000000..72e0bafd582 --- /dev/null +++ b/tests/cases/compiler/functionsInClassExpressions.ts @@ -0,0 +1,10 @@ +let Foo = class { + constructor() { + this.bar++; + } + bar = 0; + inc = () => { + this.bar++; + } + m() { return this.bar; } +} \ No newline at end of file From c35419e12e4aaeb533299b00864abfdcfbc7ef03 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Sun, 11 Oct 2015 22:19:51 -0700 Subject: [PATCH 098/121] add rule to insert space between async keyword and open paren --- src/services/formatting/rules.ts | 8 +++++++- tests/cases/fourslash/formatAsyncKeyword.ts | 13 +++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/formatAsyncKeyword.ts diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index c3bc8e7802d..12efb774dd3 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -214,6 +214,7 @@ namespace ts.formatting { public SpaceBetweenYieldOrYieldStarAndOperand: Rule; // Async functions + public SpaceBetweenAsyncAndOpenParen: Rule; public SpaceBetweenAsyncAndFunctionKeyword: Rule; // Template strings @@ -369,6 +370,7 @@ namespace ts.formatting { this.SpaceBetweenYieldOrYieldStarAndOperand = new Rule(RuleDescriptor.create4(Shared.TokenRange.FromTokens([SyntaxKind.YieldKeyword, SyntaxKind.AsteriskToken]), Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), RuleAction.Space)); // Async-await + this.SpaceBetweenAsyncAndOpenParen = new Rule(RuleDescriptor.create1(SyntaxKind.AsyncKeyword, SyntaxKind.OpenParenToken), RuleOperation.create2(new RuleOperationContext(Rules.IsArrowFunctionContext, Rules.IsSameLineTokenContext), RuleAction.Space)); this.SpaceBetweenAsyncAndFunctionKeyword = new Rule(RuleDescriptor.create1(SyntaxKind.AsyncKeyword, SyntaxKind.FunctionKeyword), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space)); // template string @@ -402,7 +404,7 @@ namespace ts.formatting { this.NoSpaceBeforeOpenParenInFuncCall, this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, this.SpaceAfterVoidOperator, - this.SpaceBetweenAsyncAndFunctionKeyword, + this.SpaceBetweenAsyncAndOpenParen, this.SpaceBetweenAsyncAndFunctionKeyword, this.SpaceBetweenTagAndTemplateString, this.NoSpaceAfterTemplateHeadAndMiddle, this.NoSpaceBeforeTemplateMiddleAndTail, // TypeScript-specific rules @@ -703,6 +705,10 @@ namespace ts.formatting { return context.currentTokenSpan.kind !== SyntaxKind.CommaToken; } + static IsArrowFunctionContext(context: FormattingContext): boolean { + return context.contextNode.kind === SyntaxKind.ArrowFunction; + } + static IsSameLineTokenContext(context: FormattingContext): boolean { return context.TokensAreOnSameLine(); } diff --git a/tests/cases/fourslash/formatAsyncKeyword.ts b/tests/cases/fourslash/formatAsyncKeyword.ts new file mode 100644 index 00000000000..305d4ea4244 --- /dev/null +++ b/tests/cases/fourslash/formatAsyncKeyword.ts @@ -0,0 +1,13 @@ +/// + +/////*1*/let x = async () => 1; +/////*2*/let y = async() => 1; +/////*3*/let z = async function () { return 1; }; + +format.document(); +goTo.marker("1"); +verify.currentLineContentIs("let x = async () => 1;"); +goTo.marker("2"); +verify.currentLineContentIs("let y = async () => 1;"); +goTo.marker("3"); +verify.currentLineContentIs("let z = async function() { return 1; };") \ No newline at end of file From adf9f9b8dfcb2a989464a4916d744a392a77b78b Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 12 Oct 2015 09:59:41 -0700 Subject: [PATCH 099/121] check initialization of exported block scoped variables --- src/compiler/checker.ts | 7 ++++-- ...exportedBlockScopedDeclarations.errors.txt | 23 +++++++++++++++++++ .../exportedBlockScopedDeclarations.js | 22 ++++++++++++++++++ .../exportedBlockScopedDeclarations.ts | 9 ++++++++ 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/exportedBlockScopedDeclarations.errors.txt create mode 100644 tests/baselines/reference/exportedBlockScopedDeclarations.js create mode 100644 tests/cases/compiler/exportedBlockScopedDeclarations.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index d4ce6655a21..d91ef73b819 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -610,8 +610,11 @@ namespace ts { // block - scope variable and namespace module. However, only when we // try to resolve name in /*1*/ which is used in variable position, // we want to check for block- scoped - if (meaning & SymbolFlags.BlockScopedVariable && result.flags & SymbolFlags.BlockScopedVariable) { - checkResolvedBlockScopedVariable(result, errorLocation); + if (meaning & SymbolFlags.BlockScopedVariable) { + const exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result); + if (exportOrLocalSymbol.flags & SymbolFlags.BlockScopedVariable) { + checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); + } } } return result; diff --git a/tests/baselines/reference/exportedBlockScopedDeclarations.errors.txt b/tests/baselines/reference/exportedBlockScopedDeclarations.errors.txt new file mode 100644 index 00000000000..32136d16320 --- /dev/null +++ b/tests/baselines/reference/exportedBlockScopedDeclarations.errors.txt @@ -0,0 +1,23 @@ +tests/cases/compiler/exportedBlockScopedDeclarations.ts(1,13): error TS2448: Block-scoped variable 'foo' used before its declaration. +tests/cases/compiler/exportedBlockScopedDeclarations.ts(2,20): error TS2448: Block-scoped variable 'bar' used before its declaration. +tests/cases/compiler/exportedBlockScopedDeclarations.ts(4,15): error TS2448: Block-scoped variable 'bar' used before its declaration. +tests/cases/compiler/exportedBlockScopedDeclarations.ts(7,22): error TS2448: Block-scoped variable 'bar' used before its declaration. + + +==== tests/cases/compiler/exportedBlockScopedDeclarations.ts (4 errors) ==== + const foo = foo; // compile error + ~~~ +!!! error TS2448: Block-scoped variable 'foo' used before its declaration. + export const bar = bar; // should be compile error + ~~~ +!!! error TS2448: Block-scoped variable 'bar' used before its declaration. + function f() { + const bar = bar; // compile error + ~~~ +!!! error TS2448: Block-scoped variable 'bar' used before its declaration. + } + namespace NS { + export const bar = bar; // should be compile error + ~~~ +!!! error TS2448: Block-scoped variable 'bar' used before its declaration. + } \ No newline at end of file diff --git a/tests/baselines/reference/exportedBlockScopedDeclarations.js b/tests/baselines/reference/exportedBlockScopedDeclarations.js new file mode 100644 index 00000000000..c109aa7542e --- /dev/null +++ b/tests/baselines/reference/exportedBlockScopedDeclarations.js @@ -0,0 +1,22 @@ +//// [exportedBlockScopedDeclarations.ts] +const foo = foo; // compile error +export const bar = bar; // should be compile error +function f() { + const bar = bar; // compile error +} +namespace NS { + export const bar = bar; // should be compile error +} + +//// [exportedBlockScopedDeclarations.js] +define(["require", "exports"], function (require, exports) { + var foo = foo; // compile error + exports.bar = exports.bar; // should be compile error + function f() { + var bar = bar; // compile error + } + var NS; + (function (NS) { + NS.bar = NS.bar; // should be compile error + })(NS || (NS = {})); +}); diff --git a/tests/cases/compiler/exportedBlockScopedDeclarations.ts b/tests/cases/compiler/exportedBlockScopedDeclarations.ts new file mode 100644 index 00000000000..03ccff6c319 --- /dev/null +++ b/tests/cases/compiler/exportedBlockScopedDeclarations.ts @@ -0,0 +1,9 @@ +// @module: amd +const foo = foo; // compile error +export const bar = bar; // should be compile error +function f() { + const bar = bar; // compile error +} +namespace NS { + export const bar = bar; // should be compile error +} \ No newline at end of file From ca988316749b33975afeb68375df072c8c5a9a71 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 12 Oct 2015 10:22:18 -0700 Subject: [PATCH 100/121] addressed PR feedback: added tests for let declarations --- ...exportedBlockScopedDeclarations.errors.txt | 23 ++++++++++++++++++- .../exportedBlockScopedDeclarations.js | 18 +++++++++++++++ .../exportedBlockScopedDeclarations.ts | 9 ++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/tests/baselines/reference/exportedBlockScopedDeclarations.errors.txt b/tests/baselines/reference/exportedBlockScopedDeclarations.errors.txt index 32136d16320..06d832c86e1 100644 --- a/tests/baselines/reference/exportedBlockScopedDeclarations.errors.txt +++ b/tests/baselines/reference/exportedBlockScopedDeclarations.errors.txt @@ -2,9 +2,13 @@ tests/cases/compiler/exportedBlockScopedDeclarations.ts(1,13): error TS2448: Blo tests/cases/compiler/exportedBlockScopedDeclarations.ts(2,20): error TS2448: Block-scoped variable 'bar' used before its declaration. tests/cases/compiler/exportedBlockScopedDeclarations.ts(4,15): error TS2448: Block-scoped variable 'bar' used before its declaration. tests/cases/compiler/exportedBlockScopedDeclarations.ts(7,22): error TS2448: Block-scoped variable 'bar' used before its declaration. +tests/cases/compiler/exportedBlockScopedDeclarations.ts(10,12): error TS2448: Block-scoped variable 'foo1' used before its declaration. +tests/cases/compiler/exportedBlockScopedDeclarations.ts(11,19): error TS2448: Block-scoped variable 'bar1' used before its declaration. +tests/cases/compiler/exportedBlockScopedDeclarations.ts(13,14): error TS2448: Block-scoped variable 'bar1' used before its declaration. +tests/cases/compiler/exportedBlockScopedDeclarations.ts(16,21): error TS2448: Block-scoped variable 'bar1' used before its declaration. -==== tests/cases/compiler/exportedBlockScopedDeclarations.ts (4 errors) ==== +==== tests/cases/compiler/exportedBlockScopedDeclarations.ts (8 errors) ==== const foo = foo; // compile error ~~~ !!! error TS2448: Block-scoped variable 'foo' used before its declaration. @@ -20,4 +24,21 @@ tests/cases/compiler/exportedBlockScopedDeclarations.ts(7,22): error TS2448: Blo export const bar = bar; // should be compile error ~~~ !!! error TS2448: Block-scoped variable 'bar' used before its declaration. + } + + let foo1 = foo1; // compile error + ~~~~ +!!! error TS2448: Block-scoped variable 'foo1' used before its declaration. + export let bar1 = bar1; // should be compile error + ~~~~ +!!! error TS2448: Block-scoped variable 'bar1' used before its declaration. + function f1() { + let bar1 = bar1; // compile error + ~~~~ +!!! error TS2448: Block-scoped variable 'bar1' used before its declaration. + } + namespace NS1 { + export let bar1 = bar1; // should be compile error + ~~~~ +!!! error TS2448: Block-scoped variable 'bar1' used before its declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/exportedBlockScopedDeclarations.js b/tests/baselines/reference/exportedBlockScopedDeclarations.js index c109aa7542e..81399ddafb5 100644 --- a/tests/baselines/reference/exportedBlockScopedDeclarations.js +++ b/tests/baselines/reference/exportedBlockScopedDeclarations.js @@ -6,6 +6,15 @@ function f() { } namespace NS { export const bar = bar; // should be compile error +} + +let foo1 = foo1; // compile error +export let bar1 = bar1; // should be compile error +function f1() { + let bar1 = bar1; // compile error +} +namespace NS1 { + export let bar1 = bar1; // should be compile error } //// [exportedBlockScopedDeclarations.js] @@ -19,4 +28,13 @@ define(["require", "exports"], function (require, exports) { (function (NS) { NS.bar = NS.bar; // should be compile error })(NS || (NS = {})); + var foo1 = foo1; // compile error + exports.bar1 = exports.bar1; // should be compile error + function f1() { + var bar1 = bar1; // compile error + } + var NS1; + (function (NS1) { + NS1.bar1 = NS1.bar1; // should be compile error + })(NS1 || (NS1 = {})); }); diff --git a/tests/cases/compiler/exportedBlockScopedDeclarations.ts b/tests/cases/compiler/exportedBlockScopedDeclarations.ts index 03ccff6c319..f7a0216e8be 100644 --- a/tests/cases/compiler/exportedBlockScopedDeclarations.ts +++ b/tests/cases/compiler/exportedBlockScopedDeclarations.ts @@ -6,4 +6,13 @@ function f() { } namespace NS { export const bar = bar; // should be compile error +} + +let foo1 = foo1; // compile error +export let bar1 = bar1; // should be compile error +function f1() { + let bar1 = bar1; // compile error +} +namespace NS1 { + export let bar1 = bar1; // should be compile error } \ No newline at end of file From 2918f9d7a24391353c1864ce3e965de98630e928 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 12 Oct 2015 10:55:10 -0700 Subject: [PATCH 101/121] Update baseline after merge conflict --- ...iationAssignmentWithIndexingOnLHS4.symbols | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.symbols b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.symbols index 5213a451d39..19a9805a0c2 100644 --- a/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.symbols +++ b/tests/baselines/reference/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.symbols @@ -12,12 +12,12 @@ function incrementIdx(max: number) { let idx = Math.floor(Math.random() * max); >idx : Symbol(idx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 4, 7)) ->Math.floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27)) ->Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) ->Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11)) ->random : Symbol(Math.random, Decl(lib.d.ts, 608, 38)) +>Math.floor : Symbol(Math.floor, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>floor : Symbol(Math.floor, Decl(lib.d.ts, --, --)) +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) >max : Symbol(max, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 2, 22)) return idx; @@ -30,31 +30,31 @@ var array1 = [1, 2, 3, 4, 5]; array1[incrementIdx(array1.length)] **= 3; >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) >incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) ->array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2; >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) >incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) ->array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) >incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) ->array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2; >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) >incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) ->array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) >incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22)) ->array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --)) >array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3)) ->length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20)) +>length : Symbol(Array.length, Decl(lib.d.ts, --, --)) From de5286524328d02045e582ebd2d288f178c81139 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Mon, 12 Oct 2015 11:35:36 -0700 Subject: [PATCH 102/121] Remove prototype from NodeFilter static type --- src/lib/dom.generated.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index dbf9dc23532..fa985344412 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -7897,7 +7897,6 @@ interface NodeFilter { } declare var NodeFilter: { - prototype: NodeFilter; FILTER_ACCEPT: number; FILTER_REJECT: number; FILTER_SKIP: number; From e405ccebec5e6f355e609caf12e470719e572e1e Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 12 Oct 2015 11:48:38 -0700 Subject: [PATCH 103/121] fix linter failure --- src/compiler/emitter.ts | 2 +- src/compiler/parser.ts | 6 +++--- src/compiler/types.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 47662c26b42..51bc49297be 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3564,7 +3564,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi } emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment); return identifier; - } + } function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration, isAssignmentExpressionStatement: boolean, value?: Expression) { let emitCount = 0; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index b33f3faaed9..7ea8f0aa7aa 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3215,7 +3215,7 @@ namespace ts { parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) : incrementExpression; } - + let unaryOperator = token; let simpleUnaryExpression = parseSimpleUnaryExpression(); if (token === SyntaxKind.AsteriskAsteriskToken) { @@ -3277,7 +3277,7 @@ namespace ts { * ++LeftHandSideExpression[?Yield] * --LeftHandSideExpression[?Yield] */ - function isIncrementExpression(): boolean{ + function isIncrementExpression(): boolean { // This function is called inside parseUnaryExpression to decide // whether to call parseSimpleUnaryExpression or call parseIncrmentExpression directly switch (token) { @@ -3288,7 +3288,7 @@ namespace ts { case SyntaxKind.DeleteKeyword: case SyntaxKind.TypeOfKeyword: case SyntaxKind.VoidKeyword: - return false + return false; case SyntaxKind.LessThanToken: // If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression if (sourceFile.languageVariant !== LanguageVariant.JSX) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 3a30ce04383..5ca7ef6e909 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -708,7 +708,7 @@ namespace ts { export interface UnaryExpression extends Expression { _unaryExpressionBrand: any; } - + export interface IncrementExpression extends UnaryExpression { _incrementExpressionBrand: any; } From 92f1b48cc89e1310a23e4c4e4ee47891e4fac3f6 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 12 Oct 2015 14:27:33 -0700 Subject: [PATCH 104/121] Remove --experimentalAsyncFunctions --- src/compiler/checker.ts | 4 ---- src/compiler/commandLineParser.ts | 5 ----- src/compiler/diagnosticMessages.json | 8 -------- src/compiler/program.ts | 5 ----- src/compiler/types.ts | 1 - 5 files changed, 23 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 903addec182..110332b6224 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11759,10 +11759,6 @@ namespace ts { checkSignatureDeclaration(node); let isAsync = isAsyncFunctionLike(node); if (isAsync) { - if (!compilerOptions.experimentalAsyncFunctions) { - error(node, Diagnostics.Experimental_support_for_async_functions_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalAsyncFunctions_to_remove_this_warning); - } - emitAwaiter = true; } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 731a37a8cb7..9a8c0ac416f 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -222,11 +222,6 @@ namespace ts { type: "boolean", description: Diagnostics.Watch_input_files, }, - { - name: "experimentalAsyncFunctions", - type: "boolean", - description: Diagnostics.Enables_experimental_support_for_ES7_async_functions - }, { name: "experimentalDecorators", type: "boolean", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index b391545a733..fda876fa36b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -783,10 +783,6 @@ "category": "Error", "code": 1245 }, - "Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning.": { - "category": "Error", - "code": 1246 - }, "'with' statements are not allowed in an async function block.": { "category": "Error", @@ -2282,10 +2278,6 @@ "category": "Message", "code": 6066 }, - "Option 'experimentalAsyncFunctions' cannot be specified when targeting ES5 or lower.": { - "category": "Message", - "code": 6067 - }, "Enables experimental support for ES7 async functions.": { "category": "Message", "code": 6068 diff --git a/src/compiler/program.ts b/src/compiler/program.ts index c6d3a245a8d..abef5088fbb 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1076,11 +1076,6 @@ namespace ts { !options.experimentalDecorators) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators")); } - - if (options.experimentalAsyncFunctions && - options.target !== ScriptTarget.ES6) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_experimentalAsyncFunctions_cannot_be_specified_when_targeting_ES5_or_lower)); - } } } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index cbaa3e65e27..2de545ce32f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2080,7 +2080,6 @@ namespace ts { watch?: boolean; isolatedModules?: boolean; experimentalDecorators?: boolean; - experimentalAsyncFunctions?: boolean; emitDecoratorMetadata?: boolean; moduleResolution?: ModuleResolutionKind; /* @internal */ stripInternal?: boolean; From e9bed76baaaeca2c7593adbb3315cb0dde7d014c Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Mon, 12 Oct 2015 14:27:58 -0700 Subject: [PATCH 105/121] Remove --experimentalAsyncFunctions from tests --- .../async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts | 1 - .../async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts | 1 - .../async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts | 1 - .../async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts | 1 - .../async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts | 1 - .../async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts | 1 - .../async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts | 1 - .../async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts | 1 - .../async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts | 1 - .../async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts | 1 - .../asyncArrowFunctionCapturesArguments_es6.ts | 1 - .../es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts | 1 - .../cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts | 1 - tests/cases/conformance/async/es6/asyncAwait_es6.ts | 1 - tests/cases/conformance/async/es6/asyncClass_es6.ts | 1 - tests/cases/conformance/async/es6/asyncConstructor_es6.ts | 1 - tests/cases/conformance/async/es6/asyncDeclare_es6.ts | 1 - tests/cases/conformance/async/es6/asyncEnum_es6.ts | 1 - tests/cases/conformance/async/es6/asyncGetter_es6.ts | 1 - tests/cases/conformance/async/es6/asyncInterface_es6.ts | 1 - tests/cases/conformance/async/es6/asyncModule_es6.ts | 1 - tests/cases/conformance/async/es6/asyncSetter_es6.ts | 1 - .../es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts | 1 - .../es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts | 1 - .../es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts | 1 - .../es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts | 1 - .../es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts | 1 - .../async/es6/awaitCallExpression/awaitCallExpression1_es6.ts | 1 - .../async/es6/awaitCallExpression/awaitCallExpression2_es6.ts | 1 - .../async/es6/awaitCallExpression/awaitCallExpression3_es6.ts | 1 - .../async/es6/awaitCallExpression/awaitCallExpression4_es6.ts | 1 - .../async/es6/awaitCallExpression/awaitCallExpression5_es6.ts | 1 - .../async/es6/awaitCallExpression/awaitCallExpression6_es6.ts | 1 - .../async/es6/awaitCallExpression/awaitCallExpression7_es6.ts | 1 - .../async/es6/awaitCallExpression/awaitCallExpression8_es6.ts | 1 - tests/cases/conformance/async/es6/awaitUnion_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts | 1 - .../es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts | 1 - 51 files changed, 51 deletions(-) diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts index bb9f8a54e44..0959ed6c561 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction10_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var foo = async foo(): Promise => { // Legal to use 'await' in a type context. diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts index 45e686fd280..83e7413c527 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction1_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var foo = async (): Promise => { }; \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts index 8d792fdff9c..bf39735d460 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction2_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var f = (await) => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts index 9ca200f8d76..4ae27c596f1 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction3_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true function f(await = await) { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts index 4946592c45b..51b34abeca1 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction4_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var await = () => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts index 53052368b31..174a619bdf9 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction5_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var foo = async (await): Promise => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts index 69768429ecf..dace96c4933 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction6_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var foo = async (a = await): Promise => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts index a034381ba57..b1fd5cc030d 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction7_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var bar = async (): Promise => { // 'await' here is an identifier, and not an await expression. diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts index 397e06f703d..5d53338b1bd 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction8_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var foo = async (): Promise => { var v = { [await]: foo } diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts index 3f961c9d595..da041fe472b 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunction9_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var foo = async (a = await => await): Promise => { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts index f00d0d16545..8dab2c04086 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesArguments_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true class C { method() { function other() {} diff --git a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts index a90f08cb9f7..f2c507cbdd6 100644 --- a/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts +++ b/tests/cases/conformance/async/es6/asyncArrowFunction/asyncArrowFunctionCapturesThis_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true class C { method() { var fn = async () => await this; diff --git a/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts b/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts index 52694f24118..8e2cfd8c6c5 100644 --- a/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts +++ b/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @isolatedModules: true -// @experimentalAsyncFunctions: true import { MyPromise } from "missing"; declare var p: Promise; diff --git a/tests/cases/conformance/async/es6/asyncAwait_es6.ts b/tests/cases/conformance/async/es6/asyncAwait_es6.ts index eee2e73d023..8e72197a98d 100644 --- a/tests/cases/conformance/async/es6/asyncAwait_es6.ts +++ b/tests/cases/conformance/async/es6/asyncAwait_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 -// @experimentalAsyncFunctions: true type MyPromise = Promise; declare var MyPromise: typeof Promise; declare var p: Promise; diff --git a/tests/cases/conformance/async/es6/asyncClass_es6.ts b/tests/cases/conformance/async/es6/asyncClass_es6.ts index c4a444ca909..22ffe997b03 100644 --- a/tests/cases/conformance/async/es6/asyncClass_es6.ts +++ b/tests/cases/conformance/async/es6/asyncClass_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async class C { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncConstructor_es6.ts b/tests/cases/conformance/async/es6/asyncConstructor_es6.ts index 998156f19f4..d769fad0395 100644 --- a/tests/cases/conformance/async/es6/asyncConstructor_es6.ts +++ b/tests/cases/conformance/async/es6/asyncConstructor_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true class C { async constructor() { } diff --git a/tests/cases/conformance/async/es6/asyncDeclare_es6.ts b/tests/cases/conformance/async/es6/asyncDeclare_es6.ts index d83c25a421a..5e0fb536b39 100644 --- a/tests/cases/conformance/async/es6/asyncDeclare_es6.ts +++ b/tests/cases/conformance/async/es6/asyncDeclare_es6.ts @@ -1,4 +1,3 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare async function foo(): Promise; \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncEnum_es6.ts b/tests/cases/conformance/async/es6/asyncEnum_es6.ts index d9569bef9d1..4fad7923a8c 100644 --- a/tests/cases/conformance/async/es6/asyncEnum_es6.ts +++ b/tests/cases/conformance/async/es6/asyncEnum_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async enum E { Value } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncGetter_es6.ts b/tests/cases/conformance/async/es6/asyncGetter_es6.ts index fe5751ece0b..79fde60fdc4 100644 --- a/tests/cases/conformance/async/es6/asyncGetter_es6.ts +++ b/tests/cases/conformance/async/es6/asyncGetter_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true class C { async get foo() { } diff --git a/tests/cases/conformance/async/es6/asyncInterface_es6.ts b/tests/cases/conformance/async/es6/asyncInterface_es6.ts index c7bb460ea2b..5d5497d3cd4 100644 --- a/tests/cases/conformance/async/es6/asyncInterface_es6.ts +++ b/tests/cases/conformance/async/es6/asyncInterface_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async interface I { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncModule_es6.ts b/tests/cases/conformance/async/es6/asyncModule_es6.ts index cf660d25d1f..aa4c295d0e3 100644 --- a/tests/cases/conformance/async/es6/asyncModule_es6.ts +++ b/tests/cases/conformance/async/es6/asyncModule_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async module M { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncSetter_es6.ts b/tests/cases/conformance/async/es6/asyncSetter_es6.ts index 2ca1c805a45..8eedcbb5288 100644 --- a/tests/cases/conformance/async/es6/asyncSetter_es6.ts +++ b/tests/cases/conformance/async/es6/asyncSetter_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true class C { async set foo(value) { } diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts index df0d0e459d4..46060f309b2 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression1_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts index 7678c4b17ab..362f1ecc446 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression2_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts index 0b441f063dd..d3b02033252 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression3_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: number; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts index a0bdf58710f..eba3be31acf 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression4_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts index 3276d24ee4b..71b173f9e73 100644 --- a/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts +++ b/tests/cases/conformance/async/es6/awaitBinaryExpression/awaitBinaryExpression5_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; async function func(): Promise { diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts index 02de646112c..d0442f0968d 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression1_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts index 5d2e4046349..6de07ef12ff 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression2_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts index 702e1f4cbcc..2cc0b7b12d0 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression3_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts index aeeb192b4ba..8e349fbc5c3 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression4_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts index 82bb1f88ad2..bbe81ac94b1 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression5_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts index d5778df71ba..09e88f5acbc 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression6_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts index db01f34c825..fe0182da4aa 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression7_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts index b0b10a02a6f..e3280eb7c10 100644 --- a/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts +++ b/tests/cases/conformance/async/es6/awaitCallExpression/awaitCallExpression8_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare var a: boolean; declare var p: Promise; declare function fn(arg0: boolean, arg1: boolean, arg2: boolean): void; diff --git a/tests/cases/conformance/async/es6/awaitUnion_es6.ts b/tests/cases/conformance/async/es6/awaitUnion_es6.ts index 59c5285556c..a132ae01dfd 100644 --- a/tests/cases/conformance/async/es6/awaitUnion_es6.ts +++ b/tests/cases/conformance/async/es6/awaitUnion_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare let a: number | string; declare let b: PromiseLike | PromiseLike; declare let c: PromiseLike; diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts index d543e424a38..aab1f0013ec 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration10_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async function foo(a = await => await): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts index 23e40a0e5ba..747d20d7ea8 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration11_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async function await(): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts index a457d27073f..bbd77250365 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration12_es6.ts @@ -1,4 +1,3 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var v = async function await(): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts index 83b6a99579c..8670fa02811 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration13_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async function foo(): Promise { // Legal to use 'await' in a type context. var v: await; diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts index b837e6618d1..ba70c61b492 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration14_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async function foo(): Promise { return; } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts index 56bcf84911a..74018b73678 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true declare class Thenable { then(): void; } declare let a: any; declare let obj: { then: string; }; diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts index 3a792140011..289a65bb74f 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration1_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async function foo(): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts index e75ef1d36a3..25a153b4a34 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration2_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true function f(await) { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts index 9ca200f8d76..4ae27c596f1 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration3_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true function f(await = await) { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts index ac4447a0e4d..5d1ec389da3 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration4_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true function await() { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts index 60a0a8f4b74..eb3cd1db556 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration5_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async function foo(await): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts index a3ab64b9d29..89b0445fd2e 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration6_es6.ts @@ -1,5 +1,4 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async function foo(a = await): Promise { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts index cde12c7dbe3..5a964695da5 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration7_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async function bar(): Promise { // 'await' here is an identifier, and not a yield expression. async function foo(a = await): Promise { diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts index 52b6dba2792..764b0f3fb8a 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts @@ -1,4 +1,3 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true var v = { [await]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts index 662fa017606..7671764ad2a 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration9_es6.ts @@ -1,6 +1,5 @@ // @target: ES6 // @noEmitHelpers: true -// @experimentalAsyncFunctions: true async function foo(): Promise { var v = { [await]: foo } } \ No newline at end of file From 90258794a6cfd42b4da7f8f4abbc2c381c285e05 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 12 Oct 2015 14:32:48 -0700 Subject: [PATCH 106/121] Address PR feedback --- src/compiler/emitter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 51bc49297be..f822fe9385d 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2793,7 +2793,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi synthesizedLHS = createSynthesizedNode(SyntaxKind.ElementAccessExpression, /*startsOnNewLine*/ false); - let identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefinedTempVariablesInPlaces*/ false, /*shouldemitCommaBeforeAssignment*/ false); + let identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefinedTempVariablesInPlaces*/ false, /*shouldEmitCommaBeforeAssignment*/ false); synthesizedLHS.expression = identifier; if (leftHandSideExpression.argumentExpression.kind !== SyntaxKind.NumericLiteral && From f952873ef10d2ad70b680fa773c4999fc0555193 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 12 Oct 2015 15:58:34 -0700 Subject: [PATCH 107/121] allow forward references to block scoped variables from functions --- src/compiler/checker.ts | 106 +++++++++++++----- .../blockScopedVariablesUseBeforeDef.js | 74 ++++++++++++ .../blockScopedVariablesUseBeforeDef.symbols | 76 +++++++++++++ .../blockScopedVariablesUseBeforeDef.types | 81 +++++++++++++ .../blockScopedVariablesUseBeforeDef.ts | 35 ++++++ 5 files changed, 341 insertions(+), 31 deletions(-) create mode 100644 tests/baselines/reference/blockScopedVariablesUseBeforeDef.js create mode 100644 tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols create mode 100644 tests/baselines/reference/blockScopedVariablesUseBeforeDef.types create mode 100644 tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ad772bd1a70..3eead9fc957 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -383,20 +383,42 @@ namespace ts { // return undefined if we can't find a symbol. } - /** Returns true if node1 is defined before node 2**/ - function isDefinedBefore(node1: Node, node2: Node): boolean { - let file1 = getSourceFileOfNode(node1); - let file2 = getSourceFileOfNode(node2); + const enum RelativeLocation { + Unknown, + SameFileLocatedBefore, + SameFileLocatedAfter, + DifferentFilesLocatedBefore, + DifferentFilesLocatedAfter, + } + + function isLocatedBefore(origin: Node, target: Node): boolean { + switch (getRelativeLocation(origin, target)) { + // unknown is returned with nodes are in different files and order cannot be determined based on compilation settings + // optimistically assume this is ok + case RelativeLocation.Unknown: + case RelativeLocation.SameFileLocatedBefore: + case RelativeLocation.DifferentFilesLocatedBefore: + return true; + default: + return false; + } + } + + /** gets relative location of target comparing to origin **/ + function getRelativeLocation(origin: Node, target: Node): RelativeLocation { + let file1 = getSourceFileOfNode(origin); + let file2 = getSourceFileOfNode(target); if (file1 === file2) { - return node1.pos <= node2.pos; + return origin.pos > target.pos ? RelativeLocation.SameFileLocatedBefore : RelativeLocation.SameFileLocatedAfter; } if (!compilerOptions.outFile && !compilerOptions.out) { - return true; + // nodes are in different files and order cannot be determines + return RelativeLocation.Unknown; } let sourceFiles = host.getSourceFiles(); - return sourceFiles.indexOf(file1) <= sourceFiles.indexOf(file2); + return sourceFiles.indexOf(file1) > sourceFiles.indexOf(file2) ? RelativeLocation.DifferentFilesLocatedBefore : RelativeLocation.DifferentFilesLocatedAfter; } // Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and @@ -628,31 +650,53 @@ namespace ts { Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); // first check if usage is lexically located after the declaration - let isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation); - if (!isUsedBeforeDeclaration) { - // lexical check succeeded however code still can be illegal. - // - block scoped variables cannot be used in its initializers - // let x = x; // illegal but usage is lexically after definition - // - in ForIn/ForOf statements variable cannot be contained in expression part - // for (let x in x) - // for (let x of x) + let isUsedBeforeDeclaration = false; + switch (getRelativeLocation(declaration, errorLocation)) { + case RelativeLocation.DifferentFilesLocatedBefore: + isUsedBeforeDeclaration = true; + break; + case RelativeLocation.SameFileLocatedBefore: + // try to detect if forward reference to block scoped variable is inside function + // such forward references are permitted (they are still technically can be incorrect (i.e. in case of IIFEs) + // but detecting these case is more complicated task) + const declarationContainer = getEnclosingBlockScopeContainer(declaration); + let current = errorLocation; + while (current) { + if (current === declarationContainer) { + isUsedBeforeDeclaration = true; + break; + } + else if (isFunctionLike(current)) { + break; + } + current = current.parent; + } + break; + case RelativeLocation.SameFileLocatedAfter: + // lexical check succeeded however code still can be illegal. + // - block scoped variables cannot be used in its initializers + // let x = x; // illegal but usage is lexically after definition + // - in ForIn/ForOf statements variable cannot be contained in expression part + // for (let x in x) + // for (let x of x) - // climb up to the variable declaration skipping binding patterns - let variableDeclaration = getAncestor(declaration, SyntaxKind.VariableDeclaration); - let container = getEnclosingBlockScopeContainer(variableDeclaration); + // climb up to the variable declaration skipping binding patterns + let variableDeclaration = getAncestor(declaration, SyntaxKind.VariableDeclaration); + let container = getEnclosingBlockScopeContainer(variableDeclaration); - if (variableDeclaration.parent.parent.kind === SyntaxKind.VariableStatement || - variableDeclaration.parent.parent.kind === SyntaxKind.ForStatement) { - // variable statement/for statement case, - // use site should not be inside variable declaration (initializer of declaration or binding element) - isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); - } - else if (variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement || - variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement) { - // ForIn/ForOf case - use site should not be used in expression part - let expression = (variableDeclaration.parent.parent).expression; - isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); - } + if (variableDeclaration.parent.parent.kind === SyntaxKind.VariableStatement || + variableDeclaration.parent.parent.kind === SyntaxKind.ForStatement) { + // variable statement/for statement case, + // use site should not be inside variable declaration (initializer of declaration or binding element) + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); + } + else if (variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement || + variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement) { + // ForIn/ForOf case - use site should not be used in expression part + let expression = (variableDeclaration.parent.parent).expression; + isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); + } + break; } if (isUsedBeforeDeclaration) { error(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationNameToString(declaration.name)); @@ -13356,7 +13400,7 @@ namespace ts { } // illegal case: forward reference - if (!isDefinedBefore(propertyDecl, member)) { + if (isLocatedBefore(propertyDecl, member)) { reportError = false; error(e, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums); return undefined; diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js new file mode 100644 index 00000000000..2792521344f --- /dev/null +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js @@ -0,0 +1,74 @@ +//// [blockScopedVariablesUseBeforeDef.ts] +function foo1() { + let a = () => x; + let x; +} + +function foo2() { + let a = function () { return x; } + let x; +} + +function foo3() { + class X { + m() { return x;} + } + let x; +} + +function foo4() { + let y = class { + m() { return x; } + }; + let x; +} + +function foo5() { + let x = () => y; + let y = () => x; +} + +function foo6() { + function f() { + return x; + } + let x; +} + +//// [blockScopedVariablesUseBeforeDef.js] +function foo1() { + var a = function () { return x; }; + var x; +} +function foo2() { + var a = function () { return x; }; + var x; +} +function foo3() { + var X = (function () { + function X() { + } + X.prototype.m = function () { return x; }; + return X; + })(); + var x; +} +function foo4() { + var y = (function () { + function class_1() { + } + class_1.prototype.m = function () { return x; }; + return class_1; + })(); + var x; +} +function foo5() { + var x = function () { return y; }; + var y = function () { return x; }; +} +function foo6() { + function f() { + return x; + } + var x; +} diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols new file mode 100644 index 00000000000..a528af236c1 --- /dev/null +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols @@ -0,0 +1,76 @@ +=== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts === +function foo1() { +>foo1 : Symbol(foo1, Decl(blockScopedVariablesUseBeforeDef.ts, 0, 0)) + + let a = () => x; +>a : Symbol(a, Decl(blockScopedVariablesUseBeforeDef.ts, 1, 4)) +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 2, 4)) + + let x; +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 2, 4)) +} + +function foo2() { +>foo2 : Symbol(foo2, Decl(blockScopedVariablesUseBeforeDef.ts, 3, 1)) + + let a = function () { return x; } +>a : Symbol(a, Decl(blockScopedVariablesUseBeforeDef.ts, 6, 4)) +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 7, 4)) + + let x; +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 7, 4)) +} + +function foo3() { +>foo3 : Symbol(foo3, Decl(blockScopedVariablesUseBeforeDef.ts, 8, 1)) + + class X { +>X : Symbol(X, Decl(blockScopedVariablesUseBeforeDef.ts, 10, 17)) + + m() { return x;} +>m : Symbol(m, Decl(blockScopedVariablesUseBeforeDef.ts, 11, 10)) +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 14, 4)) + } + let x; +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 14, 4)) +} + +function foo4() { +>foo4 : Symbol(foo4, Decl(blockScopedVariablesUseBeforeDef.ts, 15, 1)) + + let y = class { +>y : Symbol(y, Decl(blockScopedVariablesUseBeforeDef.ts, 18, 4)) + + m() { return x; } +>m : Symbol((Anonymous class).m, Decl(blockScopedVariablesUseBeforeDef.ts, 18, 16)) +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 21, 4)) + + }; + let x; +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 21, 4)) +} + +function foo5() { +>foo5 : Symbol(foo5, Decl(blockScopedVariablesUseBeforeDef.ts, 22, 1)) + + let x = () => y; +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 25, 4)) +>y : Symbol(y, Decl(blockScopedVariablesUseBeforeDef.ts, 26, 4)) + + let y = () => x; +>y : Symbol(y, Decl(blockScopedVariablesUseBeforeDef.ts, 26, 4)) +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 25, 4)) +} + +function foo6() { +>foo6 : Symbol(foo6, Decl(blockScopedVariablesUseBeforeDef.ts, 27, 1)) + + function f() { +>f : Symbol(f, Decl(blockScopedVariablesUseBeforeDef.ts, 29, 17)) + + return x; +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 33, 4)) + } + let x; +>x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 33, 4)) +} diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types new file mode 100644 index 00000000000..bc3d5f8eba8 --- /dev/null +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types @@ -0,0 +1,81 @@ +=== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts === +function foo1() { +>foo1 : () => void + + let a = () => x; +>a : () => any +>() => x : () => any +>x : any + + let x; +>x : any +} + +function foo2() { +>foo2 : () => void + + let a = function () { return x; } +>a : () => any +>function () { return x; } : () => any +>x : any + + let x; +>x : any +} + +function foo3() { +>foo3 : () => void + + class X { +>X : X + + m() { return x;} +>m : () => any +>x : any + } + let x; +>x : any +} + +function foo4() { +>foo4 : () => void + + let y = class { +>y : typeof (Anonymous class) +>class { m() { return x; } } : typeof (Anonymous class) + + m() { return x; } +>m : () => any +>x : any + + }; + let x; +>x : any +} + +function foo5() { +>foo5 : () => void + + let x = () => y; +>x : () => () => any +>() => y : () => () => any +>y : () => () => any + + let y = () => x; +>y : () => () => any +>() => x : () => () => any +>x : () => () => any +} + +function foo6() { +>foo6 : () => void + + function f() { +>f : () => any + + return x; +>x : any + } + let x; +>x : any +} diff --git a/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts b/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts new file mode 100644 index 00000000000..7ded92df4c9 --- /dev/null +++ b/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts @@ -0,0 +1,35 @@ +function foo1() { + let a = () => x; + let x; +} + +function foo2() { + let a = function () { return x; } + let x; +} + +function foo3() { + class X { + m() { return x;} + } + let x; +} + +function foo4() { + let y = class { + m() { return x; } + }; + let x; +} + +function foo5() { + let x = () => y; + let y = () => x; +} + +function foo6() { + function f() { + return x; + } + let x; +} \ No newline at end of file From eb3b91cf1b1e681eac27c9b650830b8c3c978cd6 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Mon, 12 Oct 2015 17:24:39 -0700 Subject: [PATCH 108/121] addressed PR feedback --- src/compiler/checker.ts | 15 +- ...lockScopedVariablesUseBeforeDef.errors.txt | 93 ++++++++++++ .../blockScopedVariablesUseBeforeDef.js | 143 +++++++++++++++--- .../blockScopedVariablesUseBeforeDef.symbols | 76 ---------- .../blockScopedVariablesUseBeforeDef.types | 81 ---------- ...clarations-useBeforeDefinition2.errors.txt | 11 -- ...tDeclarations-useBeforeDefinition2.symbols | 9 ++ ...nstDeclarations-useBeforeDefinition2.types | 10 ++ ...clarations-useBeforeDefinition2.errors.txt | 11 -- ...tDeclarations-useBeforeDefinition2.symbols | 9 ++ ...letDeclarations-useBeforeDefinition2.types | 10 ++ .../blockScopedVariablesUseBeforeDef.ts | 85 ++++++++--- 12 files changed, 336 insertions(+), 217 deletions(-) create mode 100644 tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt delete mode 100644 tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols delete mode 100644 tests/baselines/reference/blockScopedVariablesUseBeforeDef.types delete mode 100644 tests/baselines/reference/constDeclarations-useBeforeDefinition2.errors.txt create mode 100644 tests/baselines/reference/constDeclarations-useBeforeDefinition2.symbols create mode 100644 tests/baselines/reference/constDeclarations-useBeforeDefinition2.types delete mode 100644 tests/baselines/reference/letDeclarations-useBeforeDefinition2.errors.txt create mode 100644 tests/baselines/reference/letDeclarations-useBeforeDefinition2.symbols create mode 100644 tests/baselines/reference/letDeclarations-useBeforeDefinition2.types diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3eead9fc957..0213f594f5b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -412,7 +412,7 @@ namespace ts { return origin.pos > target.pos ? RelativeLocation.SameFileLocatedBefore : RelativeLocation.SameFileLocatedAfter; } - if (!compilerOptions.outFile && !compilerOptions.out) { + if (modulekind || (!compilerOptions.outFile && !compilerOptions.out)) { // nodes are in different files and order cannot be determines return RelativeLocation.Unknown; } @@ -666,7 +666,18 @@ namespace ts { isUsedBeforeDeclaration = true; break; } - else if (isFunctionLike(current)) { + + if (isFunctionLike(current)) { + break; + } + + const isInitializerOfNonStaticProperty = + current.parent && + current.parent.kind === SyntaxKind.PropertyDeclaration && + (current.parent.flags & NodeFlags.Static) === 0 && + (current.parent).initializer === current; + + if (isInitializerOfNonStaticProperty) { break; } current = current.parent; diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt new file mode 100644 index 00000000000..a2bae3307a1 --- /dev/null +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt @@ -0,0 +1,93 @@ +tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(53,20): error TS2448: Block-scoped variable 'x' used before its declaration. +tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(60,20): error TS2448: Block-scoped variable 'x' used before its declaration. + + +==== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts (2 errors) ==== + function foo1() { + let a = () => x; + let x; + } + + function foo2() { + let a = function () { return x; } + let x; + } + + function foo3() { + class X { + m() { return x;} + } + let x; + } + + function foo4() { + let y = class { + m() { return x; } + }; + let x; + } + + function foo5() { + let x = () => y; + let y = () => x; + } + + function foo6() { + function f() { + return x; + } + let x; + } + + function foo7() { + class A { + a = x; + } + let x; + } + + function foo8() { + let y = class { + a = x; + } + let x; + } + + function foo9() { + let y = class { + static a = x; + ~ +!!! error TS2448: Block-scoped variable 'x' used before its declaration. + } + let x; + } + + function foo10() { + class A { + static a = x; + ~ +!!! error TS2448: Block-scoped variable 'x' used before its declaration. + } + let x; + } + + function foo11() { + function f () { + let y = class { + static a = x; + } + } + let x; + } + + function foo12() { + function f () { + let y = class { + a; + constructor() { + this.a = x; + } + } + } + let x; + } \ No newline at end of file diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js index 2792521344f..212b9d8b7b8 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js @@ -1,38 +1,87 @@ //// [blockScopedVariablesUseBeforeDef.ts] function foo1() { - let a = () => x; - let x; + let a = () => x; + let x; } function foo2() { - let a = function () { return x; } - let x; + let a = function () { return x; } + let x; } function foo3() { - class X { - m() { return x;} - } - let x; + class X { + m() { return x;} + } + let x; } function foo4() { - let y = class { - m() { return x; } - }; - let x; + let y = class { + m() { return x; } + }; + let x; } function foo5() { - let x = () => y; - let y = () => x; + let x = () => y; + let y = () => x; } function foo6() { - function f() { - return x; - } - let x; + function f() { + return x; + } + let x; +} + +function foo7() { + class A { + a = x; + } + let x; +} + +function foo8() { + let y = class { + a = x; + } + let x; +} + +function foo9() { + let y = class { + static a = x; + } + let x; +} + +function foo10() { + class A { + static a = x; + } + let x; +} + +function foo11() { + function f () { + let y = class { + static a = x; + } + } + let x; +} + +function foo12() { + function f () { + let y = class { + a; + constructor() { + this.a = x; + } + } + } + let x; } //// [blockScopedVariablesUseBeforeDef.js] @@ -72,3 +121,61 @@ function foo6() { } var x; } +function foo7() { + var A = (function () { + function A() { + this.a = x; + } + return A; + })(); + var x; +} +function foo8() { + var y = (function () { + function class_2() { + this.a = x; + } + return class_2; + })(); + var x; +} +function foo9() { + var y = (function () { + function class_3() { + } + class_3.a = x; + return class_3; + })(); + var x; +} +function foo10() { + var A = (function () { + function A() { + } + A.a = x; + return A; + })(); + var x; +} +function foo11() { + function f() { + var y = (function () { + function class_4() { + } + class_4.a = x; + return class_4; + })(); + } + var x; +} +function foo12() { + function f() { + var y = (function () { + function class_5() { + this.a = x; + } + return class_5; + })(); + } + var x; +} diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols deleted file mode 100644 index a528af236c1..00000000000 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.symbols +++ /dev/null @@ -1,76 +0,0 @@ -=== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts === -function foo1() { ->foo1 : Symbol(foo1, Decl(blockScopedVariablesUseBeforeDef.ts, 0, 0)) - - let a = () => x; ->a : Symbol(a, Decl(blockScopedVariablesUseBeforeDef.ts, 1, 4)) ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 2, 4)) - - let x; ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 2, 4)) -} - -function foo2() { ->foo2 : Symbol(foo2, Decl(blockScopedVariablesUseBeforeDef.ts, 3, 1)) - - let a = function () { return x; } ->a : Symbol(a, Decl(blockScopedVariablesUseBeforeDef.ts, 6, 4)) ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 7, 4)) - - let x; ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 7, 4)) -} - -function foo3() { ->foo3 : Symbol(foo3, Decl(blockScopedVariablesUseBeforeDef.ts, 8, 1)) - - class X { ->X : Symbol(X, Decl(blockScopedVariablesUseBeforeDef.ts, 10, 17)) - - m() { return x;} ->m : Symbol(m, Decl(blockScopedVariablesUseBeforeDef.ts, 11, 10)) ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 14, 4)) - } - let x; ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 14, 4)) -} - -function foo4() { ->foo4 : Symbol(foo4, Decl(blockScopedVariablesUseBeforeDef.ts, 15, 1)) - - let y = class { ->y : Symbol(y, Decl(blockScopedVariablesUseBeforeDef.ts, 18, 4)) - - m() { return x; } ->m : Symbol((Anonymous class).m, Decl(blockScopedVariablesUseBeforeDef.ts, 18, 16)) ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 21, 4)) - - }; - let x; ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 21, 4)) -} - -function foo5() { ->foo5 : Symbol(foo5, Decl(blockScopedVariablesUseBeforeDef.ts, 22, 1)) - - let x = () => y; ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 25, 4)) ->y : Symbol(y, Decl(blockScopedVariablesUseBeforeDef.ts, 26, 4)) - - let y = () => x; ->y : Symbol(y, Decl(blockScopedVariablesUseBeforeDef.ts, 26, 4)) ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 25, 4)) -} - -function foo6() { ->foo6 : Symbol(foo6, Decl(blockScopedVariablesUseBeforeDef.ts, 27, 1)) - - function f() { ->f : Symbol(f, Decl(blockScopedVariablesUseBeforeDef.ts, 29, 17)) - - return x; ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 33, 4)) - } - let x; ->x : Symbol(x, Decl(blockScopedVariablesUseBeforeDef.ts, 33, 4)) -} diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types deleted file mode 100644 index bc3d5f8eba8..00000000000 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.types +++ /dev/null @@ -1,81 +0,0 @@ -=== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts === -function foo1() { ->foo1 : () => void - - let a = () => x; ->a : () => any ->() => x : () => any ->x : any - - let x; ->x : any -} - -function foo2() { ->foo2 : () => void - - let a = function () { return x; } ->a : () => any ->function () { return x; } : () => any ->x : any - - let x; ->x : any -} - -function foo3() { ->foo3 : () => void - - class X { ->X : X - - m() { return x;} ->m : () => any ->x : any - } - let x; ->x : any -} - -function foo4() { ->foo4 : () => void - - let y = class { ->y : typeof (Anonymous class) ->class { m() { return x; } } : typeof (Anonymous class) - - m() { return x; } ->m : () => any ->x : any - - }; - let x; ->x : any -} - -function foo5() { ->foo5 : () => void - - let x = () => y; ->x : () => () => any ->() => y : () => () => any ->y : () => () => any - - let y = () => x; ->y : () => () => any ->() => x : () => () => any ->x : () => () => any -} - -function foo6() { ->foo6 : () => void - - function f() { ->f : () => any - - return x; ->x : any - } - let x; ->x : any -} diff --git a/tests/baselines/reference/constDeclarations-useBeforeDefinition2.errors.txt b/tests/baselines/reference/constDeclarations-useBeforeDefinition2.errors.txt deleted file mode 100644 index a4d28f51878..00000000000 --- a/tests/baselines/reference/constDeclarations-useBeforeDefinition2.errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -tests/cases/compiler/file1.ts(2,1): error TS2448: Block-scoped variable 'c' used before its declaration. - - -==== tests/cases/compiler/file1.ts (1 errors) ==== - - c; - ~ -!!! error TS2448: Block-scoped variable 'c' used before its declaration. - -==== tests/cases/compiler/file2.ts (0 errors) ==== - const c = 0; \ No newline at end of file diff --git a/tests/baselines/reference/constDeclarations-useBeforeDefinition2.symbols b/tests/baselines/reference/constDeclarations-useBeforeDefinition2.symbols new file mode 100644 index 00000000000..281ce427733 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-useBeforeDefinition2.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/file1.ts === + +c; +>c : Symbol(c, Decl(file2.ts, 0, 5)) + +=== tests/cases/compiler/file2.ts === +const c = 0; +>c : Symbol(c, Decl(file2.ts, 0, 5)) + diff --git a/tests/baselines/reference/constDeclarations-useBeforeDefinition2.types b/tests/baselines/reference/constDeclarations-useBeforeDefinition2.types new file mode 100644 index 00000000000..ae60fdfa477 --- /dev/null +++ b/tests/baselines/reference/constDeclarations-useBeforeDefinition2.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/file1.ts === + +c; +>c : number + +=== tests/cases/compiler/file2.ts === +const c = 0; +>c : number +>0 : number + diff --git a/tests/baselines/reference/letDeclarations-useBeforeDefinition2.errors.txt b/tests/baselines/reference/letDeclarations-useBeforeDefinition2.errors.txt deleted file mode 100644 index 5b8633312d9..00000000000 --- a/tests/baselines/reference/letDeclarations-useBeforeDefinition2.errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -tests/cases/compiler/file1.ts(2,1): error TS2448: Block-scoped variable 'l' used before its declaration. - - -==== tests/cases/compiler/file1.ts (1 errors) ==== - - l; - ~ -!!! error TS2448: Block-scoped variable 'l' used before its declaration. - -==== tests/cases/compiler/file2.ts (0 errors) ==== - const l = 0; \ No newline at end of file diff --git a/tests/baselines/reference/letDeclarations-useBeforeDefinition2.symbols b/tests/baselines/reference/letDeclarations-useBeforeDefinition2.symbols new file mode 100644 index 00000000000..c5a067ede4d --- /dev/null +++ b/tests/baselines/reference/letDeclarations-useBeforeDefinition2.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/file1.ts === + +l; +>l : Symbol(l, Decl(file2.ts, 0, 5)) + +=== tests/cases/compiler/file2.ts === +const l = 0; +>l : Symbol(l, Decl(file2.ts, 0, 5)) + diff --git a/tests/baselines/reference/letDeclarations-useBeforeDefinition2.types b/tests/baselines/reference/letDeclarations-useBeforeDefinition2.types new file mode 100644 index 00000000000..793a7a78ba7 --- /dev/null +++ b/tests/baselines/reference/letDeclarations-useBeforeDefinition2.types @@ -0,0 +1,10 @@ +=== tests/cases/compiler/file1.ts === + +l; +>l : number + +=== tests/cases/compiler/file2.ts === +const l = 0; +>l : number +>0 : number + diff --git a/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts b/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts index 7ded92df4c9..287f5ae117e 100644 --- a/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts +++ b/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts @@ -1,35 +1,84 @@ function foo1() { - let a = () => x; - let x; + let a = () => x; + let x; } function foo2() { - let a = function () { return x; } - let x; + let a = function () { return x; } + let x; } function foo3() { - class X { - m() { return x;} - } - let x; + class X { + m() { return x;} + } + let x; } function foo4() { - let y = class { - m() { return x; } - }; - let x; + let y = class { + m() { return x; } + }; + let x; } function foo5() { - let x = () => y; - let y = () => x; + let x = () => y; + let y = () => x; } function foo6() { - function f() { - return x; - } - let x; + function f() { + return x; + } + let x; +} + +function foo7() { + class A { + a = x; + } + let x; +} + +function foo8() { + let y = class { + a = x; + } + let x; +} + +function foo9() { + let y = class { + static a = x; + } + let x; +} + +function foo10() { + class A { + static a = x; + } + let x; +} + +function foo11() { + function f () { + let y = class { + static a = x; + } + } + let x; +} + +function foo12() { + function f () { + let y = class { + a; + constructor() { + this.a = x; + } + } + } + let x; } \ No newline at end of file From 0fa89ad99c41ab747511baf2ba6eefb0d48e5a9c Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 12 Oct 2015 17:38:55 -0700 Subject: [PATCH 109/121] Fixes #5104. --- src/compiler/core.ts | 8 +++-- .../reference/decoratorCallGeneric.errors.txt | 22 +++++++++++++ .../reference/decoratorCallGeneric.js | 31 +++++++++++++++++++ .../decorators/decoratorCallGeneric.ts | 12 +++++++ 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/decoratorCallGeneric.errors.txt create mode 100644 tests/baselines/reference/decoratorCallGeneric.js create mode 100644 tests/cases/conformance/decorators/decoratorCallGeneric.ts diff --git a/src/compiler/core.ts b/src/compiler/core.ts index ce59c3b3bc6..a310ceec457 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -437,8 +437,12 @@ namespace ts { } export function concatenateDiagnosticMessageChains(headChain: DiagnosticMessageChain, tailChain: DiagnosticMessageChain): DiagnosticMessageChain { - Debug.assert(!headChain.next); - headChain.next = tailChain; + let lastChain = headChain; + while (lastChain.next) { + lastChain = lastChain.next; + } + + lastChain.next = tailChain; return headChain; } diff --git a/tests/baselines/reference/decoratorCallGeneric.errors.txt b/tests/baselines/reference/decoratorCallGeneric.errors.txt new file mode 100644 index 00000000000..c8443420740 --- /dev/null +++ b/tests/baselines/reference/decoratorCallGeneric.errors.txt @@ -0,0 +1,22 @@ +tests/cases/conformance/decorators/decoratorCallGeneric.ts(7,2): error TS1238: Unable to resolve signature of class decorator when called as an expression. + The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. + Type argument candidate 'C' is not a valid type argument because it is not a supertype of candidate 'void'. + + +==== tests/cases/conformance/decorators/decoratorCallGeneric.ts (1 errors) ==== + interface I { + prototype: T, + m: () => T + } + function dec(c: I) { } + + @dec + ~~~ +!!! error TS1238: Unable to resolve signature of class decorator when called as an expression. +!!! error TS1238: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly. +!!! error TS1238: Type argument candidate 'C' is not a valid type argument because it is not a supertype of candidate 'void'. + class C { + _brand: any; + static m() {} + } + \ No newline at end of file diff --git a/tests/baselines/reference/decoratorCallGeneric.js b/tests/baselines/reference/decoratorCallGeneric.js new file mode 100644 index 00000000000..8c141d5a131 --- /dev/null +++ b/tests/baselines/reference/decoratorCallGeneric.js @@ -0,0 +1,31 @@ +//// [decoratorCallGeneric.ts] +interface I { + prototype: T, + m: () => T +} +function dec(c: I) { } + +@dec +class C { + _brand: any; + static m() {} +} + + +//// [decoratorCallGeneric.js] +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +function dec(c) { } +var C = (function () { + function C() { + } + C.m = function () { }; + C = __decorate([ + dec + ], C); + return C; +})(); diff --git a/tests/cases/conformance/decorators/decoratorCallGeneric.ts b/tests/cases/conformance/decorators/decoratorCallGeneric.ts new file mode 100644 index 00000000000..3eeaae6837c --- /dev/null +++ b/tests/cases/conformance/decorators/decoratorCallGeneric.ts @@ -0,0 +1,12 @@ +// @experimentalDecorators: true +interface I { + prototype: T, + m: () => T +} +function dec(c: I) { } + +@dec +class C { + _brand: any; + static m() {} +} From 48b24343b19769c175796a5fa9f769cf2bf44f1d Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Tue, 13 Oct 2015 00:06:59 -0700 Subject: [PATCH 110/121] use isBlockScopedNameDeclaredBeforeUse for block scoped variables and enums --- src/compiler/checker.ts | 159 +++++++----------- ...lockScopedVariablesUseBeforeDef.errors.txt | 45 ++++- .../blockScopedVariablesUseBeforeDef.js | 48 +++++- .../blockScopedVariablesUseBeforeDef.ts | 31 +++- 4 files changed, 183 insertions(+), 100 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0213f594f5b..9db3d49b9af 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -383,42 +383,72 @@ namespace ts { // return undefined if we can't find a symbol. } - const enum RelativeLocation { - Unknown, - SameFileLocatedBefore, - SameFileLocatedAfter, - DifferentFilesLocatedBefore, - DifferentFilesLocatedAfter, - } - - function isLocatedBefore(origin: Node, target: Node): boolean { - switch (getRelativeLocation(origin, target)) { - // unknown is returned with nodes are in different files and order cannot be determined based on compilation settings - // optimistically assume this is ok - case RelativeLocation.Unknown: - case RelativeLocation.SameFileLocatedBefore: - case RelativeLocation.DifferentFilesLocatedBefore: + function isBlockScopedNameDeclaredBeforeUse(declaration: Declaration, usage: Node): boolean { + const declarationFile = getSourceFileOfNode(declaration); + const useFile = getSourceFileOfNode(usage); + if (declarationFile !== useFile) { + if (modulekind || (!compilerOptions.outFile && !compilerOptions.out)) { + // nodes are in different files and order cannot be determines return true; - default: - return false; - } - } + } - /** gets relative location of target comparing to origin **/ - function getRelativeLocation(origin: Node, target: Node): RelativeLocation { - let file1 = getSourceFileOfNode(origin); - let file2 = getSourceFileOfNode(target); - if (file1 === file2) { - return origin.pos > target.pos ? RelativeLocation.SameFileLocatedBefore : RelativeLocation.SameFileLocatedAfter; + const sourceFiles = host.getSourceFiles(); + return indexOf(sourceFiles, declarationFile) <= indexOf(sourceFiles, useFile); } - if (modulekind || (!compilerOptions.outFile && !compilerOptions.out)) { - // nodes are in different files and order cannot be determines - return RelativeLocation.Unknown; + if (declaration.pos <= usage.pos) { + // declaration is before usage + // still might be illegal if usage is in the initializer of the variable declaration + return declaration.kind !== SyntaxKind.VariableDeclaration || + !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); } - let sourceFiles = host.getSourceFiles(); - return sourceFiles.indexOf(file1) > sourceFiles.indexOf(file2) ? RelativeLocation.DifferentFilesLocatedBefore : RelativeLocation.DifferentFilesLocatedAfter; + // declaration is after usage + // can be legal if usage is deferred (i.e. inside function or in initializer of instance property) + return isUsedInFunctionOrNonStaticProperty(declaration, usage); + + function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration: VariableDeclaration, usage: Node): boolean { + const container = getEnclosingBlockScopeContainer(declaration); + + if (declaration.parent.parent.kind === SyntaxKind.VariableStatement || + declaration.parent.parent.kind === SyntaxKind.ForStatement) { + // variable statement/for statement case, + // use site should not be inside variable declaration (initializer of declaration or binding element) + return isSameScopeDescendentOf(usage, declaration, container); + } + else if (declaration.parent.parent.kind === SyntaxKind.ForOfStatement || + declaration.parent.parent.kind === SyntaxKind.ForInStatement) { + // ForIn/ForOf case - use site should not be used in expression part + let expression = (declaration.parent.parent).expression; + return isSameScopeDescendentOf(usage, expression, container); + } + } + + function isUsedInFunctionOrNonStaticProperty(declaration: Declaration, usage: Node): boolean { + const container = getEnclosingBlockScopeContainer(declaration); + let current = usage; + while (current) { + if (current === container) { + return false; + } + + if (isFunctionLike(current)) { + return true; + } + + const initializerOfNonStaticProperty = current.parent && + current.parent.kind === SyntaxKind.PropertyDeclaration && + (current.parent.flags & NodeFlags.Static) === 0 && + (current.parent).initializer === current; + + if (initializerOfNonStaticProperty) { + return true; + } + + current = current.parent; + } + return false; + } } // Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and @@ -649,67 +679,7 @@ namespace ts { Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - // first check if usage is lexically located after the declaration - let isUsedBeforeDeclaration = false; - switch (getRelativeLocation(declaration, errorLocation)) { - case RelativeLocation.DifferentFilesLocatedBefore: - isUsedBeforeDeclaration = true; - break; - case RelativeLocation.SameFileLocatedBefore: - // try to detect if forward reference to block scoped variable is inside function - // such forward references are permitted (they are still technically can be incorrect (i.e. in case of IIFEs) - // but detecting these case is more complicated task) - const declarationContainer = getEnclosingBlockScopeContainer(declaration); - let current = errorLocation; - while (current) { - if (current === declarationContainer) { - isUsedBeforeDeclaration = true; - break; - } - - if (isFunctionLike(current)) { - break; - } - - const isInitializerOfNonStaticProperty = - current.parent && - current.parent.kind === SyntaxKind.PropertyDeclaration && - (current.parent.flags & NodeFlags.Static) === 0 && - (current.parent).initializer === current; - - if (isInitializerOfNonStaticProperty) { - break; - } - current = current.parent; - } - break; - case RelativeLocation.SameFileLocatedAfter: - // lexical check succeeded however code still can be illegal. - // - block scoped variables cannot be used in its initializers - // let x = x; // illegal but usage is lexically after definition - // - in ForIn/ForOf statements variable cannot be contained in expression part - // for (let x in x) - // for (let x of x) - - // climb up to the variable declaration skipping binding patterns - let variableDeclaration = getAncestor(declaration, SyntaxKind.VariableDeclaration); - let container = getEnclosingBlockScopeContainer(variableDeclaration); - - if (variableDeclaration.parent.parent.kind === SyntaxKind.VariableStatement || - variableDeclaration.parent.parent.kind === SyntaxKind.ForStatement) { - // variable statement/for statement case, - // use site should not be inside variable declaration (initializer of declaration or binding element) - isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); - } - else if (variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement || - variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement) { - // ForIn/ForOf case - use site should not be used in expression part - let expression = (variableDeclaration.parent.parent).expression; - isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); - } - break; - } - if (isUsedBeforeDeclaration) { + if (!isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, SyntaxKind.VariableDeclaration), errorLocation)) { error(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationNameToString(declaration.name)); } } @@ -13233,6 +13203,8 @@ namespace ts { let nodeLinks = getNodeLinks(node); if (!(nodeLinks.flags & NodeCheckFlags.EnumValuesComputed)) { + nodeLinks.flags |= NodeCheckFlags.EnumValuesComputed; + let enumSymbol = getSymbolOfNode(node); let enumType = getDeclaredTypeOfSymbol(enumSymbol); let autoValue = 0; // set to undefined when enum member is non-constant @@ -13270,8 +13242,6 @@ namespace ts { getNodeLinks(member).enumMemberValue = autoValue++; } } - - nodeLinks.flags |= NodeCheckFlags.EnumValuesComputed; } function computeConstantValueForEnumMemberInitializer(initializer: Expression, enumType: Type, enumIsConst: boolean, ambient: boolean): number { @@ -13411,12 +13381,13 @@ namespace ts { } // illegal case: forward reference - if (isLocatedBefore(propertyDecl, member)) { + if (!isBlockScopedNameDeclaredBeforeUse(propertyDecl, member)) { reportError = false; error(e, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums); return undefined; } + computeEnumMemberValues(propertyDecl.parent); return getNodeLinks(propertyDecl).enumMemberValue; } } diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt index a2bae3307a1..15697e9cf61 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt @@ -1,8 +1,18 @@ -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(53,20): error TS2448: Block-scoped variable 'x' used before its declaration. -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(60,20): error TS2448: Block-scoped variable 'x' used before its declaration. +tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(2,13): error TS2448: Block-scoped variable 'x' used before its declaration. +tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(58,20): error TS2448: Block-scoped variable 'x' used before its declaration. +tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(65,20): error TS2448: Block-scoped variable 'x' used before its declaration. +tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(100,12): error TS2448: Block-scoped variable 'x' used before its declaration. +tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(105,20): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -==== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts (2 errors) ==== +==== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts (5 errors) ==== + function foo0() { + let a = x; + ~ +!!! error TS2448: Block-scoped variable 'x' used before its declaration. + let x; + } + function foo1() { let a = () => x; let x; @@ -90,4 +100,31 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(60,20): error TS2448: B } } let x; - } \ No newline at end of file + } + + function foo13() { + let a = { + get a() { return x } + } + let x + } + + function foo14() { + let a = { + a: x + ~ +!!! error TS2448: Block-scoped variable 'x' used before its declaration. + } + let x + } + + const enum A { X = B.Y } + ~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + + const enum B { Y } + + function foo15() { + const enum A1 { X = B1.Y } + } + const enum B1 { Y } \ No newline at end of file diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js index 212b9d8b7b8..2030b0eed59 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js @@ -1,4 +1,9 @@ //// [blockScopedVariablesUseBeforeDef.ts] +function foo0() { + let a = x; + let x; +} + function foo1() { let a = () => x; let x; @@ -82,9 +87,36 @@ function foo12() { } } let x; -} +} + +function foo13() { + let a = { + get a() { return x } + } + let x +} + +function foo14() { + let a = { + a: x + } + let x +} + +const enum A { X = B.Y } + +const enum B { Y } + +function foo15() { + const enum A1 { X = B1.Y } +} +const enum B1 { Y } //// [blockScopedVariablesUseBeforeDef.js] +function foo0() { + var a = x; + var x; +} function foo1() { var a = function () { return x; }; var x; @@ -179,3 +211,17 @@ function foo12() { } var x; } +function foo13() { + var a = { + get a() { return x; } + }; + var x; +} +function foo14() { + var a = { + a: x + }; + var x; +} +function foo15() { +} diff --git a/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts b/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts index 287f5ae117e..1cade31d238 100644 --- a/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts +++ b/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts @@ -1,3 +1,9 @@ +// @target: ES5 +function foo0() { + let a = x; + let x; +} + function foo1() { let a = () => x; let x; @@ -81,4 +87,27 @@ function foo12() { } } let x; -} \ No newline at end of file +} + +function foo13() { + let a = { + get a() { return x } + } + let x +} + +function foo14() { + let a = { + a: x + } + let x +} + +const enum A { X = B.Y } + +const enum B { Y } + +function foo15() { + const enum A1 { X = B1.Y } +} +const enum B1 { Y } \ No newline at end of file From 6bbfe56dca0aa814af957bc46763cf87c3f86f48 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 13 Oct 2015 13:16:44 -0700 Subject: [PATCH 111/121] Use `memberListCount` --- tests/cases/fourslash/tsxCompletion10.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/cases/fourslash/tsxCompletion10.ts b/tests/cases/fourslash/tsxCompletion10.ts index cf8b3068f10..f10e014c282 100644 --- a/tests/cases/fourslash/tsxCompletion10.ts +++ b/tests/cases/fourslash/tsxCompletion10.ts @@ -10,6 +10,5 @@ //// var x1 =
Date: Tue, 13 Oct 2015 13:18:58 -0700 Subject: [PATCH 112/121] revert enum related changes --- src/compiler/checker.ts | 5 ++--- .../blockScopedVariablesUseBeforeDef.errors.txt | 16 ++-------------- .../blockScopedVariablesUseBeforeDef.js | 13 +------------ .../compiler/blockScopedVariablesUseBeforeDef.ts | 11 +---------- 4 files changed, 6 insertions(+), 39 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9db3d49b9af..db9661289bd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -13203,8 +13203,6 @@ namespace ts { let nodeLinks = getNodeLinks(node); if (!(nodeLinks.flags & NodeCheckFlags.EnumValuesComputed)) { - nodeLinks.flags |= NodeCheckFlags.EnumValuesComputed; - let enumSymbol = getSymbolOfNode(node); let enumType = getDeclaredTypeOfSymbol(enumSymbol); let autoValue = 0; // set to undefined when enum member is non-constant @@ -13242,6 +13240,8 @@ namespace ts { getNodeLinks(member).enumMemberValue = autoValue++; } } + + nodeLinks.flags |= NodeCheckFlags.EnumValuesComputed; } function computeConstantValueForEnumMemberInitializer(initializer: Expression, enumType: Type, enumIsConst: boolean, ambient: boolean): number { @@ -13387,7 +13387,6 @@ namespace ts { return undefined; } - computeEnumMemberValues(propertyDecl.parent); return getNodeLinks(propertyDecl).enumMemberValue; } } diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt index 15697e9cf61..94c58bccb04 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.errors.txt @@ -2,10 +2,9 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(2,13): error TS2448: Bl tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(58,20): error TS2448: Block-scoped variable 'x' used before its declaration. tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(65,20): error TS2448: Block-scoped variable 'x' used before its declaration. tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(100,12): error TS2448: Block-scoped variable 'x' used before its declaration. -tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(105,20): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -==== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts (5 errors) ==== +==== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts (4 errors) ==== function foo0() { let a = x; ~ @@ -116,15 +115,4 @@ tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(105,20): error TS2651: !!! error TS2448: Block-scoped variable 'x' used before its declaration. } let x - } - - const enum A { X = B.Y } - ~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - - const enum B { Y } - - function foo15() { - const enum A1 { X = B1.Y } - } - const enum B1 { Y } \ No newline at end of file + } \ No newline at end of file diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js index 2030b0eed59..5ed3ac62e6a 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js @@ -101,16 +101,7 @@ function foo14() { a: x } let x -} - -const enum A { X = B.Y } - -const enum B { Y } - -function foo15() { - const enum A1 { X = B1.Y } -} -const enum B1 { Y } +} //// [blockScopedVariablesUseBeforeDef.js] function foo0() { @@ -223,5 +214,3 @@ function foo14() { }; var x; } -function foo15() { -} diff --git a/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts b/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts index 1cade31d238..956705bd7d3 100644 --- a/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts +++ b/tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts @@ -101,13 +101,4 @@ function foo14() { a: x } let x -} - -const enum A { X = B.Y } - -const enum B { Y } - -function foo15() { - const enum A1 { X = B1.Y } -} -const enum B1 { Y } \ No newline at end of file +} \ No newline at end of file From 002f0c066b3d6f117bf418ffaf3b51397a0d2efc Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 14 Oct 2015 15:10:05 -0700 Subject: [PATCH 113/121] CR feedback --- src/compiler/commandLineParser.ts | 6 +-- src/compiler/core.ts | 15 ++---- src/compiler/sys.ts | 75 ++++++++++++++--------------- src/compiler/tsc.ts | 78 +++++++++++++++++++------------ src/compiler/utilities.ts | 10 ++++ src/server/editorServices.ts | 11 ++--- src/services/shims.ts | 4 +- 7 files changed, 107 insertions(+), 92 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 11062983aaa..6af35ee30cc 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -389,7 +389,7 @@ namespace ts { catch (e) { return { error: createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) }; } - return parseConfigFileText(fileName, text); + return parseConfigFileTextToJson(fileName, text); } /** @@ -397,7 +397,7 @@ namespace ts { * @param fileName The path to the config file * @param jsonText The text of the config file */ - export function parseConfigFileText(fileName: string, jsonText: string): { config?: any; error?: Diagnostic } { + export function parseConfigFileTextToJson(fileName: string, jsonText: string): { config?: any; error?: Diagnostic } { try { return { config: /\S/.test(jsonText) ? JSON.parse(jsonText) : {} }; } @@ -412,7 +412,7 @@ namespace ts { * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ - export function parseConfigFile(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine { + export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine { let errors: Diagnostic[] = []; return { diff --git a/src/compiler/core.ts b/src/compiler/core.ts index a4c9a987267..0f7c09b4756 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -833,24 +833,15 @@ namespace ts { } } - export function doTwoArraysHaveTheSameElements(array1: Array, array2: Array): Boolean { + export function arrayStructurallyIsEqualTo(array1: Array, array2: Array): boolean { if (!array1 || !array2) { return false; } - if (array1.length != array2.length) { + if (array1.length !== array2.length) { return false; } - array1 = array1.sort(); - array2 = array2.sort(); - - for (let i = 0; i < array1.length; i++) { - if (array1[i] != array2[i]) { - return false; - } - } - - return true; + return arrayIsEqualTo(array1.sort(), array2.sort()); } } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index d191d406c52..4bc9af8d30e 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -199,32 +199,19 @@ namespace ts { const _path = require("path"); const _os = require("os"); - class WatchedFileSet { - private watchedFiles: WatchedFile[] = []; - private nextFileToCheck = 0; - private watchTimer: any; + // average async stat takes about 30 microseconds + // set chunk size to do 30 files in < 1 millisecond + function createWatchedFileSet(interval = 2500, chunkSize = 30) { + let watchedFiles: WatchedFile[] = []; + let nextFileToCheck = 0; + let watchTimer: any; - // average async stat takes about 30 microseconds - // set chunk size to do 30 files in < 1 millisecond - constructor(public interval = 2500, public chunkSize = 30) { - } - - private static copyListRemovingItem(item: T, list: T[]) { - let copiedList: T[] = []; - for (var i = 0, len = list.length; i < len; i++) { - if (list[i] != item) { - copiedList.push(list[i]); - } - } - return copiedList; - } - - private static getModifiedTime(fileName: string): Date { + function getModifiedTime(fileName: string): Date { return _fs.statSync(fileName).mtime; } - private poll(checkedIndex: number) { - let watchedFile = this.watchedFiles[checkedIndex]; + function poll(checkedIndex: number) { + let watchedFile = watchedFiles[checkedIndex]; if (!watchedFile) { return; } @@ -234,7 +221,7 @@ namespace ts { watchedFile.callback(watchedFile.fileName); } else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) { - watchedFile.mtime = WatchedFileSet.getModifiedTime(watchedFile.fileName); + watchedFile.mtime = getModifiedTime(watchedFile.fileName); watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0); } }); @@ -243,42 +230,50 @@ namespace ts { // this implementation uses polling and // stat due to inconsistencies of fs.watch // and efficiency of stat on modern filesystems - private startWatchTimer() { - this.watchTimer = setInterval(() => { + function startWatchTimer() { + watchTimer = setInterval(() => { let count = 0; - let nextToCheck = this.nextFileToCheck; + let nextToCheck = nextFileToCheck; let firstCheck = -1; - while ((count < this.chunkSize) && (nextToCheck !== firstCheck)) { - this.poll(nextToCheck); + while ((count < chunkSize) && (nextToCheck !== firstCheck)) { + poll(nextToCheck); if (firstCheck < 0) { firstCheck = nextToCheck; } nextToCheck++; - if (nextToCheck === this.watchedFiles.length) { + if (nextToCheck === watchedFiles.length) { nextToCheck = 0; } count++; } - this.nextFileToCheck = nextToCheck; - }, this.interval); + nextFileToCheck = nextToCheck; + }, interval); } - addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile { + function addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile { let file: WatchedFile = { fileName, callback, - mtime: WatchedFileSet.getModifiedTime(fileName) + mtime: getModifiedTime(fileName) }; - this.watchedFiles.push(file); - if (this.watchedFiles.length === 1) { - this.startWatchTimer(); + watchedFiles.push(file); + if (watchedFiles.length === 1) { + startWatchTimer(); } return file; } - removeFile(file: WatchedFile) { - this.watchedFiles = WatchedFileSet.copyListRemovingItem(file, this.watchedFiles); + function removeFile(file: WatchedFile) { + watchedFiles = copyListRemovingItem(file, watchedFiles); + } + + return { + getModifiedTime: getModifiedTime, + poll: poll, + startWatchTimer: startWatchTimer, + addFile: addFile, + removeFile: removeFile } } @@ -295,7 +290,7 @@ namespace ts { // changes for large reference sets? If so, do we want // to increase the chunk size or decrease the interval // time dynamically to match the large reference set? - let watchedFileSet = new WatchedFileSet(); + let watchedFileSet = createWatchedFileSet(); function isNode4OrLater(): Boolean { return parseInt(process.version.charAt(1)) >= 4; @@ -417,7 +412,7 @@ namespace ts { // In watchDirectory we only care about adding and removing files (when event name is // "rename"); changes made within files are handled by corresponding fileWatchers (when // event name is "change") - if (eventName == "rename") { + if (eventName === "rename") { // When deleting a file, the passed baseFileName is null callback(!relativeFileName ? relativeFileName : normalizePath(ts.combinePaths(path, relativeFileName))); }; diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 9a5e1c15294..9d79d435a04 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -147,15 +147,17 @@ namespace ts { export function executeCommandLine(args: string[]): void { let commandLine = parseCommandLine(args); - let configFileName: string; // Configuration file name (if any) - let configFileWatcher: FileWatcher; // Configuration file watcher - let directoryWatcher: FileWatcher; // Directory watcher to monitor source file addition/removal - let cachedProgram: Program; // Program cached from last compilation - let rootFileNames: string[]; // Root fileNames for compilation - let compilerOptions: CompilerOptions; // Compiler options for compilation - let compilerHost: CompilerHost; // Compiler host - let hostGetSourceFile: typeof compilerHost.getSourceFile; // getSourceFile method from default host - let timerHandle: number; // Handle for 0.25s wait timer + let configFileName: string; // Configuration file name (if any) + let cachedConfigFileText: string; // Cached configuration file text, used for reparsing (if any) + let configFileWatcher: FileWatcher; // Configuration file watcher + let directoryWatcher: FileWatcher; // Directory watcher to monitor source file addition/removal + let cachedProgram: Program; // Program cached from last compilation + let rootFileNames: string[]; // Root fileNames for compilation + let compilerOptions: CompilerOptions; // Compiler options for compilation + let compilerHost: CompilerHost; // Compiler host + let hostGetSourceFile: typeof compilerHost.getSourceFile; // getSourceFile method from default host + let timerHandleForRecompilation: number; // Handle for 0.25s wait timer to trigger recompilation + let timerHandleForDirectoryChanges: number; // Handle for 0.25s wait timer to trigger directory change handler if (commandLine.options.locale) { if (!isJSONSupported()) { @@ -232,16 +234,22 @@ namespace ts { performCompilation(); - function configFileToParsedCommandLine(configFilename: string): ParsedCommandLine { - let result = readConfigFile(configFileName, sys.readFile); - if (result.error) { - reportWatchDiagnostic(result.error); - sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); - return; + function parseConfigFile(): ParsedCommandLine { + if (!cachedConfigFileText) { + try { + cachedConfigFileText = sys.readFile(configFileName); + } + catch (e) { + let error = createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, configFileName, e.message); + reportWatchDiagnostic(error); + sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + return; + } } + let result = parseConfigFileTextToJson(configFileName, cachedConfigFileText); let configObject = result.config; - let configParseResult = parseConfigFile(configObject, sys, getDirectoryPath(configFileName)); + let configParseResult = parseJsonConfigFileContent(configObject, sys, getDirectoryPath(configFileName)); if (configParseResult.errors.length > 0) { reportDiagnostics(configParseResult.errors); sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); @@ -255,7 +263,7 @@ namespace ts { if (!cachedProgram) { if (configFileName) { - let configParseResult = configFileToParsedCommandLine(configFileName); + let configParseResult = parseConfigFile(); rootFileNames = configParseResult.fileNames; compilerOptions = extend(commandLine.options, configParseResult.options); } @@ -322,13 +330,14 @@ namespace ts { rootFileNames.splice(index, 1); } } - startTimer(); + startTimerForRecompilation(); } // If the configuration file changes, forget cached program and start the recompilation timer function configFileChanged() { setCachedProgram(undefined); - startTimer(); + cachedConfigFileText = undefined; + startTimerForRecompilation(); } function watchedDirectoryChanged(fileName: string) { @@ -336,28 +345,39 @@ namespace ts { return; } - let parsedCommandLine = configFileToParsedCommandLine(configFileName); - let newFileNames = parsedCommandLine.fileNames.map(compilerHost.getCanonicalFileName); - let canonicalRootFileNames = rootFileNames.map(compilerHost.getCanonicalFileName); + startTimerForHandlingDirectoryChanges(); + } - if (!doTwoArraysHaveTheSameElements(newFileNames, canonicalRootFileNames)) { + function startTimerForHandlingDirectoryChanges() { + if (timerHandleForDirectoryChanges) { + clearTimeout(timerHandleForDirectoryChanges); + } + timerHandleForDirectoryChanges = setTimeout(directoryChangeHandler, 250); + } + + function directoryChangeHandler() { + let parsedCommandLine = parseConfigFile(); + let newFileNames = ts.map(parsedCommandLine.fileNames, compilerHost.getCanonicalFileName); + let canonicalRootFileNames = ts.map(rootFileNames, compilerHost.getCanonicalFileName); + + if (!arrayStructurallyIsEqualTo(newFileNames, canonicalRootFileNames)) { setCachedProgram(undefined); - startTimer(); + startTimerForRecompilation(); } } // Upon detecting a file change, wait for 250ms and then perform a recompilation. This gives batch // operations (such as saving all modified files in an editor) a chance to complete before we kick // off a new compilation. - function startTimer() { - if (timerHandle) { - clearTimeout(timerHandle); + function startTimerForRecompilation() { + if (timerHandleForRecompilation) { + clearTimeout(timerHandleForRecompilation); } - timerHandle = setTimeout(recompile, 250); + timerHandleForRecompilation = setTimeout(recompile, 250); } function recompile() { - timerHandle = undefined; + timerHandleForRecompilation = undefined; reportWatchDiagnostic(createCompilerDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation)); performCompilation(); } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 5127b98ab3a..5d0d1240734 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2406,4 +2406,14 @@ namespace ts { } } } + + export function copyListRemovingItem(item: T, list: T[]) { + var copiedList: T[] = []; + for (var i = 0, len = list.length; i < len; i++) { + if (list[i] != item) { + copiedList.push(list[i]); + } + } + return copiedList; + } } diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 974f51906f6..0da23261db4 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -556,12 +556,11 @@ namespace ts.server { } this.log("Detected source file changes: " + fileName); - let { succeeded, projectOptions, error } = this.configFileToProjectOptions(project.projectFilename); - let newRootFiles = projectOptions.files.map(f => this.getCanonicalFileName(f)); - let currentRootFiles = project.getRootFiles().map(f => this.getCanonicalFileName(f)); + let newRootFiles = ts.map(projectOptions.files, this.getCanonicalFileName); + let currentRootFiles = ts.map(project.getRootFiles(), this.getCanonicalFileName); - if (!doTwoArraysHaveTheSameElements(currentRootFiles, newRootFiles)) { + if (!arrayStructurallyIsEqualTo(currentRootFiles, newRootFiles)) { // For configured projects, the change is made outside the tsconfig file, and // it is not likely to affect the project for other files opened by the client. We can // just update the current project. @@ -1159,12 +1158,12 @@ namespace ts.server { // file references will be relative to dirPath (or absolute) var dirPath = ts.getDirectoryPath(configFilename); var contents = this.host.readFile(configFilename) - var rawConfig: { config?: ProjectOptions; error?: Diagnostic; } = ts.parseConfigFileText(configFilename, contents); + var rawConfig: { config?: ProjectOptions; error?: Diagnostic; } = ts.parseConfigFileTextToJson(configFilename, contents); if (rawConfig.error) { return { succeeded: false, error: rawConfig.error }; } else { - var parsedCommandLine = ts.parseConfigFile(rawConfig.config, this.host, dirPath); + var parsedCommandLine = ts.parseJsonConfigFileContent(rawConfig.config, this.host, dirPath); if (parsedCommandLine.errors && (parsedCommandLine.errors.length > 0)) { return { succeeded: false, error: { errorMsg: "tsconfig option errors" } }; } diff --git a/src/services/shims.ts b/src/services/shims.ts index 351514a1499..e919625395d 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -990,7 +990,7 @@ namespace ts { () => { let text = sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()); - let result = parseConfigFileText(fileName, text); + let result = parseConfigFileTextToJson(fileName, text); if (result.error) { return { @@ -1000,7 +1000,7 @@ namespace ts { }; } - var configFile = parseConfigFile(result.config, this.host, getDirectoryPath(normalizeSlashes(fileName))); + var configFile = parseJsonConfigFileContent(result.config, this.host, getDirectoryPath(normalizeSlashes(fileName))); return { options: configFile.options, From def268cccf383c9b26b20186926bd3076c30cb33 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 14 Oct 2015 15:48:25 -0700 Subject: [PATCH 114/121] Fix issues with removing roots --- src/server/editorServices.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 0da23261db4..3cfdadd7785 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -230,6 +230,7 @@ namespace ts.server { if (scriptInfo) { this.filenameToScript[info.fileName] = undefined; this.roots = copyListRemovingItem(info, this.roots); + this.resolvedModuleNames.remove(info.fileName); } } @@ -557,8 +558,8 @@ namespace ts.server { this.log("Detected source file changes: " + fileName); let { succeeded, projectOptions, error } = this.configFileToProjectOptions(project.projectFilename); - let newRootFiles = ts.map(projectOptions.files, this.getCanonicalFileName); - let currentRootFiles = ts.map(project.getRootFiles(), this.getCanonicalFileName); + let newRootFiles = projectOptions.files.map((f => this.getCanonicalFileName(f))); + let currentRootFiles = project.getRootFiles().map((f => this.getCanonicalFileName(f))); if (!arrayStructurallyIsEqualTo(currentRootFiles, newRootFiles)) { // For configured projects, the change is made outside the tsconfig file, and @@ -673,6 +674,9 @@ namespace ts.server { if (!info.isOpen) { this.filenameToScriptInfo[info.fileName] = undefined; var referencingProjects = this.findReferencingProjects(info); + if (info.defaultProject) { + info.defaultProject.removeRoot(info); + } for (var i = 0, len = referencingProjects.length; i < len; i++) { referencingProjects[i].removeReferencedFile(info); } @@ -1227,7 +1231,9 @@ namespace ts.server { for (let fileName of fileNamesToRemove) { let info = this.getScriptInfo(fileName); - project.removeRoot(info); + if (info) { + project.removeRoot(info); + } } for (let fileName of fileNamesToAdd) { From 62664fdedac9267111a976994f549e89e0b4b2f2 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 14 Oct 2015 16:09:41 -0700 Subject: [PATCH 115/121] Add timer for batch processing directory changes --- src/server/editorServices.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 3cfdadd7785..535d91aaf98 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -503,6 +503,7 @@ namespace ts.server { // number becomes 0 for a watcher, then we should close it. directoryWatchersRefCount: ts.Map = {}; hostConfiguration: HostConfiguration; + timerForDetectingProjectFilelistChanges: Map = {}; constructor(public host: ServerHost, public psLogger: Logger, public eventHandler?: ProjectServiceEventHandler) { // ts.disableIncrementalParsing = true; @@ -557,6 +558,20 @@ namespace ts.server { } this.log("Detected source file changes: " + fileName); + this.startTimerForDetectingProjectFilelistChanges(project); + } + + startTimerForDetectingProjectFilelistChanges(project: Project) { + if (this.timerForDetectingProjectFilelistChanges[project.projectFilename]) { + clearTimeout(this.timerForDetectingProjectFilelistChanges[project.projectFilename]); + } + this.timerForDetectingProjectFilelistChanges[project.projectFilename] = setTimeout( + () => this.handleProjectFilelistChanges(project), + 250 + ); + } + + handleProjectFilelistChanges(project: Project) { let { succeeded, projectOptions, error } = this.configFileToProjectOptions(project.projectFilename); let newRootFiles = projectOptions.files.map((f => this.getCanonicalFileName(f))); let currentRootFiles = project.getRootFiles().map((f => this.getCanonicalFileName(f))); From 6013968b1fe3fef37ad2fb79bd8d61c1b3b3e671 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 14 Oct 2015 16:25:27 -0700 Subject: [PATCH 116/121] Address build errors --- src/compiler/core.ts | 16 +++++++--------- src/compiler/utilities.ts | 16 +++++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 0f7c09b4756..b57731d1f76 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -833,15 +833,13 @@ namespace ts { } } - export function arrayStructurallyIsEqualTo(array1: Array, array2: Array): boolean { - if (!array1 || !array2) { - return false; + export function copyListRemovingItem(item: T, list: T[]) { + let copiedList: T[] = []; + for (var i = 0, len = list.length; i < len; i++) { + if (list[i] != item) { + copiedList.push(list[i]); + } } - - if (array1.length !== array2.length) { - return false; - } - - return arrayIsEqualTo(array1.sort(), array2.sort()); + return copiedList; } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 5d0d1240734..385e5c3123c 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2407,13 +2407,15 @@ namespace ts { } } - export function copyListRemovingItem(item: T, list: T[]) { - var copiedList: T[] = []; - for (var i = 0, len = list.length; i < len; i++) { - if (list[i] != item) { - copiedList.push(list[i]); - } + export function arrayStructurallyIsEqualTo(array1: Array, array2: Array): boolean { + if (!array1 || !array2) { + return false; } - return copiedList; + + if (array1.length !== array2.length) { + return false; + } + + return arrayIsEqualTo(array1.sort(), array2.sort()); } } From c75499974ef5f2aee677907b2d944e3b462aabe8 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 14 Oct 2015 16:31:27 -0700 Subject: [PATCH 117/121] Fix rwcRunner --- src/harness/rwcRunner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index 3027afae9dc..19c989bcd6f 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -78,8 +78,8 @@ namespace RWC { let tsconfigFile = ts.forEach(ioLog.filesRead, f => isTsConfigFile(f) ? f : undefined); if (tsconfigFile) { let tsconfigFileContents = getHarnessCompilerInputUnit(tsconfigFile.path); - let parsedTsconfigFileContents = ts.parseConfigFileText(tsconfigFile.path, tsconfigFileContents.content); - let configParseResult = ts.parseConfigFile(parsedTsconfigFileContents.config, Harness.IO, ts.getDirectoryPath(tsconfigFile.path)); + let parsedTsconfigFileContents = ts.parseConfigFileTextToJson(tsconfigFile.path, tsconfigFileContents.content); + let configParseResult = ts.parseJsonConfigFileContent(parsedTsconfigFileContents.config, Harness.IO, ts.getDirectoryPath(tsconfigFile.path)); fileNames = configParseResult.fileNames; opts.options = ts.extend(opts.options, configParseResult.options); } From f91bee0324328a8f3d1b159968ae303a9536b44d Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 14 Oct 2015 16:50:31 -0700 Subject: [PATCH 118/121] Re-read file content upon closing --- src/server/editorServices.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 436b97821cc..64050cd5457 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -683,6 +683,11 @@ namespace ts.server { * @param info The file that has been closed or newly configured */ closeOpenFile(info: ScriptInfo) { + // Closing file should trigger re-reading the file content from disk. This is + // because the user may chose to discard the buffer content before saving + // to the disk, and the server's version of the file can be out of sync. + info.svc.reloadFromFile(info.fileName); + var openFileRoots: ScriptInfo[] = []; var removedProject: Project; for (var i = 0, len = this.openFileRoots.length; i < len; i++) { From fcfc25eeb040390492716626757274c945ebd47f Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 14 Oct 2015 16:57:08 -0700 Subject: [PATCH 119/121] Fix lint errors --- src/compiler/core.ts | 4 ++-- src/compiler/sys.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index b57731d1f76..d0f51601b5e 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -833,7 +833,7 @@ namespace ts { } } - export function copyListRemovingItem(item: T, list: T[]) { + export function copyListRemovingItem(item: T, list: T[]) { let copiedList: T[] = []; for (var i = 0, len = list.length; i < len; i++) { if (list[i] != item) { @@ -842,4 +842,4 @@ namespace ts { } return copiedList; } -} +} \ No newline at end of file diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 4bc9af8d30e..0872a2e5ba5 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -274,7 +274,7 @@ namespace ts { startWatchTimer: startWatchTimer, addFile: addFile, removeFile: removeFile - } + }; } // REVIEW: for now this implementation uses polling. From b7c93c012f71dd1fafa6419d1203a6c9a4e79f9a Mon Sep 17 00:00:00 2001 From: zhengbli Date: Wed, 14 Oct 2015 17:50:29 -0700 Subject: [PATCH 120/121] Address CR from 5127 --- src/compiler/core.ts | 13 ++++++------- src/server/editorServices.ts | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index a3b5ed1c45f..9a4f5452eed 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -739,13 +739,12 @@ namespace ts { export function isSupportedSourceFileName(fileName: string) { if (!fileName) { return false; } - let dotIndex = fileName.lastIndexOf("."); - if (dotIndex < 0) { - return false; + for (let extension of supportedExtensions) { + if (fileExtensionIs(fileName, extension)) { + return true; + } } - - let extension = fileName.slice(dotIndex, fileName.length); - return supportedExtensions.indexOf(extension) >= 0; + return false; } const extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx"]; @@ -846,7 +845,7 @@ namespace ts { export function copyListRemovingItem(item: T, list: T[]) { let copiedList: T[] = []; for (var i = 0, len = list.length; i < len; i++) { - if (list[i] != item) { + if (list[i] !== item) { copiedList.push(list[i]); } } diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 8d4125f06a6..09f8a372463 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -735,7 +735,7 @@ namespace ts.server { if (!(--project.projectService.directoryWatchersRefCount[directory])) { this.log("Close directory watcher for: " + directory); project.projectService.directoryWatchersForTsconfig[directory].close(); - project.projectService.directoryWatchersForTsconfig[directory] = undefined; + delete project.projectService.directoryWatchersForTsconfig[directory]; } } this.inferredProjects = copyListRemovingItem(project, this.inferredProjects); From 53188d9cb8d00c333f3515525f729a7918b50013 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Thu, 15 Oct 2015 10:50:47 -0700 Subject: [PATCH 121/121] Add ES2015 as a synonym to ES6 In ModuleKind, ScriptTarget and associated command line arguments. --- src/compiler/commandLineParser.ts | 8 ++++++- src/compiler/types.ts | 4 +++- tests/baselines/reference/es2015modulekind.js | 23 +++++++++++++++++++ .../reference/es2015modulekind.symbols | 16 +++++++++++++ .../reference/es2015modulekind.types | 17 ++++++++++++++ .../es2015modulekindWithES6Target.js | 23 +++++++++++++++++++ .../es2015modulekindWithES6Target.symbols | 16 +++++++++++++ .../es2015modulekindWithES6Target.types | 17 ++++++++++++++ .../es6modulekindWithES2015Target.js | 23 +++++++++++++++++++ .../es6modulekindWithES2015Target.symbols | 16 +++++++++++++ .../es6modulekindWithES2015Target.types | 17 ++++++++++++++ tests/cases/compiler/es2015modulekind.ts | 17 ++++++++++++++ .../compiler/es2015modulekindWithES6Target.ts | 17 ++++++++++++++ .../compiler/es6modulekindWithES2015Target.ts | 17 ++++++++++++++ 14 files changed, 229 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/es2015modulekind.js create mode 100644 tests/baselines/reference/es2015modulekind.symbols create mode 100644 tests/baselines/reference/es2015modulekind.types create mode 100644 tests/baselines/reference/es2015modulekindWithES6Target.js create mode 100644 tests/baselines/reference/es2015modulekindWithES6Target.symbols create mode 100644 tests/baselines/reference/es2015modulekindWithES6Target.types create mode 100644 tests/baselines/reference/es6modulekindWithES2015Target.js create mode 100644 tests/baselines/reference/es6modulekindWithES2015Target.symbols create mode 100644 tests/baselines/reference/es6modulekindWithES2015Target.types create mode 100644 tests/cases/compiler/es2015modulekind.ts create mode 100644 tests/cases/compiler/es2015modulekindWithES6Target.ts create mode 100644 tests/cases/compiler/es6modulekindWithES2015Target.ts diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 37755ee3258..acf0474b7bf 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -77,6 +77,7 @@ namespace ts { "system": ModuleKind.System, "umd": ModuleKind.UMD, "es6": ModuleKind.ES6, + "es2015": ModuleKind.ES2015, }, description: Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es6, paramType: Diagnostics.KIND, @@ -205,7 +206,12 @@ namespace ts { { name: "target", shortName: "t", - type: { "es3": ScriptTarget.ES3, "es5": ScriptTarget.ES5, "es6": ScriptTarget.ES6 }, + type: { + "es3": ScriptTarget.ES3, + "es5": ScriptTarget.ES5, + "es6": ScriptTarget.ES6, + "es2015": ScriptTarget.ES2015, + }, description: Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental, paramType: Diagnostics.VERSION, error: Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES6 diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 6e5528b8217..c44c6ad2cc0 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2103,6 +2103,7 @@ namespace ts { UMD = 3, System = 4, ES6 = 5, + ES2015 = ES6, } export const enum JsxEmit { @@ -2128,12 +2129,13 @@ namespace ts { ES3 = 0, ES5 = 1, ES6 = 2, + ES2015 = ES6, Latest = ES6, } export const enum LanguageVariant { Standard, - JSX + JSX, } export interface ParsedCommandLine { diff --git a/tests/baselines/reference/es2015modulekind.js b/tests/baselines/reference/es2015modulekind.js new file mode 100644 index 00000000000..af638557fde --- /dev/null +++ b/tests/baselines/reference/es2015modulekind.js @@ -0,0 +1,23 @@ +//// [es2015modulekind.ts] + +export default class A +{ + constructor () + { + + } + + public B() + { + return 42; + } +} + +//// [es2015modulekind.js] +export default class A { + constructor() { + } + B() { + return 42; + } +} diff --git a/tests/baselines/reference/es2015modulekind.symbols b/tests/baselines/reference/es2015modulekind.symbols new file mode 100644 index 00000000000..227443ac06b --- /dev/null +++ b/tests/baselines/reference/es2015modulekind.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/es2015modulekind.ts === + +export default class A +>A : Symbol(A, Decl(es2015modulekind.ts, 0, 0)) +{ + constructor () + { + + } + + public B() +>B : Symbol(B, Decl(es2015modulekind.ts, 6, 5)) + { + return 42; + } +} diff --git a/tests/baselines/reference/es2015modulekind.types b/tests/baselines/reference/es2015modulekind.types new file mode 100644 index 00000000000..e77cf095aed --- /dev/null +++ b/tests/baselines/reference/es2015modulekind.types @@ -0,0 +1,17 @@ +=== tests/cases/compiler/es2015modulekind.ts === + +export default class A +>A : A +{ + constructor () + { + + } + + public B() +>B : () => number + { + return 42; +>42 : number + } +} diff --git a/tests/baselines/reference/es2015modulekindWithES6Target.js b/tests/baselines/reference/es2015modulekindWithES6Target.js new file mode 100644 index 00000000000..b76ab2a02a2 --- /dev/null +++ b/tests/baselines/reference/es2015modulekindWithES6Target.js @@ -0,0 +1,23 @@ +//// [es2015modulekindWithES6Target.ts] + +export default class A +{ + constructor () + { + + } + + public B() + { + return 42; + } +} + +//// [es2015modulekindWithES6Target.js] +export default class A { + constructor() { + } + B() { + return 42; + } +} diff --git a/tests/baselines/reference/es2015modulekindWithES6Target.symbols b/tests/baselines/reference/es2015modulekindWithES6Target.symbols new file mode 100644 index 00000000000..2ff208ac704 --- /dev/null +++ b/tests/baselines/reference/es2015modulekindWithES6Target.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/es2015modulekindWithES6Target.ts === + +export default class A +>A : Symbol(A, Decl(es2015modulekindWithES6Target.ts, 0, 0)) +{ + constructor () + { + + } + + public B() +>B : Symbol(B, Decl(es2015modulekindWithES6Target.ts, 6, 5)) + { + return 42; + } +} diff --git a/tests/baselines/reference/es2015modulekindWithES6Target.types b/tests/baselines/reference/es2015modulekindWithES6Target.types new file mode 100644 index 00000000000..50b85921b0e --- /dev/null +++ b/tests/baselines/reference/es2015modulekindWithES6Target.types @@ -0,0 +1,17 @@ +=== tests/cases/compiler/es2015modulekindWithES6Target.ts === + +export default class A +>A : A +{ + constructor () + { + + } + + public B() +>B : () => number + { + return 42; +>42 : number + } +} diff --git a/tests/baselines/reference/es6modulekindWithES2015Target.js b/tests/baselines/reference/es6modulekindWithES2015Target.js new file mode 100644 index 00000000000..98808fd1c65 --- /dev/null +++ b/tests/baselines/reference/es6modulekindWithES2015Target.js @@ -0,0 +1,23 @@ +//// [es6modulekindWithES2015Target.ts] + +export default class A +{ + constructor () + { + + } + + public B() + { + return 42; + } +} + +//// [es6modulekindWithES2015Target.js] +export default class A { + constructor() { + } + B() { + return 42; + } +} diff --git a/tests/baselines/reference/es6modulekindWithES2015Target.symbols b/tests/baselines/reference/es6modulekindWithES2015Target.symbols new file mode 100644 index 00000000000..98b91a0411b --- /dev/null +++ b/tests/baselines/reference/es6modulekindWithES2015Target.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/es6modulekindWithES2015Target.ts === + +export default class A +>A : Symbol(A, Decl(es6modulekindWithES2015Target.ts, 0, 0)) +{ + constructor () + { + + } + + public B() +>B : Symbol(B, Decl(es6modulekindWithES2015Target.ts, 6, 5)) + { + return 42; + } +} diff --git a/tests/baselines/reference/es6modulekindWithES2015Target.types b/tests/baselines/reference/es6modulekindWithES2015Target.types new file mode 100644 index 00000000000..63acdae43d1 --- /dev/null +++ b/tests/baselines/reference/es6modulekindWithES2015Target.types @@ -0,0 +1,17 @@ +=== tests/cases/compiler/es6modulekindWithES2015Target.ts === + +export default class A +>A : A +{ + constructor () + { + + } + + public B() +>B : () => number + { + return 42; +>42 : number + } +} diff --git a/tests/cases/compiler/es2015modulekind.ts b/tests/cases/compiler/es2015modulekind.ts new file mode 100644 index 00000000000..6e1f584844a --- /dev/null +++ b/tests/cases/compiler/es2015modulekind.ts @@ -0,0 +1,17 @@ +// @target: es2015 +// @sourcemap: false +// @declaration: false +// @module: es2015 + +export default class A +{ + constructor () + { + + } + + public B() + { + return 42; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/es2015modulekindWithES6Target.ts b/tests/cases/compiler/es2015modulekindWithES6Target.ts new file mode 100644 index 00000000000..78809d3835f --- /dev/null +++ b/tests/cases/compiler/es2015modulekindWithES6Target.ts @@ -0,0 +1,17 @@ +// @target: es6 +// @sourcemap: false +// @declaration: false +// @module: es2015 + +export default class A +{ + constructor () + { + + } + + public B() + { + return 42; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/es6modulekindWithES2015Target.ts b/tests/cases/compiler/es6modulekindWithES2015Target.ts new file mode 100644 index 00000000000..aaf79e6607d --- /dev/null +++ b/tests/cases/compiler/es6modulekindWithES2015Target.ts @@ -0,0 +1,17 @@ +// @target: es2015 +// @sourcemap: false +// @declaration: false +// @module: es6 + +export default class A +{ + constructor () + { + + } + + public B() + { + return 42; + } +} \ No newline at end of file