TypeScript/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt

38 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-04-27 03:31:47 +02:00
tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ====
module X.Y {
export module Point {
2014-07-17 01:15:10 +02:00
~~~~~
2015-04-27 03:31:47 +02:00
!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged
export var Origin = new Point(0, 0);
}
}
==== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts (0 errors) ====
module X.Y {
// duplicate identifier
export class Point {
constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
x: number;
y: number;
}
}
==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ====
module A {
2014-07-17 01:15:10 +02:00
~
2015-04-27 03:31:47 +02:00
!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged
export var Instance = new A();
}
// duplicate identifier
class A {
id: string;
}