File: staticPropertyNotInClassType.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 (114 lines) | stat: -rw-r--r-- 5,009 bytes parent folder | download | duplicates (2)
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
112
113
114
=== tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts ===
module NonGeneric {
>NonGeneric : Symbol(NonGeneric, Decl(staticPropertyNotInClassType.ts, 0, 0))

    class C {
>C : Symbol(C, Decl(staticPropertyNotInClassType.ts, 0, 19), Decl(staticPropertyNotInClassType.ts, 7, 5))

        fn() { return this; }
>fn : Symbol(C.fn, Decl(staticPropertyNotInClassType.ts, 1, 13))
>this : Symbol(C, Decl(staticPropertyNotInClassType.ts, 0, 19), Decl(staticPropertyNotInClassType.ts, 7, 5))

        static get x() { return 1; }
>x : Symbol(C.x, Decl(staticPropertyNotInClassType.ts, 2, 29), Decl(staticPropertyNotInClassType.ts, 3, 36))

        static set x(v) { }
>x : Symbol(C.x, Decl(staticPropertyNotInClassType.ts, 2, 29), Decl(staticPropertyNotInClassType.ts, 3, 36))
>v : Symbol(v, Decl(staticPropertyNotInClassType.ts, 4, 21))

        constructor(public a: number, private b: number) { }
>a : Symbol(C.a, Decl(staticPropertyNotInClassType.ts, 5, 20))
>b : Symbol(C.b, Decl(staticPropertyNotInClassType.ts, 5, 37))

        static foo: string; // not reflected in class type
>foo : Symbol(C.foo, Decl(staticPropertyNotInClassType.ts, 5, 60))
    }

    module C {
>C : Symbol(C, Decl(staticPropertyNotInClassType.ts, 0, 19), Decl(staticPropertyNotInClassType.ts, 7, 5))

        export var bar = ''; // not reflected in class type
>bar : Symbol(bar, Decl(staticPropertyNotInClassType.ts, 10, 18))
    }

    var c = new C(1, 2);
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 13, 7))
>C : Symbol(C, Decl(staticPropertyNotInClassType.ts, 0, 19), Decl(staticPropertyNotInClassType.ts, 7, 5))

    var r = c.fn();
>r : Symbol(r, Decl(staticPropertyNotInClassType.ts, 14, 7))
>c.fn : Symbol(C.fn, Decl(staticPropertyNotInClassType.ts, 1, 13))
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 13, 7))
>fn : Symbol(C.fn, Decl(staticPropertyNotInClassType.ts, 1, 13))

    var r4 = c.foo; // error
>r4 : Symbol(r4, Decl(staticPropertyNotInClassType.ts, 15, 7))
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 13, 7))

    var r5 = c.bar; // error
>r5 : Symbol(r5, Decl(staticPropertyNotInClassType.ts, 16, 7))
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 13, 7))

    var r6 = c.x; // error
>r6 : Symbol(r6, Decl(staticPropertyNotInClassType.ts, 17, 7))
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 13, 7))
}

module Generic {
>Generic : Symbol(Generic, Decl(staticPropertyNotInClassType.ts, 18, 1))

    class C<T, U> {
>C : Symbol(C, Decl(staticPropertyNotInClassType.ts, 20, 16), Decl(staticPropertyNotInClassType.ts, 27, 5))
>T : Symbol(T, Decl(staticPropertyNotInClassType.ts, 21, 12))
>U : Symbol(U, Decl(staticPropertyNotInClassType.ts, 21, 14))

        fn() { return this; }
>fn : Symbol(C.fn, Decl(staticPropertyNotInClassType.ts, 21, 19))
>this : Symbol(C, Decl(staticPropertyNotInClassType.ts, 20, 16), Decl(staticPropertyNotInClassType.ts, 27, 5))

        static get x() { return 1; }
>x : Symbol(C.x, Decl(staticPropertyNotInClassType.ts, 22, 29), Decl(staticPropertyNotInClassType.ts, 23, 36))

        static set x(v) { }
>x : Symbol(C.x, Decl(staticPropertyNotInClassType.ts, 22, 29), Decl(staticPropertyNotInClassType.ts, 23, 36))
>v : Symbol(v, Decl(staticPropertyNotInClassType.ts, 24, 21))

        constructor(public a: T, private b: U) { }
>a : Symbol(C.a, Decl(staticPropertyNotInClassType.ts, 25, 20))
>T : Symbol(T, Decl(staticPropertyNotInClassType.ts, 21, 12))
>b : Symbol(C.b, Decl(staticPropertyNotInClassType.ts, 25, 32))
>U : Symbol(U, Decl(staticPropertyNotInClassType.ts, 21, 14))

        static foo: T; // not reflected in class type
>foo : Symbol(C.foo, Decl(staticPropertyNotInClassType.ts, 25, 50))
    }

    module C {
>C : Symbol(C, Decl(staticPropertyNotInClassType.ts, 20, 16), Decl(staticPropertyNotInClassType.ts, 27, 5))

        export var bar = ''; // not reflected in class type
>bar : Symbol(bar, Decl(staticPropertyNotInClassType.ts, 30, 18))
    }

    var c = new C(1, '');
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 33, 7))
>C : Symbol(C, Decl(staticPropertyNotInClassType.ts, 20, 16), Decl(staticPropertyNotInClassType.ts, 27, 5))

    var r = c.fn();
>r : Symbol(r, Decl(staticPropertyNotInClassType.ts, 34, 7))
>c.fn : Symbol(C.fn, Decl(staticPropertyNotInClassType.ts, 21, 19))
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 33, 7))
>fn : Symbol(C.fn, Decl(staticPropertyNotInClassType.ts, 21, 19))

    var r4 = c.foo; // error
>r4 : Symbol(r4, Decl(staticPropertyNotInClassType.ts, 35, 7))
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 33, 7))

    var r5 = c.bar; // error
>r5 : Symbol(r5, Decl(staticPropertyNotInClassType.ts, 36, 7))
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 33, 7))

    var r6 = c.x; // error
>r6 : Symbol(r6, Decl(staticPropertyNotInClassType.ts, 37, 7))
>c : Symbol(c, Decl(staticPropertyNotInClassType.ts, 33, 7))
}