2014-07-13 01:04:16 +02:00
|
|
|
==== 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
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'Origin'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'Origin'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
}
|