File: FunctionAndModuleWithSameNameAndCommonRoot.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (111 lines) | stat: -rw-r--r-- 5,072 bytes parent folder | download | duplicates (5)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
=== tests/cases/conformance/internalModules/DeclarationMerging/function.ts ===
module A {
>A : Symbol(A, Decl(function.ts, 0, 0), Decl(module.ts, 0, 0))

    export function Point() {
>Point : Symbol(Point, Decl(function.ts, 0, 10), Decl(module.ts, 0, 10))

        return { x: 0, y: 0 };
>x : Symbol(x, Decl(function.ts, 2, 16))
>y : Symbol(y, Decl(function.ts, 2, 22))
    }
}

=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts ===
module A {
>A : Symbol(A, Decl(function.ts, 0, 0), Decl(module.ts, 0, 0))

    export module Point {
>Point : Symbol(Point, Decl(function.ts, 0, 10), Decl(module.ts, 0, 10))

        export var Origin = { x: 0, y: 0 };
>Origin : Symbol(Origin, Decl(module.ts, 2, 18))
>x : Symbol(x, Decl(module.ts, 2, 29))
>y : Symbol(y, Decl(module.ts, 2, 35))
    }
}

=== tests/cases/conformance/internalModules/DeclarationMerging/test.ts ===
var fn: () => { x: number; y: number };
>fn : Symbol(fn, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(simple.ts, 11, 3), Decl(simple.ts, 12, 3))
>x : Symbol(x, Decl(test.ts, 0, 15))
>y : Symbol(y, Decl(test.ts, 0, 26))

var fn = A.Point;
>fn : Symbol(fn, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(simple.ts, 11, 3), Decl(simple.ts, 12, 3))
>A.Point : Symbol(A.Point, Decl(function.ts, 0, 10), Decl(module.ts, 0, 10))
>A : Symbol(A, Decl(function.ts, 0, 0), Decl(module.ts, 0, 0))
>Point : Symbol(A.Point, Decl(function.ts, 0, 10), Decl(module.ts, 0, 10))

var cl: { x: number; y: number; }
>cl : Symbol(cl, Decl(test.ts, 3, 3), Decl(test.ts, 4, 3), Decl(test.ts, 5, 3), Decl(simple.ts, 14, 3), Decl(simple.ts, 15, 3) ... and 1 more)
>x : Symbol(x, Decl(test.ts, 3, 9))
>y : Symbol(y, Decl(test.ts, 3, 20))

var cl = A.Point();
>cl : Symbol(cl, Decl(test.ts, 3, 3), Decl(test.ts, 4, 3), Decl(test.ts, 5, 3), Decl(simple.ts, 14, 3), Decl(simple.ts, 15, 3) ... and 1 more)
>A.Point : Symbol(A.Point, Decl(function.ts, 0, 10), Decl(module.ts, 0, 10))
>A : Symbol(A, Decl(function.ts, 0, 0), Decl(module.ts, 0, 0))
>Point : Symbol(A.Point, Decl(function.ts, 0, 10), Decl(module.ts, 0, 10))

var cl = A.Point.Origin; // not expected to be an error.
>cl : Symbol(cl, Decl(test.ts, 3, 3), Decl(test.ts, 4, 3), Decl(test.ts, 5, 3), Decl(simple.ts, 14, 3), Decl(simple.ts, 15, 3) ... and 1 more)
>A.Point.Origin : Symbol(A.Point.Origin, Decl(module.ts, 2, 18))
>A.Point : Symbol(A.Point, Decl(function.ts, 0, 10), Decl(module.ts, 0, 10))
>A : Symbol(A, Decl(function.ts, 0, 0), Decl(module.ts, 0, 0))
>Point : Symbol(A.Point, Decl(function.ts, 0, 10), Decl(module.ts, 0, 10))
>Origin : Symbol(A.Point.Origin, Decl(module.ts, 2, 18))


=== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts ===
module B {
>B : Symbol(B, Decl(simple.ts, 0, 0))

    export function Point() {
>Point : Symbol(Point, Decl(simple.ts, 0, 10), Decl(simple.ts, 4, 5))

        return { x: 0, y: 0 };
>x : Symbol(x, Decl(simple.ts, 3, 16))
>y : Symbol(y, Decl(simple.ts, 3, 22))
    }

    export module Point {
>Point : Symbol(Point, Decl(simple.ts, 0, 10), Decl(simple.ts, 4, 5))

        export var Origin = { x: 0, y: 0 };
>Origin : Symbol(Origin, Decl(simple.ts, 7, 18))
>x : Symbol(x, Decl(simple.ts, 7, 29))
>y : Symbol(y, Decl(simple.ts, 7, 35))
    }
}

var fn: () => { x: number; y: number };
>fn : Symbol(fn, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(simple.ts, 11, 3), Decl(simple.ts, 12, 3))
>x : Symbol(x, Decl(simple.ts, 11, 15))
>y : Symbol(y, Decl(simple.ts, 11, 26))

var fn = B.Point;  // not expected to be an error. bug 840000: [corelang] Function of fundule not assignalbe as expected
>fn : Symbol(fn, Decl(test.ts, 0, 3), Decl(test.ts, 1, 3), Decl(simple.ts, 11, 3), Decl(simple.ts, 12, 3))
>B.Point : Symbol(B.Point, Decl(simple.ts, 0, 10), Decl(simple.ts, 4, 5))
>B : Symbol(B, Decl(simple.ts, 0, 0))
>Point : Symbol(B.Point, Decl(simple.ts, 0, 10), Decl(simple.ts, 4, 5))

var cl: { x: number; y: number; }
>cl : Symbol(cl, Decl(test.ts, 3, 3), Decl(test.ts, 4, 3), Decl(test.ts, 5, 3), Decl(simple.ts, 14, 3), Decl(simple.ts, 15, 3) ... and 1 more)
>x : Symbol(x, Decl(simple.ts, 14, 9))
>y : Symbol(y, Decl(simple.ts, 14, 20))

var cl = B.Point();
>cl : Symbol(cl, Decl(test.ts, 3, 3), Decl(test.ts, 4, 3), Decl(test.ts, 5, 3), Decl(simple.ts, 14, 3), Decl(simple.ts, 15, 3) ... and 1 more)
>B.Point : Symbol(B.Point, Decl(simple.ts, 0, 10), Decl(simple.ts, 4, 5))
>B : Symbol(B, Decl(simple.ts, 0, 0))
>Point : Symbol(B.Point, Decl(simple.ts, 0, 10), Decl(simple.ts, 4, 5))

var cl = B.Point.Origin;
>cl : Symbol(cl, Decl(test.ts, 3, 3), Decl(test.ts, 4, 3), Decl(test.ts, 5, 3), Decl(simple.ts, 14, 3), Decl(simple.ts, 15, 3) ... and 1 more)
>B.Point.Origin : Symbol(B.Point.Origin, Decl(simple.ts, 7, 18))
>B.Point : Symbol(B.Point, Decl(simple.ts, 0, 10), Decl(simple.ts, 4, 5))
>B : Symbol(B, Decl(simple.ts, 0, 0))
>Point : Symbol(B.Point, Decl(simple.ts, 0, 10), Decl(simple.ts, 4, 5))
>Origin : Symbol(B.Point.Origin, Decl(simple.ts, 7, 18))