34 lines
No EOL
793 B
Text
34 lines
No EOL
793 B
Text
==== tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts (2 errors) ====
|
|
module A.B.C {
|
|
~
|
|
!!! A module declaration cannot be located prior to a class or function with which it is merged
|
|
export class Point {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
}
|
|
|
|
module A {
|
|
export module B {
|
|
export class C { // Error
|
|
name: string;
|
|
}
|
|
}
|
|
}
|
|
|
|
module M2.X {
|
|
export class Point {
|
|
x: number; y: number;
|
|
}
|
|
}
|
|
|
|
module M2 {
|
|
export module X {
|
|
export var Point: number; // Error
|
|
~~~~~
|
|
!!! Duplicate identifier 'Point'.
|
|
}
|
|
}
|
|
|
|
|
|
|