68 lines
No EOL
2.8 KiB
Text
68 lines
No EOL
2.8 KiB
Text
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(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(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) ====
|
|
|
|
interface I { }
|
|
~
|
|
!!! error TS2507: An interface cannot merge with a non-ambient class.
|
|
class C1 { }
|
|
~~
|
|
!!! error TS2506: A non-ambient class cannot be merged with an interface.
|
|
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
|
|
~
|
|
!!! error TS2506: A non-ambient class cannot 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.
|
|
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
|
|
}
|
|
|