TypeScript/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.errors.txt

68 lines
2.8 KiB
Plaintext
Raw Normal View History

2015-07-02 19:26:36 +02:00
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.
2015-06-03 02:34:34 +02:00
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'.
2015-07-02 19:26:36 +02:00
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.
2015-06-03 00:26:43 +02:00
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
tests/cases/compiler/file2.ts(8,16): error TS2300: Duplicate identifier 'x'.
==== tests/cases/compiler/file1.ts (5 errors) ====
2015-06-03 02:34:34 +02:00
2015-06-03 00:26:43 +02:00
interface I { }
~
2015-07-02 19:26:36 +02:00
!!! error TS2518: Only an ambient class can be merged with an interface.
2015-06-03 00:26:43 +02:00
class C1 { }
~~
2015-07-02 19:26:36 +02:00
!!! error TS2518: Only an ambient class can be merged with an interface.
2015-06-03 00:26:43 +02:00
class C2 { }
~~
!!! error TS2300: Duplicate identifier 'C2'.
function f() { }
~
!!! error TS2300: Duplicate identifier 'f'.
var v = 3;
class Foo {
static x: number;
~
!!! error TS2300: Duplicate identifier 'x'.
}
module N {
export module F {
var t;
}
}
==== tests/cases/compiler/file2.ts (6 errors) ====
class I { } // error -- cannot merge interface with non-ambient class
~
2015-07-02 19:26:36 +02:00
!!! error TS2518: Only an ambient class can be merged with an interface.
2015-06-03 00:26:43 +02:00
interface C1 { } // error -- cannot merge interface with non-ambient class
~~
2015-07-02 19:26:36 +02:00
!!! error TS2518: Only an ambient class can be merged with an interface.
2015-06-03 00:26:43 +02:00
function C2() { } // error -- cannot merge function with non-ambient class
~~
!!! error TS2300: Duplicate identifier 'C2'.
class f { } // error -- cannot merge function with non-ambient class
~
!!! error TS2300: Duplicate identifier 'f'.
var v = 3;
module Foo {
~~~
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
export var x: number; // error for redeclaring var in a different parent
~
!!! error TS2300: Duplicate identifier 'x'.
}
declare module N {
export function F(); // no error because function is ambient
}