File: protectedClassPropertyAccessibleWithinNestedSubclass.types

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 (147 lines) | stat: -rw-r--r-- 2,463 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
=== tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinNestedSubclass.ts ===
class B {
>B : B

    protected x: string;
>x : string

    protected static x: string;
>x : string
}

class C extends B {
>C : C
>B : B

    protected get y() { return this.x; }
>y : string
>this.x : string
>this : this
>x : string

    protected set y(x) { this.y = this.x; }
>y : string
>x : string
>this.y = this.x : string
>this.y : string
>this : this
>y : string
>this.x : string
>this : this
>x : string

    protected foo() { return this.x; }
>foo : () => string
>this.x : string
>this : this
>x : string

    protected static get y() { return this.x; }
>y : string
>this.x : string
>this : typeof C
>x : string

    protected static set y(x) { this.y = this.x; }
>y : string
>x : string
>this.y = this.x : string
>this.y : string
>this : typeof C
>y : string
>this.x : string
>this : typeof C
>x : string

    protected static foo() { return this.x; }
>foo : () => string
>this.x : string
>this : typeof C
>x : string

    protected static bar() { this.foo(); }
>bar : () => void
>this.foo() : string
>this.foo : () => string
>this : typeof C
>foo : () => string
    
    protected bar() { 
>bar : () => void

        class D {
>D : D

            protected foo() {
>foo : () => void

                var c = new C();
>c : C
>new C() : C
>C : typeof C

                var c1 = c.y;
>c1 : string
>c.y : string
>c : C
>y : string

                var c2 = c.x;
>c2 : string
>c.x : string
>c : C
>x : string

                var c3 = c.foo;
>c3 : () => string
>c.foo : () => string
>c : C
>foo : () => string

                var c4 = c.bar;
>c4 : () => void
>c.bar : () => void
>c : C
>bar : () => void

                var c5 = c.z; // error
>c5 : any
>c.z : any
>c : C
>z : any
                
                var sc1 = C.x;
>sc1 : string
>C.x : string
>C : typeof C
>x : string

                var sc2 = C.y;
>sc2 : string
>C.y : string
>C : typeof C
>y : string

                var sc3 = C.foo;
>sc3 : () => string
>C.foo : () => string
>C : typeof C
>foo : () => string

                var sc4 = C.bar;
>sc4 : () => void
>C.bar : () => void
>C : typeof C
>bar : () => void
            }
        }
    }
}

class E extends C {
>E : E
>C : C

    protected z: string;
>z : string
}