TypeScript/tests/baselines/reference/classAndInterfaceWithSameName.errors.txt
2015-07-02 10:26:36 -07:00

39 lines
2.1 KiB
Plaintext

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 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 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 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 TS2518: Only an ambient class can be merged with an interface.
~~~
!!! error TS2300: Duplicate identifier 'foo'.
interface C { foo: string; } // error
~
!!! error TS2518: Only an ambient class can be merged with an interface.
~~~
!!! error TS2300: Duplicate identifier 'foo'.
module M {
class D {
~
!!! error TS2518: Only an ambient class can be merged with an interface.
bar: string;
~~~
!!! error TS2300: Duplicate identifier 'bar'.
}
interface D { // error
~
!!! error TS2518: Only an ambient class can be merged with an interface.
bar: string;
~~~
!!! error TS2300: Duplicate identifier 'bar'.
}
}