From d000e0164b8b3bb548d1a1451057c0e83d6a1622 Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Wed, 3 Jun 2015 14:17:29 -0700 Subject: [PATCH] updated baselines to reflect new error message --- .../reference/augmentedTypesClass2.errors.txt | 8 ++--- .../augmentedTypesInterface.errors.txt | 8 ++--- .../classAndInterfaceMerge.d.errors.txt | 24 +++++++------- .../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 | 6 ++-- ...ingsArrayTypeRedefinedInES6Mode.errors.txt | 6 ++-- 13 files changed, 86 insertions(+), 86 deletions(-) diff --git a/tests/baselines/reference/augmentedTypesClass2.errors.txt b/tests/baselines/reference/augmentedTypesClass2.errors.txt index 2622429d743..9d0b7b25c34 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 TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/compiler/augmentedTypesClass2.ts(10,11): error TS2507: An interface cannot merge with a non-ambient class. +tests/cases/compiler/augmentedTypesClass2.ts(4,7): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/augmentedTypesClass2.ts(10,11): error TS2506: 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 TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: 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 TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: 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 9719539b344..8ee7dc4e1e8 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 TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/augmentedTypesInterface.ts(16,7): error TS2506: A non-ambient class cannot be merged with an interface. +tests/cases/compiler/augmentedTypesInterface.ts(12,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/augmentedTypesInterface.ts(16,7): error TS2506: 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 TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. foo(): void; } class i2 { // error ~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. bar() { return 1; } diff --git a/tests/baselines/reference/classAndInterfaceMerge.d.errors.txt b/tests/baselines/reference/classAndInterfaceMerge.d.errors.txt index d73e5fcb2f0..fa0d239cdc7 100644 --- a/tests/baselines/reference/classAndInterfaceMerge.d.errors.txt +++ b/tests/baselines/reference/classAndInterfaceMerge.d.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(12,15): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(14,11): error TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(16,15): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(18,15): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(20,18): error TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(24,22): error TS2507: An interface cannot merge with a non-ambient class. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(12,15): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(14,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(16,15): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(18,15): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(20,18): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(24,22): error TS2506: Only an ambient class can be merged with an interface. ==== tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts (6 errors) ==== @@ -20,27 +20,27 @@ tests/cases/conformance/classes/classDeclarations/classAndInterfaceMerge.d.ts(24 interface C1 { } ~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. class C1 { } ~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. interface C1 { } ~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. interface C1 { } ~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. export class C2 { } ~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. } declare module M { export interface C2 { } ~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. } \ No newline at end of file diff --git a/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt b/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt index 6bf95880ceb..170ff29226b 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 TS2506: A non-ambient class cannot be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(1,7): error TS2506: 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 TS2507: An interface cannot merge with a non-ambient class. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(2,11): error TS2506: 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 TS2506: A non-ambient class cannot be merged with an interface. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(5,11): error TS2506: 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 TS2507: An interface cannot merge with a non-ambient class. +tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts(9,15): error TS2506: 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 TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. ~~~ !!! error TS2300: Duplicate identifier 'foo'. interface C { foo: string; } // error ~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. ~~~ !!! error TS2300: Duplicate identifier 'foo'. module M { class D { ~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: 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 TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: 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 6e172fa0d96..1d5ecd136f0 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 TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/compiler/clinterfaces.ts(3,15): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/clinterfaces.ts(4,15): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/clinterfaces.ts(5,11): error TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/compiler/clinterfaces.ts(8,11): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/clinterfaces.ts(12,7): error TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/compiler/clinterfaces.ts(16,7): error TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/compiler/clinterfaces.ts(20,11): error TS2507: An interface cannot merge with a non-ambient class. +tests/cases/compiler/clinterfaces.ts(2,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(3,15): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(4,15): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(5,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(8,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(12,7): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(16,7): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/clinterfaces.ts(20,11): error TS2506: Only an ambient class can be merged with an interface. ==== tests/cases/compiler/clinterfaces.ts (8 errors) ==== module M { class C { } ~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. interface C { } ~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. interface D { } ~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. class D { } ~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. } interface Foo { ~~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. a: string; } class Foo{ ~~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. b: number; } class Bar{ ~~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. b: number; } interface Bar { ~~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: 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 313866cf93d..4e12c802bee 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 TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/declInput.ts(5,7): error TS2506: A non-ambient class cannot be merged with an interface. +tests/cases/compiler/declInput.ts(1,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/declInput.ts(5,7): error TS2506: Only an ambient class can be merged with an interface. ==== tests/cases/compiler/declInput.ts (2 errors) ==== interface bar { ~~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. } class bar { ~~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: 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 77a7f4ffb35..f8b5c559515 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 TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(5,18): error TS2506: A non-ambient class cannot be merged with an interface. +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(2,22): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts(5,18): error TS2506: 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 TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. } module M { export class I { } // error ~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: 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 bd223330669..dcb2440aa26 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 TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/file1.ts(3,7): error TS2506: A non-ambient class cannot be merged with an interface. +tests/cases/compiler/file1.ts(2,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/file1.ts(3,7): error TS2506: 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 TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/compiler/file2.ts(2,11): error TS2507: An interface cannot merge with a non-ambient class. +tests/cases/compiler/file2.ts(1,7): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/file2.ts(2,11): error TS2506: 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 TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. class C1 { } ~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: 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 TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. interface C1 { } // error -- cannot merge interface with non-ambient class ~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: 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 06a0e247301..2789657a202 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 TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/interfaceDeclaration2.ts(5,7): error TS2506: A non-ambient class cannot be merged with an interface. +tests/cases/compiler/interfaceDeclaration2.ts(4,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/interfaceDeclaration2.ts(5,7): error TS2506: 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 TS2506: A non-ambient interface I2 { } ~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. class I2 { } ~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: 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 42f0a14b8ef..6177b5fa871 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 TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/conformance/classes/classDeclarations/file1.ts(13,11): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/conformance/classes/classDeclarations/file1.ts(15,11): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/conformance/classes/classDeclarations/file1.ts(17,7): error TS2506: A non-ambient class cannot be merged with an interface. +tests/cases/conformance/classes/classDeclarations/file1.ts(11,7): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/file1.ts(13,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/file1.ts(15,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/conformance/classes/classDeclarations/file1.ts(17,7): error TS2506: 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 TS2506: class C3 { } // error -- cannot merge non-ambient class and interface ~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. interface C3 { } // error -- cannot merge non-ambient class and interface ~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. interface C4 { } // error -- cannot merge non-ambient class and interface ~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. class C4 { } // error -- cannot merge non-ambient class and interface ~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: 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 d570d9e1278..bc7ec752573 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 TS2506: A non-ambient class cannot be merged with an interface. -tests/cases/compiler/nameCollisions.ts(43,15): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/nameCollisions.ts(45,15): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/nameCollisions.ts(46,11): error TS2506: A non-ambient class cannot be merged with an interface. +tests/cases/compiler/nameCollisions.ts(42,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/nameCollisions.ts(43,15): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/nameCollisions.ts(45,15): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/nameCollisions.ts(46,11): error TS2506: 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 TS2506: A non-ambient class class cli { } ~~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. interface cli { } // error ~~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. interface cli2 { } ~~~~ -!!! error TS2507: An interface cannot merge with a non-ambient class. +!!! error TS2506: Only an ambient class can be merged with an interface. class cli2 { } // error ~~~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: 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 9d6da3ec4b4..aabebad0552 100644 --- a/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt +++ b/tests/baselines/reference/templateStringsArrayTypeDefinedInES5Mode.errors.txt @@ -1,5 +1,5 @@ -lib.d.ts(521,11): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(2,7): error TS2506: A non-ambient class cannot be merged with an interface. +lib.d.ts(521,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(2,7): error TS2506: 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 '{}'. @@ -8,7 +8,7 @@ tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(8,3): error TS2 class TemplateStringsArray { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: 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 ffb619cedc7..8b1c5fbe0e2 100644 --- a/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt +++ b/tests/baselines/reference/templateStringsArrayTypeRedefinedInES6Mode.errors.txt @@ -1,5 +1,5 @@ -lib.d.ts(521,11): error TS2507: An interface cannot merge with a non-ambient class. -tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(2,7): error TS2506: A non-ambient class cannot be merged with an interface. +lib.d.ts(521,11): error TS2506: Only an ambient class can be merged with an interface. +tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(2,7): error TS2506: 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 '{}'. @@ -8,7 +8,7 @@ tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(8,3): error T class TemplateStringsArray { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2506: A non-ambient class cannot be merged with an interface. +!!! error TS2506: Only an ambient class can be merged with an interface. } function f(x: TemplateStringsArray, y: number, z: number) {