117 lines
4.6 KiB
Text
117 lines
4.6 KiB
Text
=== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts ===
|
|
module A {
|
|
>A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0))
|
|
|
|
export interface Point {
|
|
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
|
|
|
|
x: number;
|
|
>x : Symbol(x, Decl(part1.ts, 1, 28))
|
|
|
|
y: number;
|
|
>y : Symbol(y, Decl(part1.ts, 2, 18))
|
|
}
|
|
|
|
export module Utils {
|
|
>Utils : Symbol(Utils, Decl(part1.ts, 4, 5), Decl(part2.ts, 1, 46))
|
|
|
|
export function mirror<T extends Point>(p: T) {
|
|
>mirror : Symbol(mirror, Decl(part1.ts, 6, 25))
|
|
>T : Symbol(T, Decl(part1.ts, 7, 31))
|
|
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
|
|
>p : Symbol(p, Decl(part1.ts, 7, 48))
|
|
>T : Symbol(T, Decl(part1.ts, 7, 31))
|
|
|
|
return { x: p.y, y: p.x };
|
|
>x : Symbol(x, Decl(part1.ts, 8, 20))
|
|
>p.y : Symbol(Point.y, Decl(part1.ts, 2, 18))
|
|
>p : Symbol(p, Decl(part1.ts, 7, 48))
|
|
>y : Symbol(Point.y, Decl(part1.ts, 2, 18))
|
|
>y : Symbol(y, Decl(part1.ts, 8, 28))
|
|
>p.x : Symbol(Point.x, Decl(part1.ts, 1, 28))
|
|
>p : Symbol(p, Decl(part1.ts, 7, 48))
|
|
>x : Symbol(Point.x, Decl(part1.ts, 1, 28))
|
|
}
|
|
}
|
|
}
|
|
|
|
=== tests/cases/conformance/internalModules/DeclarationMerging/part2.ts ===
|
|
module A {
|
|
>A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0))
|
|
|
|
export var Origin: Point = { x: 0, y: 0 };
|
|
>Origin : Symbol(Origin, Decl(part2.ts, 1, 14))
|
|
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
|
|
>x : Symbol(x, Decl(part2.ts, 1, 32))
|
|
>y : Symbol(y, Decl(part2.ts, 1, 38))
|
|
|
|
export module Utils {
|
|
>Utils : Symbol(Utils, Decl(part1.ts, 4, 5), Decl(part2.ts, 1, 46))
|
|
|
|
export class Plane {
|
|
>Plane : Symbol(Plane, Decl(part2.ts, 3, 25))
|
|
|
|
constructor(public tl: Point, public br: Point) { }
|
|
>tl : Symbol(tl, Decl(part2.ts, 5, 24))
|
|
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
|
|
>br : Symbol(br, Decl(part2.ts, 5, 41))
|
|
>Point : Symbol(Point, Decl(part1.ts, 0, 10))
|
|
}
|
|
}
|
|
}
|
|
|
|
=== tests/cases/conformance/internalModules/DeclarationMerging/part3.ts ===
|
|
// test the merging actually worked
|
|
|
|
var o: { x: number; y: number };
|
|
>o : Symbol(o, Decl(part3.ts, 2, 3), Decl(part3.ts, 3, 3), Decl(part3.ts, 4, 3), Decl(part3.ts, 5, 3))
|
|
>x : Symbol(x, Decl(part3.ts, 2, 8))
|
|
>y : Symbol(y, Decl(part3.ts, 2, 19))
|
|
|
|
var o: A.Point;
|
|
>o : Symbol(o, Decl(part3.ts, 2, 3), Decl(part3.ts, 3, 3), Decl(part3.ts, 4, 3), Decl(part3.ts, 5, 3))
|
|
>A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0))
|
|
>Point : Symbol(A.Point, Decl(part1.ts, 0, 10))
|
|
|
|
var o = A.Origin;
|
|
>o : Symbol(o, Decl(part3.ts, 2, 3), Decl(part3.ts, 3, 3), Decl(part3.ts, 4, 3), Decl(part3.ts, 5, 3))
|
|
>A.Origin : Symbol(A.Origin, Decl(part2.ts, 1, 14))
|
|
>A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0))
|
|
>Origin : Symbol(A.Origin, Decl(part2.ts, 1, 14))
|
|
|
|
var o = A.Utils.mirror(o);
|
|
>o : Symbol(o, Decl(part3.ts, 2, 3), Decl(part3.ts, 3, 3), Decl(part3.ts, 4, 3), Decl(part3.ts, 5, 3))
|
|
>A.Utils.mirror : Symbol(A.Utils.mirror, Decl(part1.ts, 6, 25))
|
|
>A.Utils : Symbol(A.Utils, Decl(part1.ts, 4, 5), Decl(part2.ts, 1, 46))
|
|
>A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0))
|
|
>Utils : Symbol(A.Utils, Decl(part1.ts, 4, 5), Decl(part2.ts, 1, 46))
|
|
>mirror : Symbol(A.Utils.mirror, Decl(part1.ts, 6, 25))
|
|
>o : Symbol(o, Decl(part3.ts, 2, 3), Decl(part3.ts, 3, 3), Decl(part3.ts, 4, 3), Decl(part3.ts, 5, 3))
|
|
|
|
var p: { tl: A.Point; br: A.Point };
|
|
>p : Symbol(p, Decl(part3.ts, 7, 3), Decl(part3.ts, 8, 3), Decl(part3.ts, 9, 3))
|
|
>tl : Symbol(tl, Decl(part3.ts, 7, 8))
|
|
>A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0))
|
|
>Point : Symbol(A.Point, Decl(part1.ts, 0, 10))
|
|
>br : Symbol(br, Decl(part3.ts, 7, 21))
|
|
>A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0))
|
|
>Point : Symbol(A.Point, Decl(part1.ts, 0, 10))
|
|
|
|
var p: A.Utils.Plane;
|
|
>p : Symbol(p, Decl(part3.ts, 7, 3), Decl(part3.ts, 8, 3), Decl(part3.ts, 9, 3))
|
|
>A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0))
|
|
>Utils : Symbol(A.Utils, Decl(part1.ts, 4, 5), Decl(part2.ts, 1, 46))
|
|
>Plane : Symbol(A.Utils.Plane, Decl(part2.ts, 3, 25))
|
|
|
|
var p = new A.Utils.Plane(o, { x: 1, y: 1 });
|
|
>p : Symbol(p, Decl(part3.ts, 7, 3), Decl(part3.ts, 8, 3), Decl(part3.ts, 9, 3))
|
|
>A.Utils.Plane : Symbol(A.Utils.Plane, Decl(part2.ts, 3, 25))
|
|
>A.Utils : Symbol(A.Utils, Decl(part1.ts, 4, 5), Decl(part2.ts, 1, 46))
|
|
>A : Symbol(A, Decl(part1.ts, 0, 0), Decl(part2.ts, 0, 0))
|
|
>Utils : Symbol(A.Utils, Decl(part1.ts, 4, 5), Decl(part2.ts, 1, 46))
|
|
>Plane : Symbol(A.Utils.Plane, Decl(part2.ts, 3, 25))
|
|
>o : Symbol(o, Decl(part3.ts, 2, 3), Decl(part3.ts, 3, 3), Decl(part3.ts, 4, 3), Decl(part3.ts, 5, 3))
|
|
>x : Symbol(x, Decl(part3.ts, 9, 30))
|
|
>y : Symbol(y, Decl(part3.ts, 9, 36))
|
|
|
|
|