37 lines
No EOL
1.9 KiB
Text
37 lines
No EOL
1.9 KiB
Text
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'.
|
|
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,21): error TS2300: Duplicate identifier 'Origin'.
|
|
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'.
|
|
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,25): error TS2300: Duplicate identifier 'Origin'.
|
|
|
|
|
|
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (4 errors) ====
|
|
class Point {
|
|
constructor(public x: number, public y: number) { }
|
|
|
|
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
|
|
~~~~~~
|
|
!!! error TS2300: Duplicate identifier 'Origin'.
|
|
}
|
|
|
|
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
|
|
~~~~~~
|
|
!!! error TS2300: Duplicate identifier 'Origin'.
|
|
}
|
|
|
|
export module Point {
|
|
export function Origin() { return ""; }//expected duplicate identifier error
|
|
~~~~~~
|
|
!!! error TS2300: Duplicate identifier 'Origin'.
|
|
}
|
|
} |