2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(4,12): error TS2300: Duplicate identifier 'Origin'.
|
2014-10-01 20:27:20 +02:00
|
|
|
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(8,21): error TS2300: Duplicate identifier 'Origin'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(16,16): error TS2300: Duplicate identifier 'Origin'.
|
2014-10-01 20:27:20 +02:00
|
|
|
tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts(20,25): error TS2300: Duplicate identifier 'Origin'.
|
2014-09-12 22:35:07 +02:00
|
|
|
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
==== tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts (4 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
class Point {
|
|
|
|
constructor(public x: number, public y: number) { }
|
|
|
|
|
|
|
|
static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246
|
2014-10-01 02:15:18 +02:00
|
|
|
~~~~~~
|
|
|
|
!!! error TS2300: Duplicate identifier 'Origin'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module Point {
|
|
|
|
export function Origin() { return null; } //expected duplicate identifier error
|
2014-10-01 20:27:20 +02:00
|
|
|
~~~~~~
|
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 { return { x: 0, y: 0 }; } // unexpected error here bug 840246
|
2014-10-01 02:15:18 +02:00
|
|
|
~~~~~~
|
|
|
|
!!! error TS2300: Duplicate identifier 'Origin'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export module Point {
|
|
|
|
export function Origin() { return ""; }//expected duplicate identifier error
|
2014-10-01 20:27:20 +02:00
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'Origin'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
}
|