172 lines
5.9 KiB
Plaintext
172 lines
5.9 KiB
Plaintext
=== tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts ===
|
|
// expect no errors here
|
|
|
|
module A {
|
|
>A : Symbol(A, Decl(exportImportAlias.ts, 0, 0))
|
|
|
|
export var x = 'hello world'
|
|
>x : Symbol(x, Decl(exportImportAlias.ts, 4, 14))
|
|
|
|
export class Point {
|
|
>Point : Symbol(Point, Decl(exportImportAlias.ts, 4, 32))
|
|
|
|
constructor(public x: number, public y: number) { }
|
|
>x : Symbol(x, Decl(exportImportAlias.ts, 6, 20))
|
|
>y : Symbol(y, Decl(exportImportAlias.ts, 6, 37))
|
|
}
|
|
export module B {
|
|
>B : Symbol(B, Decl(exportImportAlias.ts, 7, 5))
|
|
|
|
export interface Id {
|
|
>Id : Symbol(Id, Decl(exportImportAlias.ts, 8, 21))
|
|
|
|
name: string;
|
|
>name : Symbol(name, Decl(exportImportAlias.ts, 9, 29))
|
|
}
|
|
}
|
|
}
|
|
|
|
module C {
|
|
>C : Symbol(C, Decl(exportImportAlias.ts, 13, 1))
|
|
|
|
export import a = A;
|
|
>a : Symbol(a, Decl(exportImportAlias.ts, 15, 10))
|
|
>A : Symbol(a, Decl(exportImportAlias.ts, 0, 0))
|
|
}
|
|
|
|
var a: string = C.a.x;
|
|
>a : Symbol(a, Decl(exportImportAlias.ts, 19, 3))
|
|
>C.a.x : Symbol(A.x, Decl(exportImportAlias.ts, 4, 14))
|
|
>C.a : Symbol(C.a, Decl(exportImportAlias.ts, 15, 10))
|
|
>C : Symbol(C, Decl(exportImportAlias.ts, 13, 1))
|
|
>a : Symbol(C.a, Decl(exportImportAlias.ts, 15, 10))
|
|
>x : Symbol(A.x, Decl(exportImportAlias.ts, 4, 14))
|
|
|
|
var b: { x: number; y: number; } = new C.a.Point(0, 0);
|
|
>b : Symbol(b, Decl(exportImportAlias.ts, 20, 3))
|
|
>x : Symbol(x, Decl(exportImportAlias.ts, 20, 8))
|
|
>y : Symbol(y, Decl(exportImportAlias.ts, 20, 19))
|
|
>C.a.Point : Symbol(A.Point, Decl(exportImportAlias.ts, 4, 32))
|
|
>C.a : Symbol(C.a, Decl(exportImportAlias.ts, 15, 10))
|
|
>C : Symbol(C, Decl(exportImportAlias.ts, 13, 1))
|
|
>a : Symbol(C.a, Decl(exportImportAlias.ts, 15, 10))
|
|
>Point : Symbol(A.Point, Decl(exportImportAlias.ts, 4, 32))
|
|
|
|
var c: { name: string };
|
|
>c : Symbol(c, Decl(exportImportAlias.ts, 21, 3), Decl(exportImportAlias.ts, 22, 3))
|
|
>name : Symbol(name, Decl(exportImportAlias.ts, 21, 8))
|
|
|
|
var c: C.a.B.Id;
|
|
>c : Symbol(c, Decl(exportImportAlias.ts, 21, 3), Decl(exportImportAlias.ts, 22, 3))
|
|
>C : Symbol(C, Decl(exportImportAlias.ts, 13, 1))
|
|
>a : Symbol(C.a, Decl(exportImportAlias.ts, 15, 10))
|
|
>B : Symbol(A.B, Decl(exportImportAlias.ts, 7, 5))
|
|
>Id : Symbol(A.B.Id, Decl(exportImportAlias.ts, 8, 21))
|
|
|
|
module X {
|
|
>X : Symbol(X, Decl(exportImportAlias.ts, 22, 16))
|
|
|
|
export function Y() {
|
|
>Y : Symbol(Y, Decl(exportImportAlias.ts, 24, 10), Decl(exportImportAlias.ts, 27, 5))
|
|
|
|
return 42;
|
|
}
|
|
|
|
export module Y {
|
|
>Y : Symbol(Y, Decl(exportImportAlias.ts, 24, 10), Decl(exportImportAlias.ts, 27, 5))
|
|
|
|
export class Point {
|
|
>Point : Symbol(Point, Decl(exportImportAlias.ts, 29, 21))
|
|
|
|
constructor(public x: number, public y: number) { }
|
|
>x : Symbol(x, Decl(exportImportAlias.ts, 31, 24))
|
|
>y : Symbol(y, Decl(exportImportAlias.ts, 31, 41))
|
|
}
|
|
}
|
|
}
|
|
|
|
module Z {
|
|
>Z : Symbol(Z, Decl(exportImportAlias.ts, 34, 1))
|
|
|
|
// 'y' should be a fundule here
|
|
export import y = X.Y;
|
|
>y : Symbol(y, Decl(exportImportAlias.ts, 36, 10))
|
|
>X : Symbol(X, Decl(exportImportAlias.ts, 22, 16))
|
|
>Y : Symbol(y, Decl(exportImportAlias.ts, 24, 10), Decl(exportImportAlias.ts, 27, 5))
|
|
}
|
|
|
|
var m: number = Z.y();
|
|
>m : Symbol(m, Decl(exportImportAlias.ts, 42, 3))
|
|
>Z.y : Symbol(Z.y, Decl(exportImportAlias.ts, 36, 10))
|
|
>Z : Symbol(Z, Decl(exportImportAlias.ts, 34, 1))
|
|
>y : Symbol(Z.y, Decl(exportImportAlias.ts, 36, 10))
|
|
|
|
var n: { x: number; y: number; } = new Z.y.Point(0, 0);
|
|
>n : Symbol(n, Decl(exportImportAlias.ts, 43, 3))
|
|
>x : Symbol(x, Decl(exportImportAlias.ts, 43, 8))
|
|
>y : Symbol(y, Decl(exportImportAlias.ts, 43, 19))
|
|
>Z.y.Point : Symbol(X.Y.Point, Decl(exportImportAlias.ts, 29, 21))
|
|
>Z.y : Symbol(Z.y, Decl(exportImportAlias.ts, 36, 10))
|
|
>Z : Symbol(Z, Decl(exportImportAlias.ts, 34, 1))
|
|
>y : Symbol(Z.y, Decl(exportImportAlias.ts, 36, 10))
|
|
>Point : Symbol(X.Y.Point, Decl(exportImportAlias.ts, 29, 21))
|
|
|
|
module K {
|
|
>K : Symbol(K, Decl(exportImportAlias.ts, 43, 55))
|
|
|
|
export class L {
|
|
>L : Symbol(L, Decl(exportImportAlias.ts, 45, 10), Decl(exportImportAlias.ts, 48, 5))
|
|
|
|
constructor(public name: string) { }
|
|
>name : Symbol(name, Decl(exportImportAlias.ts, 47, 20))
|
|
}
|
|
|
|
export module L {
|
|
>L : Symbol(L, Decl(exportImportAlias.ts, 45, 10), Decl(exportImportAlias.ts, 48, 5))
|
|
|
|
export var y = 12;
|
|
>y : Symbol(y, Decl(exportImportAlias.ts, 51, 18))
|
|
|
|
export interface Point {
|
|
>Point : Symbol(Point, Decl(exportImportAlias.ts, 51, 26))
|
|
|
|
x: number;
|
|
>x : Symbol(x, Decl(exportImportAlias.ts, 52, 32))
|
|
|
|
y: number;
|
|
>y : Symbol(y, Decl(exportImportAlias.ts, 53, 22))
|
|
}
|
|
}
|
|
}
|
|
|
|
module M {
|
|
>M : Symbol(M, Decl(exportImportAlias.ts, 57, 1))
|
|
|
|
export import D = K.L;
|
|
>D : Symbol(D, Decl(exportImportAlias.ts, 59, 10))
|
|
>K : Symbol(K, Decl(exportImportAlias.ts, 43, 55))
|
|
>L : Symbol(D, Decl(exportImportAlias.ts, 45, 10), Decl(exportImportAlias.ts, 48, 5))
|
|
}
|
|
|
|
var o: { name: string };
|
|
>o : Symbol(o, Decl(exportImportAlias.ts, 63, 3), Decl(exportImportAlias.ts, 64, 3))
|
|
>name : Symbol(name, Decl(exportImportAlias.ts, 63, 8))
|
|
|
|
var o = new M.D('Hello');
|
|
>o : Symbol(o, Decl(exportImportAlias.ts, 63, 3), Decl(exportImportAlias.ts, 64, 3))
|
|
>M.D : Symbol(M.D, Decl(exportImportAlias.ts, 59, 10))
|
|
>M : Symbol(M, Decl(exportImportAlias.ts, 57, 1))
|
|
>D : Symbol(M.D, Decl(exportImportAlias.ts, 59, 10))
|
|
|
|
var p: { x: number; y: number; }
|
|
>p : Symbol(p, Decl(exportImportAlias.ts, 66, 3), Decl(exportImportAlias.ts, 67, 3))
|
|
>x : Symbol(x, Decl(exportImportAlias.ts, 66, 8))
|
|
>y : Symbol(y, Decl(exportImportAlias.ts, 66, 19))
|
|
|
|
var p: M.D.Point;
|
|
>p : Symbol(p, Decl(exportImportAlias.ts, 66, 3), Decl(exportImportAlias.ts, 67, 3))
|
|
>M : Symbol(M, Decl(exportImportAlias.ts, 57, 1))
|
|
>D : Symbol(M.D, Decl(exportImportAlias.ts, 59, 10))
|
|
>Point : Symbol(K.L.Point, Decl(exportImportAlias.ts, 51, 26))
|
|
|