File: ModuleAndClassWithSameNameAndCommonRoot.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 (64 lines) | stat: -rw-r--r-- 2,151 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
=== tests/cases/conformance/internalModules/DeclarationMerging/module.ts ===
module X.Y {
>X : Symbol(X, Decl(module.ts, 0, 0), Decl(classPoint.ts, 0, 0))
>Y : Symbol(Y, Decl(module.ts, 0, 9), Decl(classPoint.ts, 0, 9))

    export module Point {
>Point : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12))

        export var Origin = new Point(0, 0);
>Origin : Symbol(Origin, Decl(module.ts, 2, 18))
>Point : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12))
    }
}

=== tests/cases/conformance/internalModules/DeclarationMerging/classPoint.ts ===
module X.Y {
>X : Symbol(X, Decl(module.ts, 0, 0), Decl(classPoint.ts, 0, 0))
>Y : Symbol(Y, Decl(module.ts, 0, 9), Decl(classPoint.ts, 0, 9))

    // duplicate identifier
    export class Point {
>Point : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12))

        constructor(x: number, y: number) {
>x : Symbol(x, Decl(classPoint.ts, 3, 20))
>y : Symbol(y, Decl(classPoint.ts, 3, 30))

            this.x = x;
>this.x : Symbol(Point.x, Decl(classPoint.ts, 6, 9))
>this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12))
>x : Symbol(Point.x, Decl(classPoint.ts, 6, 9))
>x : Symbol(x, Decl(classPoint.ts, 3, 20))

            this.y = y;
>this.y : Symbol(Point.y, Decl(classPoint.ts, 7, 18))
>this : Symbol(Point, Decl(module.ts, 0, 12), Decl(classPoint.ts, 0, 12))
>y : Symbol(Point.y, Decl(classPoint.ts, 7, 18))
>y : Symbol(y, Decl(classPoint.ts, 3, 30))
        }
        x: number;
>x : Symbol(Point.x, Decl(classPoint.ts, 6, 9))

        y: number;
>y : Symbol(Point.y, Decl(classPoint.ts, 7, 18))
    }
}

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

    export var Instance = new A();
>Instance : Symbol(Instance, Decl(simple.ts, 1, 14))
>A : Symbol(A, Decl(simple.ts, 0, 0), Decl(simple.ts, 2, 1))
}

// duplicate identifier
class A {
>A : Symbol(A, Decl(simple.ts, 0, 0), Decl(simple.ts, 2, 1))

    id: string;
>id : Symbol(A.id, Decl(simple.ts, 5, 9))
}