27 lines
849 B
Plaintext
27 lines
849 B
Plaintext
|
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts (2 errors) ====
|
||
|
class Point {
|
||
|
constructor(public x: number, public y: number) { }
|
||
|
|
||
|
static Origin: Point = { x: 0, y: 0 };
|
||
|
}
|
||
|
|
||
|
module Point {
|
||
|
export var Origin = ""; //expected duplicate identifier error
|
||
|
~~~~~~
|
||
|
!!! Duplicate identifier 'Origin'.
|
||
|
}
|
||
|
|
||
|
|
||
|
module A {
|
||
|
export class Point {
|
||
|
constructor(public x: number, public y: number) { }
|
||
|
|
||
|
static Origin: Point = { x: 0, y: 0 };
|
||
|
}
|
||
|
|
||
|
export module Point {
|
||
|
export var Origin = ""; //expected duplicate identifier error
|
||
|
~~~~~~
|
||
|
!!! Duplicate identifier 'Origin'.
|
||
|
}
|
||
|
}
|