File: importStatements.symbols

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (88 lines) | stat: -rw-r--r-- 3,090 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
=== tests/cases/conformance/internalModules/codeGeneration/importStatements.ts ===
module A {
>A : Symbol(A, Decl(importStatements.ts, 0, 0))

    export class Point {
>Point : Symbol(Point, Decl(importStatements.ts, 0, 10))

        constructor(public x: number, public y: number) { }
>x : Symbol(Point.x, Decl(importStatements.ts, 2, 20))
>y : Symbol(Point.y, Decl(importStatements.ts, 2, 37))
    }

    export var Origin = new Point(0, 0);
>Origin : Symbol(Origin, Decl(importStatements.ts, 5, 14))
>Point : Symbol(Point, Decl(importStatements.ts, 0, 10))
}

// no code gen expected
module B {
>B : Symbol(B, Decl(importStatements.ts, 6, 1))

    import a = A; //Error generates 'var <Alias> = <EntityName>;'
>a : Symbol(a, Decl(importStatements.ts, 9, 10))
>A : Symbol(a, Decl(importStatements.ts, 0, 0))
}

// no code gen expected
module C {
>C : Symbol(C, Decl(importStatements.ts, 11, 1))

    import a = A; //Error generates 'var <Alias> = <EntityName>;'
>a : Symbol(a, Decl(importStatements.ts, 14, 10))
>A : Symbol(a, Decl(importStatements.ts, 0, 0))

    var m: typeof a;
>m : Symbol(m, Decl(importStatements.ts, 16, 7))
>a : Symbol(a, Decl(importStatements.ts, 14, 10))

    var p: a.Point;
>p : Symbol(p, Decl(importStatements.ts, 17, 7), Decl(importStatements.ts, 18, 7))
>a : Symbol(a, Decl(importStatements.ts, 14, 10))
>Point : Symbol(a.Point, Decl(importStatements.ts, 0, 10))

    var p = {x:0, y:0 };
>p : Symbol(p, Decl(importStatements.ts, 17, 7), Decl(importStatements.ts, 18, 7))
>x : Symbol(x, Decl(importStatements.ts, 18, 13))
>y : Symbol(y, Decl(importStatements.ts, 18, 17))
}

// code gen expected
module D {
>D : Symbol(D, Decl(importStatements.ts, 19, 1))

    import a = A;
>a : Symbol(a, Decl(importStatements.ts, 22, 10))
>A : Symbol(a, Decl(importStatements.ts, 0, 0))

    var p = new a.Point(1, 1);
>p : Symbol(p, Decl(importStatements.ts, 25, 7))
>a.Point : Symbol(a.Point, Decl(importStatements.ts, 0, 10))
>a : Symbol(a, Decl(importStatements.ts, 22, 10))
>Point : Symbol(a.Point, Decl(importStatements.ts, 0, 10))
}

module E {
>E : Symbol(E, Decl(importStatements.ts, 26, 1))

    import a = A;
>a : Symbol(a, Decl(importStatements.ts, 28, 10))
>A : Symbol(a, Decl(importStatements.ts, 0, 0))

    export function xDist(x: a.Point) {
>xDist : Symbol(xDist, Decl(importStatements.ts, 29, 17))
>x : Symbol(x, Decl(importStatements.ts, 30, 26))
>a : Symbol(a, Decl(importStatements.ts, 28, 10))
>Point : Symbol(a.Point, Decl(importStatements.ts, 0, 10))

        return (a.Origin.x - x.x);
>a.Origin.x : Symbol(a.Point.x, Decl(importStatements.ts, 2, 20))
>a.Origin : Symbol(a.Origin, Decl(importStatements.ts, 5, 14))
>a : Symbol(a, Decl(importStatements.ts, 28, 10))
>Origin : Symbol(a.Origin, Decl(importStatements.ts, 5, 14))
>x : Symbol(a.Point.x, Decl(importStatements.ts, 2, 20))
>x.x : Symbol(a.Point.x, Decl(importStatements.ts, 2, 20))
>x : Symbol(x, Decl(importStatements.ts, 30, 26))
>x : Symbol(a.Point.x, Decl(importStatements.ts, 2, 20))
    }
}