From 3af3177fe3bae91761611fa419aedaaf5842080e Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Thu, 2 Jul 2015 10:26:36 -0700 Subject: [PATCH] update baselines --- .../reference/augmentedTypesClass2.errors.txt | 8 +-- .../augmentedTypesInterface.errors.txt | 8 +-- .../classAbstractMergedDeclaration.errors.txt | 71 ++++++++++++++----- .../classAbstractMergedDeclaration.js | 22 +++++- .../classAndInterfaceWithSameName.errors.txt | 16 ++--- .../reference/clinterfaces.errors.txt | 32 ++++----- .../baselines/reference/declInput.errors.txt | 8 +-- ...ifiersAcrossContainerBoundaries.errors.txt | 8 +-- ...IdentifiersAcrossFileBoundaries.errors.txt | 16 ++--- .../interfaceDeclaration2.errors.txt | 8 +-- .../reference/mergedClassInterface.errors.txt | 16 ++--- .../reference/nameCollisions.errors.txt | 16 ++--- ...tringsArrayTypeDefinedInES5Mode.errors.txt | 4 +- ...ingsArrayTypeRedefinedInES6Mode.errors.txt | 4 +- 14 files changed, 147 insertions(+), 90 deletions(-) diff --git a/tests/baselines/reference/augmentedTypesClass2.errors.txt b/tests/baselines/reference/augmentedTypesClass2.errors.txt index da963c59d94..278dca816fa 100644 --- a/tests/baselines/reference/augmentedTypesClass2.errors.txt +++ b/tests/baselines/reference/augmentedTypesClass2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/augmentedTypesClass2.ts(4,7): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/augmentedTypesClass2.ts(10,11): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/augmentedTypesClass2.ts(4,7): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/augmentedTypesClass2.ts(10,11): error TS2518: Only an ambient class can be merged with an interface. tests/cases/compiler/augmentedTypesClass2.ts(16,7): error TS2300: Duplicate identifier 'c33'. tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate identifier 'c33'. @@ -10,7 +10,7 @@ tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate iden // class then interface class c11 { // error ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. foo() { return 1; } @@ -18,7 +18,7 @@ tests/cases/compiler/augmentedTypesClass2.ts(21,6): error TS2300: Duplicate iden interface c11 { // error ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. bar(): void; } diff --git a/tests/baselines/reference/augmentedTypesInterface.errors.txt b/tests/baselines/reference/augmentedTypesInterface.errors.txt index 44c47e70ab3..690bf8b7a99 100644 --- a/tests/baselines/reference/augmentedTypesInterface.errors.txt +++ b/tests/baselines/reference/augmentedTypesInterface.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/augmentedTypesInterface.ts(12,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/augmentedTypesInterface.ts(16,7): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/augmentedTypesInterface.ts(12,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/augmentedTypesInterface.ts(16,7): error TS2518: Only an ambient class can be merged with an interface. tests/cases/compiler/augmentedTypesInterface.ts(23,11): error TS2300: Duplicate identifier 'i3'. tests/cases/compiler/augmentedTypesInterface.ts(26,6): error TS2300: Duplicate identifier 'i3'. @@ -18,13 +18,13 @@ tests/cases/compiler/augmentedTypesInterface.ts(26,6): error TS2300: Duplicate i // interface then class interface i2 { // error ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. foo(): void; } class i2 { // error ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. bar() { return 1; } diff --git a/tests/baselines/reference/classAbstractMergedDeclaration.errors.txt b/tests/baselines/reference/classAbstractMergedDeclaration.errors.txt index ca2cc3b8c2d..b3a2dec5e9c 100644 --- a/tests/baselines/reference/classAbstractMergedDeclaration.errors.txt +++ b/tests/baselines/reference/classAbstractMergedDeclaration.errors.txt @@ -1,19 +1,26 @@ -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(7,16): error TS2300: Duplicate identifier 'CI'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(8,11): error TS2300: Duplicate identifier 'CI'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(10,11): error TS2300: Duplicate identifier 'IC'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(11,16): error TS2300: Duplicate identifier 'IC'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(7,16): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(8,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(10,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(11,16): error TS2518: Only an ambient class can be merged with an interface. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(13,16): error TS2300: Duplicate identifier 'CC1'. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(14,7): error TS2300: Duplicate identifier 'CC1'. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(16,7): error TS2300: Duplicate identifier 'CC2'. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(17,16): error TS2300: Duplicate identifier 'CC2'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(19,1): error TS2511: Cannot create an instance of the abstract class 'CM'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(20,1): error TS2511: Cannot create an instance of the abstract class 'MC'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(21,1): error TS2511: Cannot create an instance of the abstract class 'CI'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(22,5): error TS2304: Cannot find name 'IC'. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(23,1): error TS2511: Cannot create an instance of the abstract class 'CC1'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(25,24): error TS2300: Duplicate identifier 'DCC1'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(26,15): error TS2300: Duplicate identifier 'DCC1'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(28,15): error TS2300: Duplicate identifier 'DCC2'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(29,24): error TS2300: Duplicate identifier 'DCC2'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(31,1): error TS2511: Cannot create an instance of the abstract class 'CM'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(32,1): error TS2511: Cannot create an instance of the abstract class 'MC'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(33,1): error TS2511: Cannot create an instance of the abstract class 'CI'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(34,1): error TS2511: Cannot create an instance of the abstract class 'IC'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(35,1): error TS2511: Cannot create an instance of the abstract class 'CC1'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(37,1): error TS2511: Cannot create an instance of the abstract class 'DCI'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(38,1): error TS2511: Cannot create an instance of the abstract class 'DIC'. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts(39,1): error TS2511: Cannot create an instance of the abstract class 'DCC1'. -==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts (13 errors) ==== +==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts (20 errors) ==== abstract class CM {} module CM {} @@ -22,17 +29,17 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst abstract class CI {} ~~ -!!! error TS2300: Duplicate identifier 'CI'. +!!! error TS2518: Only an ambient class can be merged with an interface. interface CI {} ~~ -!!! error TS2300: Duplicate identifier 'CI'. +!!! error TS2518: Only an ambient class can be merged with an interface. interface IC {} ~~ -!!! error TS2300: Duplicate identifier 'IC'. +!!! error TS2518: Only an ambient class can be merged with an interface. abstract class IC {} ~~ -!!! error TS2300: Duplicate identifier 'IC'. +!!! error TS2518: Only an ambient class can be merged with an interface. abstract class CC1 {} ~~~ @@ -48,6 +55,26 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst ~~~ !!! error TS2300: Duplicate identifier 'CC2'. + declare abstract class DCI {} + interface DCI {} + + interface DIC {} + declare abstract class DIC {} + + declare abstract class DCC1 {} + ~~~~ +!!! error TS2300: Duplicate identifier 'DCC1'. + declare class DCC1 {} + ~~~~ +!!! error TS2300: Duplicate identifier 'DCC1'. + + declare class DCC2 {} + ~~~~ +!!! error TS2300: Duplicate identifier 'DCC2'. + declare abstract class DCC2 {} + ~~~~ +!!! error TS2300: Duplicate identifier 'DCC2'. + new CM; ~~~~~~ !!! error TS2511: Cannot create an instance of the abstract class 'CM'. @@ -58,9 +85,19 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst ~~~~~~ !!! error TS2511: Cannot create an instance of the abstract class 'CI'. new IC; - ~~ -!!! error TS2304: Cannot find name 'IC'. + ~~~~~~ +!!! error TS2511: Cannot create an instance of the abstract class 'IC'. new CC1; ~~~~~~~ !!! error TS2511: Cannot create an instance of the abstract class 'CC1'. - new CC2; \ No newline at end of file + new CC2; + new DCI; + ~~~~~~~ +!!! error TS2511: Cannot create an instance of the abstract class 'DCI'. + new DIC; + ~~~~~~~ +!!! error TS2511: Cannot create an instance of the abstract class 'DIC'. + new DCC1; + ~~~~~~~~ +!!! error TS2511: Cannot create an instance of the abstract class 'DCC1'. + new DCC2; \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractMergedDeclaration.js b/tests/baselines/reference/classAbstractMergedDeclaration.js index 1b4d6fea342..f6a91f870d2 100644 --- a/tests/baselines/reference/classAbstractMergedDeclaration.js +++ b/tests/baselines/reference/classAbstractMergedDeclaration.js @@ -17,12 +17,28 @@ class CC1 {} class CC2 {} abstract class CC2 {} +declare abstract class DCI {} +interface DCI {} + +interface DIC {} +declare abstract class DIC {} + +declare abstract class DCC1 {} +declare class DCC1 {} + +declare class DCC2 {} +declare abstract class DCC2 {} + new CM; new MC; new CI; new IC; new CC1; -new CC2; +new CC2; +new DCI; +new DIC; +new DCC1; +new DCC2; //// [classAbstractMergedDeclaration.js] var CM = (function () { @@ -71,3 +87,7 @@ new CI; new IC; new CC1; new CC2; +new DCI; +new DIC; +new DCC1; +new DCC2; diff --git a/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt b/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt index b2b59c29009..332024b74fd 100644 --- a/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt +++ b/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt @@ -1,29 +1,29 @@ -tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(1,7): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(1,7): error TS2518: Only an ambient class can be merged with an interface. tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(1,11): error TS2300: Duplicate identifier 'foo'. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(2,11): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(2,11): error TS2518: Only an ambient class can be merged with an interface. tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(2,15): error TS2300: Duplicate identifier 'foo'. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(5,11): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(5,11): error TS2518: Only an ambient class can be merged with an interface. tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(6,9): error TS2300: Duplicate identifier 'bar'. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(9,15): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(9,15): error TS2518: Only an ambient class can be merged with an interface. tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(10,9): error TS2300: Duplicate identifier 'bar'. ==== tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts (8 errors) ==== class C { foo: string; } ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. ~~~ !!! error TS2300: Duplicate identifier 'foo'. interface C { foo: string; } // error ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. ~~~ !!! error TS2300: Duplicate identifier 'foo'. module M { class D { ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. bar: string; ~~~ !!! error TS2300: Duplicate identifier 'bar'. @@ -31,7 +31,7 @@ tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName. interface D { // error ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. bar: string; ~~~ !!! error TS2300: Duplicate identifier 'bar'. diff --git a/tests/baselines/reference/clinterfaces.errors.txt b/tests/baselines/reference/clinterfaces.errors.txt index 8d48f29aed7..5960e6ae32b 100644 --- a/tests/baselines/reference/clinterfaces.errors.txt +++ b/tests/baselines/reference/clinterfaces.errors.txt @@ -1,50 +1,50 @@ -tests/cases/compiler/clinterfaces.ts(2,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/clinterfaces.ts(3,15): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/clinterfaces.ts(4,15): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/clinterfaces.ts(5,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/clinterfaces.ts(8,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/clinterfaces.ts(12,7): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/clinterfaces.ts(16,7): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/clinterfaces.ts(20,11): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(2,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(3,15): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(4,15): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(5,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(8,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(12,7): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(16,7): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(20,11): error TS2518: Only an ambient class can be merged with an interface. ==== tests/cases/compiler/clinterfaces.ts (8 errors) ==== module M { class C { } ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. interface C { } ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. interface D { } ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. class D { } ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. } interface Foo { ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. a: string; } class Foo{ ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. b: number; } class Bar{ ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. b: number; } interface Bar { ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. a: string; } diff --git a/tests/baselines/reference/declInput.errors.txt b/tests/baselines/reference/declInput.errors.txt index 76257de6ea9..179db3598ab 100644 --- a/tests/baselines/reference/declInput.errors.txt +++ b/tests/baselines/reference/declInput.errors.txt @@ -1,17 +1,17 @@ -tests/cases/compiler/declInput.ts(1,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/declInput.ts(5,7): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/declInput.ts(1,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/declInput.ts(5,7): error TS2518: Only an ambient class can be merged with an interface. ==== tests/cases/compiler/declInput.ts (2 errors) ==== interface bar { ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. } class bar { ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. public f() { return ''; } public g() { return {a: null, b: undefined, c: void 4 }; } public h(x = 4, y = null, z = '') { x++; } diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt index 67ee1d9cc37..731e9748203 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt +++ b/tests/baselines/reference/duplicateIdentifiersAcrossContainerBoundaries.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(2,22): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(5,18): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(2,22): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(5,18): error TS2518: Only an ambient class can be merged with an interface. tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(9,21): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(12,18): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(37,12): error TS2300: Duplicate identifier 'x'. @@ -10,12 +10,12 @@ tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(41,16): er module M { export interface I { } ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. } module M { export class I { } // error ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. } module M { diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.errors.txt b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.errors.txt index c98e0e9a8c6..9867441f770 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.errors.txt +++ b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/file1.ts(2,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/file1.ts(3,7): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/file1.ts(2,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/file1.ts(3,7): error TS2518: Only an ambient class can be merged with an interface. tests/cases/compiler/file1.ts(4,7): error TS2300: Duplicate identifier 'C2'. tests/cases/compiler/file1.ts(5,10): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/file1.ts(9,12): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/file2.ts(1,7): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/file2.ts(2,11): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/file2.ts(1,7): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/file2.ts(2,11): error TS2518: Only an ambient class can be merged with an interface. tests/cases/compiler/file2.ts(3,10): error TS2300: Duplicate identifier 'C2'. tests/cases/compiler/file2.ts(4,7): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/file2.ts(7,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged @@ -15,10 +15,10 @@ tests/cases/compiler/file2.ts(8,16): error TS2300: Duplicate identifier 'x'. interface I { } ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. class C1 { } ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. class C2 { } ~~ !!! error TS2300: Duplicate identifier 'C2'. @@ -42,10 +42,10 @@ tests/cases/compiler/file2.ts(8,16): error TS2300: Duplicate identifier 'x'. ==== tests/cases/compiler/file2.ts (6 errors) ==== class I { } // error -- cannot merge interface with non-ambient class ~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. interface C1 { } // error -- cannot merge interface with non-ambient class ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. function C2() { } // error -- cannot merge function with non-ambient class ~~ !!! error TS2300: Duplicate identifier 'C2'. diff --git a/tests/baselines/reference/interfaceDeclaration2.errors.txt b/tests/baselines/reference/interfaceDeclaration2.errors.txt index 1d5807b9b1b..db525e6f21f 100644 --- a/tests/baselines/reference/interfaceDeclaration2.errors.txt +++ b/tests/baselines/reference/interfaceDeclaration2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/interfaceDeclaration2.ts(4,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/interfaceDeclaration2.ts(5,7): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/interfaceDeclaration2.ts(4,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/interfaceDeclaration2.ts(5,7): error TS2518: Only an ambient class can be merged with an interface. ==== tests/cases/compiler/interfaceDeclaration2.ts (2 errors) ==== @@ -8,10 +8,10 @@ tests/cases/compiler/interfaceDeclaration2.ts(5,7): error TS2511: Only an ambien interface I2 { } ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. class I2 { } ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. interface I3 { } function I3() { } diff --git a/tests/baselines/reference/mergedClassInterface.errors.txt b/tests/baselines/reference/mergedClassInterface.errors.txt index 37bd595c0b7..5b23b046db7 100644 --- a/tests/baselines/reference/mergedClassInterface.errors.txt +++ b/tests/baselines/reference/mergedClassInterface.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/classDeclarations/file1.ts(11,7): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/conformance/classes/classDeclarations/file1.ts(13,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/conformance/classes/classDeclarations/file1.ts(15,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/conformance/classes/classDeclarations/file1.ts(17,7): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/file1.ts(11,7): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/file1.ts(13,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/file1.ts(15,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/file1.ts(17,7): error TS2518: Only an ambient class can be merged with an interface. ==== tests/cases/conformance/classes/classDeclarations/file1.ts (4 errors) ==== @@ -17,19 +17,19 @@ tests/cases/conformance/classes/classDeclarations/file1.ts(17,7): error TS2511: class C3 { } // error -- cannot merge non-ambient class and interface ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. interface C3 { } // error -- cannot merge non-ambient class and interface ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. interface C4 { } // error -- cannot merge non-ambient class and interface ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. class C4 { } // error -- cannot merge non-ambient class and interface ~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. interface C5 { x1: number; diff --git a/tests/baselines/reference/nameCollisions.errors.txt b/tests/baselines/reference/nameCollisions.errors.txt index 2aba1c43f86..5c32d464070 100644 --- a/tests/baselines/reference/nameCollisions.errors.txt +++ b/tests/baselines/reference/nameCollisions.errors.txt @@ -11,10 +11,10 @@ tests/cases/compiler/nameCollisions.ts(33,11): error TS2300: Duplicate identifie tests/cases/compiler/nameCollisions.ts(34,14): error TS2300: Duplicate identifier 'C'. tests/cases/compiler/nameCollisions.ts(36,14): error TS2300: Duplicate identifier 'C2'. tests/cases/compiler/nameCollisions.ts(37,11): error TS2300: Duplicate identifier 'C2'. -tests/cases/compiler/nameCollisions.ts(42,11): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/nameCollisions.ts(43,15): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/nameCollisions.ts(45,15): error TS2511: Only an ambient class can be merged with an interface. -tests/cases/compiler/nameCollisions.ts(46,11): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/nameCollisions.ts(42,11): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/nameCollisions.ts(43,15): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/nameCollisions.ts(45,15): error TS2518: Only an ambient class can be merged with an interface. +tests/cases/compiler/nameCollisions.ts(46,11): error TS2518: Only an ambient class can be merged with an interface. ==== tests/cases/compiler/nameCollisions.ts (17 errors) ==== @@ -87,15 +87,15 @@ tests/cases/compiler/nameCollisions.ts(46,11): error TS2511: Only an ambient cla class cli { } ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. interface cli { } // error ~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. interface cli2 { } ~~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. class cli2 { } // error ~~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. } \ No newline at end of file diff --git a/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt b/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt index a51eb18d98e..69d686c3156 100644 --- a/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt +++ b/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(2,7): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(2,7): error TS2518: Only an ambient class can be merged with an interface. tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(8,3): error TS2345: Argument of type '{}' is not assignable to parameter of type 'TemplateStringsArray'. Property 'raw' is missing in type '{}'. @@ -7,7 +7,7 @@ tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(8,3): error TS2 class TemplateStringsArray { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. } function f(x: TemplateStringsArray, y: number, z: number) { diff --git a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt index d41c3d0cdbf..02ccd7f2413 100644 --- a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt +++ b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(2,7): error TS2511: Only an ambient class can be merged with an interface. +tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(2,7): error TS2518: Only an ambient class can be merged with an interface. tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(8,3): error TS2345: Argument of type '{}' is not assignable to parameter of type 'TemplateStringsArray'. Property 'raw' is missing in type '{}'. @@ -7,7 +7,7 @@ tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(8,3): error T class TemplateStringsArray { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2511: Only an ambient class can be merged with an interface. +!!! error TS2518: Only an ambient class can be merged with an interface. } function f(x: TemplateStringsArray, y: number, z: number) {