TypeScript/tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.errors.txt
2014-09-11 16:11:08 -07:00

27 lines
1,019 B
Plaintext

==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (2 errors) ====
class Point {
constructor(public x: number, public y: number) { }
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
}
module Point {
export function Origin() { return null; } //expected duplicate identifier error
~~~~~~
!!! error TS2300: Duplicate identifier 'Origin'.
}
module A {
export class Point {
constructor(public x: number, public y: number) { }
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
}
export module Point {
export function Origin() { return ""; }//expected duplicate identifier error
~~~~~~
!!! error TS2300: Duplicate identifier 'Origin'.
}
}