From de3eb36b2cfa0153d5e39bd400d99c55feaa4349 Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Tue, 13 Jan 2015 10:30:32 -0800 Subject: [PATCH] Update baselines --- .../MemberFunctionDeclaration3_es6.errors.txt | 5 +- .../reference/complicatedPrivacy.errors.txt | 7 +- .../computedPropertyNames3.errors.txt | 14 +- tests/baselines/reference/giant.errors.txt | 26 ++- ...SignatureMustHaveTypeAnnotation.errors.txt | 18 ++- .../indexSignatureWithInitializer.errors.txt | 13 +- .../indexWithoutParamType2.errors.txt | 8 +- .../reference/intTypeCheck.errors.txt | 150 +++++++++--------- .../parserComputedPropertyName10.errors.txt | 5 +- .../parserComputedPropertyName11.errors.txt | 5 +- .../parserComputedPropertyName12.errors.txt | 9 ++ .../parserComputedPropertyName12.types | 7 - .../parserComputedPropertyName13.errors.txt | 7 +- .../parserComputedPropertyName14.errors.txt | 7 +- .../parserComputedPropertyName15.errors.txt | 7 +- .../parserComputedPropertyName18.errors.txt | 7 +- .../parserComputedPropertyName19.errors.txt | 7 +- .../parserComputedPropertyName20.errors.txt | 5 +- .../parserComputedPropertyName21.errors.txt | 5 +- .../parserComputedPropertyName22.errors.txt | 5 +- .../parserComputedPropertyName23.errors.txt | 5 +- .../parserComputedPropertyName24.errors.txt | 9 ++ .../parserComputedPropertyName24.types | 8 - .../parserComputedPropertyName25.errors.txt | 5 +- .../parserComputedPropertyName27.errors.txt | 5 +- .../parserComputedPropertyName28.errors.txt | 8 +- .../parserComputedPropertyName29.errors.txt | 8 +- .../parserComputedPropertyName31.errors.txt | 8 +- .../parserComputedPropertyName32.errors.txt | 5 +- .../parserComputedPropertyName33.errors.txt | 5 +- .../parserComputedPropertyName36.errors.txt | 5 +- .../parserComputedPropertyName38.errors.txt | 9 ++ .../parserComputedPropertyName38.types | 7 - .../parserComputedPropertyName40.errors.txt | 9 ++ .../parserComputedPropertyName40.types | 8 - .../parserComputedPropertyName7.errors.txt | 5 +- .../parserComputedPropertyName8.errors.txt | 5 +- .../parserComputedPropertyName9.errors.txt | 5 +- .../parserES5ComputedPropertyName1.errors.txt | 5 +- ...parserES5ComputedPropertyName10.errors.txt | 5 +- ...parserES5ComputedPropertyName11.errors.txt | 5 +- .../parserES5ComputedPropertyName5.errors.txt | 5 +- .../parserES5ComputedPropertyName7.errors.txt | 5 +- .../parserES5ComputedPropertyName8.errors.txt | 7 +- .../parserES5ComputedPropertyName9.errors.txt | 5 +- .../parserIndexSignature11.errors.txt | 7 +- .../parserIndexSignature4.errors.txt | 7 +- .../parserIndexSignature5.errors.txt | 7 +- .../reference/propertyAssignment.errors.txt | 7 +- tests/cases/compiler/complicatedPrivacy.ts | 2 +- .../indexSignatureMustHaveTypeAnnotation.ts | 2 + .../compiler/indexSignatureWithInitializer.ts | 1 + .../cases/compiler/indexWithoutParamType2.ts | 1 + tests/cases/compiler/intTypeCheck.ts | 8 +- tests/cases/compiler/propertyAssignment.ts | 2 +- .../IndexSignatures/parserIndexSignature11.ts | 2 +- .../IndexSignatures/parserIndexSignature4.ts | 2 +- .../IndexSignatures/parserIndexSignature5.ts | 2 +- 58 files changed, 356 insertions(+), 167 deletions(-) create mode 100644 tests/baselines/reference/parserComputedPropertyName12.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName12.types create mode 100644 tests/baselines/reference/parserComputedPropertyName24.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName24.types create mode 100644 tests/baselines/reference/parserComputedPropertyName38.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName38.types create mode 100644 tests/baselines/reference/parserComputedPropertyName40.errors.txt delete mode 100644 tests/baselines/reference/parserComputedPropertyName40.types diff --git a/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt b/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt index b43e266e2a5..826c1d7fd75 100644 --- a/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt +++ b/tests/baselines/reference/MemberFunctionDeclaration3_es6.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,4): error TS9001: Generators are not currently supported. +tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. -==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts (1 errors) ==== +==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts (2 errors) ==== class C { *[foo]() { } ~ !!! error TS9001: Generators are not currently supported. + ~~~ +!!! error TS2304: Cannot find name 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/complicatedPrivacy.errors.txt b/tests/baselines/reference/complicatedPrivacy.errors.txt index fd47927f883..5aa399d1d84 100644 --- a/tests/baselines/reference/complicatedPrivacy.errors.txt +++ b/tests/baselines/reference/complicatedPrivacy.errors.txt @@ -1,8 +1,9 @@ tests/cases/compiler/complicatedPrivacy.ts(24,38): error TS1005: ';' expected. +tests/cases/compiler/complicatedPrivacy.ts(35,6): error TS2304: Cannot find name 'number'. tests/cases/compiler/complicatedPrivacy.ts(73,49): error TS2305: Module 'mglo5' has no exported member 'i6'. -==== tests/cases/compiler/complicatedPrivacy.ts (2 errors) ==== +==== tests/cases/compiler/complicatedPrivacy.ts (3 errors) ==== module m1 { export module m2 { @@ -39,7 +40,9 @@ tests/cases/compiler/complicatedPrivacy.ts(73,49): error TS2305: Module 'mglo5' export function f4(arg1: { - [number]: C1; + [number]: C1; // Used to be indexer, now it is a computed property + ~~~~~~ +!!! error TS2304: Cannot find name 'number'. }) { } diff --git a/tests/baselines/reference/computedPropertyNames3.errors.txt b/tests/baselines/reference/computedPropertyNames3.errors.txt index 37a4ddaf1c0..ad98baf6a14 100644 --- a/tests/baselines/reference/computedPropertyNames3.errors.txt +++ b/tests/baselines/reference/computedPropertyNames3.errors.txt @@ -1,18 +1,30 @@ +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(4,12): error TS2463: A computed property name must be of type 'string', 'number', or 'any'. tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(5,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(5,9): error TS2463: A computed property name must be of type 'string', 'number', or 'any'. +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(6,9): error TS2463: A computed property name must be of type 'string', 'number', or 'any'. tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. +tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16): error TS2463: A computed property name must be of type 'string', 'number', or 'any'. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts (2 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts (6 errors) ==== var id; class C { [0 + 1]() { } static [() => { }]() { } + ~~~~~~~~~~~ +!!! error TS2463: A computed property name must be of type 'string', 'number', or 'any'. get [delete id]() { } ~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + ~~~~~~~~~~~ +!!! error TS2463: A computed property name must be of type 'string', 'number', or 'any'. set [[0, 1]](v) { } + ~~~~~~~~ +!!! error TS2463: A computed property name must be of type 'string', 'number', or 'any'. static get [""]() { } ~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement. + ~~~~~~~~~~~~ +!!! error TS2463: A computed property name must be of type 'string', 'number', or 'any'. static set [id.toString()](v) { } } \ No newline at end of file diff --git a/tests/baselines/reference/giant.errors.txt b/tests/baselines/reference/giant.errors.txt index fbe05bbfc79..e8c574d2115 100644 --- a/tests/baselines/reference/giant.errors.txt +++ b/tests/baselines/reference/giant.errors.txt @@ -17,6 +17,7 @@ tests/cases/compiler/giant.ts(35,12): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(36,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(36,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(61,5): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/giant.ts(61,6): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(62,5): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(63,6): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(76,5): error TS2386: Overload signatures must all be optional or required. @@ -39,6 +40,7 @@ tests/cases/compiler/giant.ts(99,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(100,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(100,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(125,9): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/giant.ts(125,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(126,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(127,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(140,9): error TS2386: Overload signatures must all be optional or required. @@ -62,6 +64,7 @@ tests/cases/compiler/giant.ts(178,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(179,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(179,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(204,9): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/giant.ts(204,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(205,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(206,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(219,9): error TS2386: Overload signatures must all be optional or required. @@ -117,6 +120,7 @@ tests/cases/compiler/giant.ts(293,12): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(294,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(294,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(319,5): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/giant.ts(319,6): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(320,5): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(321,6): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(334,5): error TS2386: Overload signatures must all be optional or required. @@ -139,6 +143,7 @@ tests/cases/compiler/giant.ts(357,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(358,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(358,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(383,9): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/giant.ts(383,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(384,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(385,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(398,9): error TS2386: Overload signatures must all be optional or required. @@ -162,6 +167,7 @@ tests/cases/compiler/giant.ts(436,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(437,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(437,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(462,9): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/giant.ts(462,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(463,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(464,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(477,9): error TS2386: Overload signatures must all be optional or required. @@ -233,6 +239,7 @@ tests/cases/compiler/giant.ts(558,24): error TS1184: An implementation cannot be tests/cases/compiler/giant.ts(561,21): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(563,21): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(587,9): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/giant.ts(587,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(588,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(589,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(602,9): error TS2386: Overload signatures must all be optional or required. @@ -249,6 +256,7 @@ tests/cases/compiler/giant.ts(623,24): error TS1184: An implementation cannot be tests/cases/compiler/giant.ts(626,21): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(628,21): error TS1184: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(653,9): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/giant.ts(653,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(654,9): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(655,10): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(668,9): error TS2386: Overload signatures must all be optional or required. @@ -257,7 +265,7 @@ tests/cases/compiler/giant.ts(672,25): error TS1036: Statements are not allowed tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be declared in ambient contexts. -==== tests/cases/compiler/giant.ts (257 errors) ==== +==== tests/cases/compiler/giant.ts (265 errors) ==== /* Prefixes @@ -357,6 +365,8 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be [p]; ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'p'. [p1: string]; ~~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. @@ -465,6 +475,8 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be [p]; ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'p'. [p1: string]; ~~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. @@ -590,6 +602,8 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be [p]; ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'p'. [p1: string]; ~~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. @@ -815,6 +829,8 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be [p]; ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'p'. [p1: string]; ~~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. @@ -923,6 +939,8 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be [p]; ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'p'. [p1: string]; ~~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. @@ -1048,6 +1066,8 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be [p]; ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'p'. [p1: string]; ~~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. @@ -1315,6 +1335,8 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be [p]; ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'p'. [p1: string]; ~~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. @@ -1413,6 +1435,8 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: An implementation cannot be [p]; ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'p'. [p1: string]; ~~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. diff --git a/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt b/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt index 294282d1e9e..82e96bf3846 100644 --- a/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt +++ b/tests/baselines/reference/indexSignatureMustHaveTypeAnnotation.errors.txt @@ -1,23 +1,31 @@ -tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(2,5): error TS1169: Computed property names are not allowed in interfaces. -tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1021: An index signature must have a type annotation. -tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(7,5): error TS1166: Computed property names are not allowed in class property declarations. -tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(12,5): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. +tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. -==== tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts (4 errors) ==== +==== tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts (6 errors) ==== interface I { + // Used to be indexer, now it is a computed property [x]: string; ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'x'. [x: string]; ~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. } class C { + // Used to be indexer, now it is a computed property [x]: string ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'x'. } diff --git a/tests/baselines/reference/indexSignatureWithInitializer.errors.txt b/tests/baselines/reference/indexSignatureWithInitializer.errors.txt index 6fb708a3b80..d6f547a25cb 100644 --- a/tests/baselines/reference/indexSignatureWithInitializer.errors.txt +++ b/tests/baselines/reference/indexSignatureWithInitializer.errors.txt @@ -1,16 +1,23 @@ -tests/cases/compiler/indexSignatureWithInitializer.ts(2,5): error TS1169: Computed property names are not allowed in interfaces. -tests/cases/compiler/indexSignatureWithInitializer.ts(6,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/compiler/indexSignatureWithInitializer.ts(3,5): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/compiler/indexSignatureWithInitializer.ts(3,6): error TS2304: Cannot find name 'x'. +tests/cases/compiler/indexSignatureWithInitializer.ts(7,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/compiler/indexSignatureWithInitializer.ts(7,6): error TS2304: Cannot find name 'x'. -==== tests/cases/compiler/indexSignatureWithInitializer.ts (2 errors) ==== +==== tests/cases/compiler/indexSignatureWithInitializer.ts (4 errors) ==== + // These used to be indexers, now they are computed properties interface I { [x = '']: string; ~~~~~~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'x'. } class C { [x = 0]: string ~~~~~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/indexWithoutParamType2.errors.txt b/tests/baselines/reference/indexWithoutParamType2.errors.txt index 41527d0859f..468368b5f23 100644 --- a/tests/baselines/reference/indexWithoutParamType2.errors.txt +++ b/tests/baselines/reference/indexWithoutParamType2.errors.txt @@ -1,9 +1,13 @@ -tests/cases/compiler/indexWithoutParamType2.ts(2,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/compiler/indexWithoutParamType2.ts(3,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/compiler/indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. -==== tests/cases/compiler/indexWithoutParamType2.ts (1 errors) ==== +==== tests/cases/compiler/indexWithoutParamType2.ts (2 errors) ==== class C { + // Used to be indexer, now it is a computed property [x]: string ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index 5f7c213a916..bd8b2048045 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -1,91 +1,93 @@ -tests/cases/compiler/intTypeCheck.ts(83,5): error TS2386: Overload signatures must all be optional or required. -tests/cases/compiler/intTypeCheck.ts(97,5): error TS2322: Type 'Object' is not assignable to type 'i1'. +tests/cases/compiler/intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. +tests/cases/compiler/intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. +tests/cases/compiler/intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. +tests/cases/compiler/intTypeCheck.ts(99,5): error TS2322: Type 'Object' is not assignable to type 'i1'. Property 'p' is missing in type 'Object'. -tests/cases/compiler/intTypeCheck.ts(98,16): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(99,5): error TS2322: Type 'Base' is not assignable to type 'i1'. +tests/cases/compiler/intTypeCheck.ts(100,16): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(101,5): error TS2322: Type 'Base' is not assignable to type 'i1'. Property 'p' is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(101,5): error TS2322: Type '() => void' is not assignable to type 'i1'. +tests/cases/compiler/intTypeCheck.ts(103,5): error TS2322: Type '() => void' is not assignable to type 'i1'. Property 'p' is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(104,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. +tests/cases/compiler/intTypeCheck.ts(106,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. Property 'p' is missing in type 'Boolean'. -tests/cases/compiler/intTypeCheck.ts(104,20): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(104,21): error TS2304: Cannot find name 'i1'. -tests/cases/compiler/intTypeCheck.ts(105,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(110,5): error TS2322: Type '{}' is not assignable to type 'i2'. -tests/cases/compiler/intTypeCheck.ts(111,5): error TS2322: Type 'Object' is not assignable to type 'i2'. -tests/cases/compiler/intTypeCheck.ts(112,17): error TS2350: Only a void function can be called with the 'new' keyword. -tests/cases/compiler/intTypeCheck.ts(113,5): error TS2322: Type 'Base' is not assignable to type 'i2'. -tests/cases/compiler/intTypeCheck.ts(118,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. -tests/cases/compiler/intTypeCheck.ts(118,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(118,22): error TS2304: Cannot find name 'i2'. -tests/cases/compiler/intTypeCheck.ts(119,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(124,5): error TS2322: Type '{}' is not assignable to type 'i3'. -tests/cases/compiler/intTypeCheck.ts(125,5): error TS2322: Type 'Object' is not assignable to type 'i3'. -tests/cases/compiler/intTypeCheck.ts(127,5): error TS2322: Type 'Base' is not assignable to type 'i3'. -tests/cases/compiler/intTypeCheck.ts(129,5): error TS2322: Type '() => void' is not assignable to type 'i3'. -tests/cases/compiler/intTypeCheck.ts(132,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. -tests/cases/compiler/intTypeCheck.ts(132,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(132,22): error TS2304: Cannot find name 'i3'. -tests/cases/compiler/intTypeCheck.ts(133,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(139,5): error TS2322: Type 'Object' is not assignable to type 'i4'. +tests/cases/compiler/intTypeCheck.ts(106,20): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(106,21): error TS2304: Cannot find name 'i1'. +tests/cases/compiler/intTypeCheck.ts(107,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(112,5): error TS2322: Type '{}' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(113,5): error TS2322: Type 'Object' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(114,17): error TS2350: Only a void function can be called with the 'new' keyword. +tests/cases/compiler/intTypeCheck.ts(115,5): error TS2322: Type 'Base' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(120,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. +tests/cases/compiler/intTypeCheck.ts(120,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(120,22): error TS2304: Cannot find name 'i2'. +tests/cases/compiler/intTypeCheck.ts(121,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(126,5): error TS2322: Type '{}' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(127,5): error TS2322: Type 'Object' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(129,5): error TS2322: Type 'Base' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(131,5): error TS2322: Type '() => void' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(134,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. +tests/cases/compiler/intTypeCheck.ts(134,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(134,22): error TS2304: Cannot find name 'i3'. +tests/cases/compiler/intTypeCheck.ts(135,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(141,5): error TS2322: Type 'Object' is not assignable to type 'i4'. Index signature is missing in type 'Object'. -tests/cases/compiler/intTypeCheck.ts(140,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(141,5): error TS2322: Type 'Base' is not assignable to type 'i4'. +tests/cases/compiler/intTypeCheck.ts(142,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(143,5): error TS2322: Type 'Base' is not assignable to type 'i4'. Index signature is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(143,5): error TS2322: Type '() => void' is not assignable to type 'i4'. +tests/cases/compiler/intTypeCheck.ts(145,5): error TS2322: Type '() => void' is not assignable to type 'i4'. Index signature is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(146,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. +tests/cases/compiler/intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. Index signature is missing in type 'Boolean'. -tests/cases/compiler/intTypeCheck.ts(146,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(146,22): error TS2304: Cannot find name 'i4'. -tests/cases/compiler/intTypeCheck.ts(147,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(152,5): error TS2322: Type '{}' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(148,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(148,22): error TS2304: Cannot find name 'i4'. +tests/cases/compiler/intTypeCheck.ts(149,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(154,5): error TS2322: Type '{}' is not assignable to type 'i5'. Property 'p' is missing in type '{}'. -tests/cases/compiler/intTypeCheck.ts(153,5): error TS2322: Type 'Object' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(155,5): error TS2322: Type 'Object' is not assignable to type 'i5'. Property 'p' is missing in type 'Object'. -tests/cases/compiler/intTypeCheck.ts(154,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(155,5): error TS2322: Type 'Base' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(156,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(157,5): error TS2322: Type 'Base' is not assignable to type 'i5'. Property 'p' is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(157,5): error TS2322: Type '() => void' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(159,5): error TS2322: Type '() => void' is not assignable to type 'i5'. Property 'p' is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(160,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. +tests/cases/compiler/intTypeCheck.ts(162,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. Property 'p' is missing in type 'Boolean'. -tests/cases/compiler/intTypeCheck.ts(160,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(160,22): error TS2304: Cannot find name 'i5'. -tests/cases/compiler/intTypeCheck.ts(161,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(166,5): error TS2322: Type '{}' is not assignable to type 'i6'. -tests/cases/compiler/intTypeCheck.ts(167,5): error TS2322: Type 'Object' is not assignable to type 'i6'. -tests/cases/compiler/intTypeCheck.ts(168,17): error TS2350: Only a void function can be called with the 'new' keyword. -tests/cases/compiler/intTypeCheck.ts(169,5): error TS2322: Type 'Base' is not assignable to type 'i6'. -tests/cases/compiler/intTypeCheck.ts(171,5): error TS2322: Type '() => void' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(162,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(162,22): error TS2304: Cannot find name 'i5'. +tests/cases/compiler/intTypeCheck.ts(163,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(168,5): error TS2322: Type '{}' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(169,5): error TS2322: Type 'Object' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(170,17): error TS2350: Only a void function can be called with the 'new' keyword. +tests/cases/compiler/intTypeCheck.ts(171,5): error TS2322: Type 'Base' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(173,5): error TS2322: Type '() => void' is not assignable to type 'i6'. Type 'void' is not assignable to type 'number'. -tests/cases/compiler/intTypeCheck.ts(174,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. -tests/cases/compiler/intTypeCheck.ts(174,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(174,22): error TS2304: Cannot find name 'i6'. -tests/cases/compiler/intTypeCheck.ts(175,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(180,5): error TS2322: Type '{}' is not assignable to type 'i7'. -tests/cases/compiler/intTypeCheck.ts(181,5): error TS2322: Type 'Object' is not assignable to type 'i7'. -tests/cases/compiler/intTypeCheck.ts(183,17): error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other. -tests/cases/compiler/intTypeCheck.ts(185,5): error TS2322: Type '() => void' is not assignable to type 'i7'. -tests/cases/compiler/intTypeCheck.ts(188,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. -tests/cases/compiler/intTypeCheck.ts(188,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(188,22): error TS2304: Cannot find name 'i7'. -tests/cases/compiler/intTypeCheck.ts(189,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(195,5): error TS2322: Type 'Object' is not assignable to type 'i8'. +tests/cases/compiler/intTypeCheck.ts(176,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. +tests/cases/compiler/intTypeCheck.ts(176,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(176,22): error TS2304: Cannot find name 'i6'. +tests/cases/compiler/intTypeCheck.ts(177,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(182,5): error TS2322: Type '{}' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(183,5): error TS2322: Type 'Object' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(185,17): error TS2352: Neither type 'Base' nor type 'i7' is assignable to the other. +tests/cases/compiler/intTypeCheck.ts(187,5): error TS2322: Type '() => void' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(190,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. +tests/cases/compiler/intTypeCheck.ts(190,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(190,22): error TS2304: Cannot find name 'i7'. +tests/cases/compiler/intTypeCheck.ts(191,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(197,5): error TS2322: Type 'Object' is not assignable to type 'i8'. Index signature is missing in type 'Object'. -tests/cases/compiler/intTypeCheck.ts(196,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/intTypeCheck.ts(197,5): error TS2322: Type 'Base' is not assignable to type 'i8'. +tests/cases/compiler/intTypeCheck.ts(198,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(199,5): error TS2322: Type 'Base' is not assignable to type 'i8'. Index signature is missing in type 'Base'. -tests/cases/compiler/intTypeCheck.ts(199,5): error TS2322: Type '() => void' is not assignable to type 'i8'. +tests/cases/compiler/intTypeCheck.ts(201,5): error TS2322: Type '() => void' is not assignable to type 'i8'. Index signature is missing in type '() => void'. -tests/cases/compiler/intTypeCheck.ts(202,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. +tests/cases/compiler/intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. Index signature is missing in type 'Boolean'. -tests/cases/compiler/intTypeCheck.ts(202,21): error TS1109: Expression expected. -tests/cases/compiler/intTypeCheck.ts(202,22): error TS2304: Cannot find name 'i8'. -tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. +tests/cases/compiler/intTypeCheck.ts(204,21): error TS1109: Expression expected. +tests/cases/compiler/intTypeCheck.ts(204,22): error TS2304: Cannot find name 'i8'. +tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -==== tests/cases/compiler/intTypeCheck.ts (67 errors) ==== +==== tests/cases/compiler/intTypeCheck.ts (69 errors) ==== interface i1 { //Property Signatures p; @@ -119,8 +121,11 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit new (p6: string, ...p7: any[]); } interface i4 { - //Index Signatures + // Used to be indexer, now it is a computed property [p]; + ~ +!!! error TS2304: Cannot find name 'p'. + //Index Signatures [p1: string]; [p2: string, p3: number]; } @@ -153,9 +158,12 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit new (...p3: any[]); new (p4: string, p5?: string); new (p6: string, ...p7: any[]); - - //Index Signatures + + // Used to be indexer, now it is a computed property [p]; + ~ +!!! error TS2304: Cannot find name 'p'. + //Index Signatures [p1: string]; [p2: string, p3: number]; diff --git a/tests/baselines/reference/parserComputedPropertyName10.errors.txt b/tests/baselines/reference/parserComputedPropertyName10.errors.txt index 704c37ebf45..061e2c40c2d 100644 --- a/tests/baselines/reference/parserComputedPropertyName10.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName10.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts (2 errors) ==== class C { [e] = 1 ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName11.errors.txt b/tests/baselines/reference/parserComputedPropertyName11.errors.txt index f47aa75031d..65748f72b24 100644 --- a/tests/baselines/reference/parserComputedPropertyName11.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName11.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS1168: Computed property names are not allowed in method overloads. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts (2 errors) ==== class C { [e](); ~~~ !!! error TS1168: Computed property names are not allowed in method overloads. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName12.errors.txt b/tests/baselines/reference/parserComputedPropertyName12.errors.txt new file mode 100644 index 00000000000..46baacf402d --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName12.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts (1 errors) ==== + class C { + [e]() { } + ~ +!!! error TS2304: Cannot find name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName12.types b/tests/baselines/reference/parserComputedPropertyName12.types deleted file mode 100644 index fcc96bc4d51..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName12.types +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts === -class C { ->C : C - - [e]() { } ->e : unknown -} diff --git a/tests/baselines/reference/parserComputedPropertyName13.errors.txt b/tests/baselines/reference/parserComputedPropertyName13.errors.txt index 33ef5f9141a..b209f3c7d01 100644 --- a/tests/baselines/reference/parserComputedPropertyName13.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName13.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts(1,10): error TS1170: Computed property names are not allowed in type literals. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts (2 errors) ==== var v: { [e]: number }; ~~~ -!!! error TS1170: Computed property names are not allowed in type literals. \ No newline at end of file +!!! error TS1170: Computed property names are not allowed in type literals. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName14.errors.txt b/tests/baselines/reference/parserComputedPropertyName14.errors.txt index d2f7ad34ed9..6ac2d276a80 100644 --- a/tests/baselines/reference/parserComputedPropertyName14.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName14.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts(1,10): error TS1170: Computed property names are not allowed in type literals. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts (2 errors) ==== var v: { [e](): number }; ~~~ -!!! error TS1170: Computed property names are not allowed in type literals. \ No newline at end of file +!!! error TS1170: Computed property names are not allowed in type literals. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName15.errors.txt b/tests/baselines/reference/parserComputedPropertyName15.errors.txt index b09ddb73112..f66e5930c26 100644 --- a/tests/baselines/reference/parserComputedPropertyName15.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName15.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts(1,31): error TS1170: Computed property names are not allowed in type literals. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts (2 errors) ==== var v: { [e: number]: string; [e]: number }; ~~~ -!!! error TS1170: Computed property names are not allowed in type literals. \ No newline at end of file +!!! error TS1170: Computed property names are not allowed in type literals. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName18.errors.txt b/tests/baselines/reference/parserComputedPropertyName18.errors.txt index 72833dda837..f7485a127cb 100644 --- a/tests/baselines/reference/parserComputedPropertyName18.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName18.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts(1,10): error TS1170: Computed property names are not allowed in type literals. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts (2 errors) ==== var v: { [e]?(): number }; ~~~ -!!! error TS1170: Computed property names are not allowed in type literals. \ No newline at end of file +!!! error TS1170: Computed property names are not allowed in type literals. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName19.errors.txt b/tests/baselines/reference/parserComputedPropertyName19.errors.txt index 22dbfff3c61..65c22ff36c3 100644 --- a/tests/baselines/reference/parserComputedPropertyName19.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName19.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts(1,10): error TS1170: Computed property names are not allowed in type literals. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts (2 errors) ==== var v: { [e]? }; ~~~ -!!! error TS1170: Computed property names are not allowed in type literals. \ No newline at end of file +!!! error TS1170: Computed property names are not allowed in type literals. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName20.errors.txt b/tests/baselines/reference/parserComputedPropertyName20.errors.txt index 36a7e2d4866..d65dfede1d2 100644 --- a/tests/baselines/reference/parserComputedPropertyName20.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName20.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts(2,5): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts(2,6): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts (2 errors) ==== interface I { [e](): number ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName21.errors.txt b/tests/baselines/reference/parserComputedPropertyName21.errors.txt index 5850de24b76..5a9738a23a6 100644 --- a/tests/baselines/reference/parserComputedPropertyName21.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName21.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts(2,5): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts(2,6): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts (2 errors) ==== interface I { [e]: number ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName22.errors.txt b/tests/baselines/reference/parserComputedPropertyName22.errors.txt index 5149c937108..ce20dd0c587 100644 --- a/tests/baselines/reference/parserComputedPropertyName22.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName22.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts(2,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts (2 errors) ==== declare class C { [e]: number ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName23.errors.txt b/tests/baselines/reference/parserComputedPropertyName23.errors.txt index 2018032ef94..8c95992253c 100644 --- a/tests/baselines/reference/parserComputedPropertyName23.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName23.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts(2,9): error TS1086: An accessor cannot be declared in an ambient context. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts (2 errors) ==== declare class C { get [e](): number ~~~ !!! error TS1086: An accessor cannot be declared in an ambient context. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName24.errors.txt b/tests/baselines/reference/parserComputedPropertyName24.errors.txt new file mode 100644 index 00000000000..29bcb05ea0f --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName24.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts (1 errors) ==== + class C { + set [e](v) { } + ~ +!!! error TS2304: Cannot find name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName24.types b/tests/baselines/reference/parserComputedPropertyName24.types deleted file mode 100644 index d2de5244057..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName24.types +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts === -class C { ->C : C - - set [e](v) { } ->e : unknown ->v : any -} diff --git a/tests/baselines/reference/parserComputedPropertyName25.errors.txt b/tests/baselines/reference/parserComputedPropertyName25.errors.txt index c8dd6b3bc7c..8d26c8afdb7 100644 --- a/tests/baselines/reference/parserComputedPropertyName25.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName25.errors.txt @@ -1,13 +1,16 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(3,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts (3 errors) ==== class C { // No ASI [e] = 0 ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. [e2] = 1 ~~ !!! error TS2304: Cannot find name 'e2'. diff --git a/tests/baselines/reference/parserComputedPropertyName27.errors.txt b/tests/baselines/reference/parserComputedPropertyName27.errors.txt index 7c8e30bf25d..3792cf0eccd 100644 --- a/tests/baselines/reference/parserComputedPropertyName27.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName27.errors.txt @@ -1,11 +1,14 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts (3 errors) ==== class C { // No ASI [e]: number = 0 + ~ +!!! error TS2304: Cannot find name 'e'. [e2]: number ~~ !!! error TS2304: Cannot find name 'e2'. diff --git a/tests/baselines/reference/parserComputedPropertyName28.errors.txt b/tests/baselines/reference/parserComputedPropertyName28.errors.txt index bc32f34c151..c522ec031eb 100644 --- a/tests/baselines/reference/parserComputedPropertyName28.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName28.errors.txt @@ -1,13 +1,19 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(2,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(3,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts (4 errors) ==== class C { [e]: number = 0; ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. [e2]: number ~~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~~ +!!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName29.errors.txt b/tests/baselines/reference/parserComputedPropertyName29.errors.txt index 691a240375a..5e6baed0f06 100644 --- a/tests/baselines/reference/parserComputedPropertyName29.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName29.errors.txt @@ -1,17 +1,23 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(4,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts (5 errors) ==== class C { // yes ASI [e] = id++ ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. ~~ !!! error TS2304: Cannot find name 'id'. [e2]: number ~~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~~ +!!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName31.errors.txt b/tests/baselines/reference/parserComputedPropertyName31.errors.txt index 6dddbd859c9..97a3b1ee187 100644 --- a/tests/baselines/reference/parserComputedPropertyName31.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName31.errors.txt @@ -1,14 +1,20 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(3,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(4,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts (4 errors) ==== class C { // yes ASI [e]: number ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. [e2]: number ~~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~~ +!!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName32.errors.txt b/tests/baselines/reference/parserComputedPropertyName32.errors.txt index 4407014cf99..da423baaa05 100644 --- a/tests/baselines/reference/parserComputedPropertyName32.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName32.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts(2,5): error TS1165: Computed property names are not allowed in an ambient context. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts (2 errors) ==== declare class C { [e](): number ~~~ !!! error TS1165: Computed property names are not allowed in an ambient context. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName33.errors.txt b/tests/baselines/reference/parserComputedPropertyName33.errors.txt index d56ee49863f..5ce420ceb60 100644 --- a/tests/baselines/reference/parserComputedPropertyName33.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName33.errors.txt @@ -1,12 +1,15 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts (4 errors) ==== class C { // No ASI [e] = 0 + ~ +!!! error TS2304: Cannot find name 'e'. [e2]() { } ~~ !!! error TS2304: Cannot find name 'e2'. diff --git a/tests/baselines/reference/parserComputedPropertyName36.errors.txt b/tests/baselines/reference/parserComputedPropertyName36.errors.txt index d10d826d1a9..1b4130b0e27 100644 --- a/tests/baselines/reference/parserComputedPropertyName36.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName36.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts (2 errors) ==== class C { [public ]: string; ~~~~~~~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName38.errors.txt b/tests/baselines/reference/parserComputedPropertyName38.errors.txt new file mode 100644 index 00000000000..4322abf44ed --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName38.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts (1 errors) ==== + class C { + [public]() { } + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName38.types b/tests/baselines/reference/parserComputedPropertyName38.types deleted file mode 100644 index c77b9fcc67f..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName38.types +++ /dev/null @@ -1,7 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts === -class C { ->C : C - - [public]() { } ->public : unknown -} diff --git a/tests/baselines/reference/parserComputedPropertyName40.errors.txt b/tests/baselines/reference/parserComputedPropertyName40.errors.txt new file mode 100644 index 00000000000..862836ae47d --- /dev/null +++ b/tests/baselines/reference/parserComputedPropertyName40.errors.txt @@ -0,0 +1,9 @@ +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts(2,6): error TS2304: Cannot find name 'a'. + + +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts (1 errors) ==== + class C { + [a ? "" : ""]() {} + ~ +!!! error TS2304: Cannot find name 'a'. + } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName40.types b/tests/baselines/reference/parserComputedPropertyName40.types deleted file mode 100644 index 1b0b3ae49f0..00000000000 --- a/tests/baselines/reference/parserComputedPropertyName40.types +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts === -class C { ->C : C - - [a ? "" : ""]() {} ->a ? "" : "" : string ->a : unknown -} diff --git a/tests/baselines/reference/parserComputedPropertyName7.errors.txt b/tests/baselines/reference/parserComputedPropertyName7.errors.txt index 21147be3074..bcf39b0ca0a 100644 --- a/tests/baselines/reference/parserComputedPropertyName7.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName7.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts (2 errors) ==== class C { [e] ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName8.errors.txt b/tests/baselines/reference/parserComputedPropertyName8.errors.txt index 75352ec9e51..250c7a52c6e 100644 --- a/tests/baselines/reference/parserComputedPropertyName8.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName8.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts(2,11): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts (2 errors) ==== class C { public [e] ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserComputedPropertyName9.errors.txt b/tests/baselines/reference/parserComputedPropertyName9.errors.txt index eb5cfd28d73..fd434046564 100644 --- a/tests/baselines/reference/parserComputedPropertyName9.errors.txt +++ b/tests/baselines/reference/parserComputedPropertyName9.errors.txt @@ -1,12 +1,15 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. -==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts (3 errors) ==== class C { [e]: Type ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. ~~~~ !!! error TS2304: Cannot find name 'Type'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName1.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName1.errors.txt index 5bae79b95aa..55af923e54b 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName1.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName1.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts(2,5): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts (2 errors) ==== declare class C { [e]: number ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName10.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName10.errors.txt index 40bec1b4f38..7db85cdef35 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName10.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName10.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts (2 errors) ==== class C { [e] = 1 ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName11.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName11.errors.txt index 124db7da75a..ead27a994d1 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName11.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName11.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,4): error TS1168: Computed property names are not allowed in method overloads. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts (2 errors) ==== class C { [e](); ~~~ !!! error TS1168: Computed property names are not allowed in method overloads. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName5.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName5.errors.txt index 8eeeef1516f..122ca20a0e4 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName5.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName5.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts(2,5): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts(2,6): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts (2 errors) ==== interface I { [e]: number ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName7.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName7.errors.txt index 6aefd27ef58..d38d57d87be 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName7.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName7.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts (2 errors) ==== class C { [e] ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName8.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName8.errors.txt index 4595081c145..e52727c6929 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName8.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName8.errors.txt @@ -1,7 +1,10 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts(1,10): error TS1170: Computed property names are not allowed in type literals. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. -==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts (2 errors) ==== var v: { [e]: number }; ~~~ -!!! error TS1170: Computed property names are not allowed in type literals. \ No newline at end of file +!!! error TS1170: Computed property names are not allowed in type literals. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/parserES5ComputedPropertyName9.errors.txt b/tests/baselines/reference/parserES5ComputedPropertyName9.errors.txt index 6d035a7c610..8cbe0ffcf8d 100644 --- a/tests/baselines/reference/parserES5ComputedPropertyName9.errors.txt +++ b/tests/baselines/reference/parserES5ComputedPropertyName9.errors.txt @@ -1,12 +1,15 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,4): error TS1166: Computed property names are not allowed in class property declarations. +tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. -==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts (3 errors) ==== class C { [e]: Type ~~~ !!! error TS1166: Computed property names are not allowed in class property declarations. + ~ +!!! error TS2304: Cannot find name 'e'. ~~~~ !!! error TS2304: Cannot find name 'Type'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserIndexSignature11.errors.txt b/tests/baselines/reference/parserIndexSignature11.errors.txt index c9976e2bc4a..8cf474b19bb 100644 --- a/tests/baselines/reference/parserIndexSignature11.errors.txt +++ b/tests/baselines/reference/parserIndexSignature11.errors.txt @@ -1,13 +1,16 @@ tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,9): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,10): error TS2304: Cannot find name 'p'. tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation. tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter. -==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts (3 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts (4 errors) ==== interface I { - [p]; + [p]; // Used to be indexer, now it is a computed property ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'p'. [p1: string]; ~~~~~~~~~~~~~ !!! error TS1021: An index signature must have a type annotation. diff --git a/tests/baselines/reference/parserIndexSignature4.errors.txt b/tests/baselines/reference/parserIndexSignature4.errors.txt index 0f11eb17f3c..d625f27eb6f 100644 --- a/tests/baselines/reference/parserIndexSignature4.errors.txt +++ b/tests/baselines/reference/parserIndexSignature4.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts(2,3): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts(2,4): error TS2304: Cannot find name 'a'. -==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts (2 errors) ==== interface I { - [a = 0] + [a = 0] // Used to be indexer, now it is a computed property ~~~~~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'a'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserIndexSignature5.errors.txt b/tests/baselines/reference/parserIndexSignature5.errors.txt index 6400383f9d2..3f3415973d9 100644 --- a/tests/baselines/reference/parserIndexSignature5.errors.txt +++ b/tests/baselines/reference/parserIndexSignature5.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts(2,3): error TS1169: Computed property names are not allowed in interfaces. +tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts(2,4): error TS2304: Cannot find name 'a'. -==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts (2 errors) ==== interface I { - [a] + [a] // Used to be indexer, now it is a computed property ~~~ !!! error TS1169: Computed property names are not allowed in interfaces. + ~ +!!! error TS2304: Cannot find name 'a'. } \ No newline at end of file diff --git a/tests/baselines/reference/propertyAssignment.errors.txt b/tests/baselines/reference/propertyAssignment.errors.txt index 2ea55a1a2d3..51850754a9a 100644 --- a/tests/baselines/reference/propertyAssignment.errors.txt +++ b/tests/baselines/reference/propertyAssignment.errors.txt @@ -1,17 +1,20 @@ tests/cases/compiler/propertyAssignment.ts(6,13): error TS1170: Computed property names are not allowed in type literals. +tests/cases/compiler/propertyAssignment.ts(6,14): error TS2304: Cannot find name 'index'. tests/cases/compiler/propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. tests/cases/compiler/propertyAssignment.ts(16,1): error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. -==== tests/cases/compiler/propertyAssignment.ts (3 errors) ==== +==== tests/cases/compiler/propertyAssignment.ts (4 errors) ==== var foo1: { new ():any; } var bar1: { x : number; } - var foo2: { [index]; } // should be an error + var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property ~~~~~~~ !!! error TS1170: Computed property names are not allowed in type literals. + ~~~~~ +!!! error TS2304: Cannot find name 'index'. var bar2: { x : number; } var foo3: { ():void; } diff --git a/tests/cases/compiler/complicatedPrivacy.ts b/tests/cases/compiler/complicatedPrivacy.ts index 6c1e3fa8527..6fe144d237c 100644 --- a/tests/cases/compiler/complicatedPrivacy.ts +++ b/tests/cases/compiler/complicatedPrivacy.ts @@ -33,7 +33,7 @@ module m1 { export function f4(arg1: { - [number]: C1; + [number]: C1; // Used to be indexer, now it is a computed property }) { } diff --git a/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts b/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts index fbe24e975e9..47d818065a1 100644 --- a/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts +++ b/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts @@ -1,9 +1,11 @@ interface I { + // Used to be indexer, now it is a computed property [x]: string; [x: string]; } class C { + // Used to be indexer, now it is a computed property [x]: string } diff --git a/tests/cases/compiler/indexSignatureWithInitializer.ts b/tests/cases/compiler/indexSignatureWithInitializer.ts index a7b185eee0e..f9a4aafc699 100644 --- a/tests/cases/compiler/indexSignatureWithInitializer.ts +++ b/tests/cases/compiler/indexSignatureWithInitializer.ts @@ -1,3 +1,4 @@ +// These used to be indexers, now they are computed properties interface I { [x = '']: string; } diff --git a/tests/cases/compiler/indexWithoutParamType2.ts b/tests/cases/compiler/indexWithoutParamType2.ts index 9a1976fe9ef..0def5dc06a9 100644 --- a/tests/cases/compiler/indexWithoutParamType2.ts +++ b/tests/cases/compiler/indexWithoutParamType2.ts @@ -1,3 +1,4 @@ class C { + // Used to be indexer, now it is a computed property [x]: string } \ No newline at end of file diff --git a/tests/cases/compiler/intTypeCheck.ts b/tests/cases/compiler/intTypeCheck.ts index 787dc944c43..a1563097863 100644 --- a/tests/cases/compiler/intTypeCheck.ts +++ b/tests/cases/compiler/intTypeCheck.ts @@ -31,8 +31,9 @@ interface i3 { new (p6: string, ...p7: any[]); } interface i4 { - //Index Signatures + // Used to be indexer, now it is a computed property [p]; + //Index Signatures [p1: string]; [p2: string, p3: number]; } @@ -65,9 +66,10 @@ interface i11 { new (...p3: any[]); new (p4: string, p5?: string); new (p6: string, ...p7: any[]); - - //Index Signatures + + // Used to be indexer, now it is a computed property [p]; + //Index Signatures [p1: string]; [p2: string, p3: number]; diff --git a/tests/cases/compiler/propertyAssignment.ts b/tests/cases/compiler/propertyAssignment.ts index 0afb8fb60a7..0c8351fb05d 100644 --- a/tests/cases/compiler/propertyAssignment.ts +++ b/tests/cases/compiler/propertyAssignment.ts @@ -3,7 +3,7 @@ var foo1: { new ():any; } var bar1: { x : number; } -var foo2: { [index]; } // should be an error +var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property var bar2: { x : number; } var foo3: { ():void; } diff --git a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts index 4ef57a277ac..1c78f24a213 100644 --- a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts +++ b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts @@ -1,5 +1,5 @@ interface I { - [p]; + [p]; // Used to be indexer, now it is a computed property [p1: string]; [p2: string, p3: number]; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts index a12f8aecf21..a6cf3a720a9 100644 --- a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts +++ b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts @@ -1,3 +1,3 @@ interface I { - [a = 0] + [a = 0] // Used to be indexer, now it is a computed property } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts index 5970ab6d8fb..e77c8fe9bb0 100644 --- a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts +++ b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts @@ -1,3 +1,3 @@ interface I { - [a] + [a] // Used to be indexer, now it is a computed property } \ No newline at end of file