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
|
=== tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinNestedSubclass.ts ===
class B {
>B : Symbol(B, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 0))
protected x: string;
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 9))
protected static x: string;
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 1, 24))
}
class C extends B {
>C : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>B : Symbol(B, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 0))
protected get y() { return this.x; }
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 5, 19), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 6, 40))
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 9))
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 9))
protected set y(x) { this.y = this.x; }
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 5, 19), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 6, 40))
>x : Symbol(x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 7, 20))
>this.y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 5, 19), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 6, 40))
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 5, 19), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 6, 40))
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 9))
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 9))
protected foo() { return this.x; }
>foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 7, 43))
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 9))
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 9))
protected static get y() { return this.x; }
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 8, 38), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 10, 47))
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 1, 24))
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 1, 24))
protected static set y(x) { this.y = this.x; }
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 8, 38), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 10, 47))
>x : Symbol(x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 11, 27))
>this.y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 8, 38), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 10, 47))
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 8, 38), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 10, 47))
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 1, 24))
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 1, 24))
protected static foo() { return this.x; }
>foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 11, 50))
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 1, 24))
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 1, 24))
protected static bar() { this.foo(); }
>bar : Symbol(C.bar, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 12, 45))
>this.foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 11, 50))
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 11, 50))
protected bar() {
>bar : Symbol(C.bar, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 13, 42))
class D {
>D : Symbol(D, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 15, 21))
protected foo() {
>foo : Symbol(D.foo, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 16, 17))
var c = new C();
>c : Symbol(c, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 18, 19))
>C : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
var c1 = c.y;
>c1 : Symbol(c1, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 19, 19))
>c.y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 5, 19), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 6, 40))
>c : Symbol(c, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 18, 19))
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 5, 19), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 6, 40))
var c2 = c.x;
>c2 : Symbol(c2, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 20, 19))
>c.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 9))
>c : Symbol(c, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 18, 19))
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 0, 9))
var c3 = c.foo;
>c3 : Symbol(c3, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 21, 19))
>c.foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 7, 43))
>c : Symbol(c, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 18, 19))
>foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 7, 43))
var c4 = c.bar;
>c4 : Symbol(c4, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 22, 19))
>c.bar : Symbol(C.bar, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 13, 42))
>c : Symbol(c, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 18, 19))
>bar : Symbol(C.bar, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 13, 42))
var c5 = c.z; // error
>c5 : Symbol(c5, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 23, 19))
>c : Symbol(c, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 18, 19))
var sc1 = C.x;
>sc1 : Symbol(sc1, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 25, 19))
>C.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 1, 24))
>C : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 1, 24))
var sc2 = C.y;
>sc2 : Symbol(sc2, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 26, 19))
>C.y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 8, 38), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 10, 47))
>C : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 8, 38), Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 10, 47))
var sc3 = C.foo;
>sc3 : Symbol(sc3, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 27, 19))
>C.foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 11, 50))
>C : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 11, 50))
var sc4 = C.bar;
>sc4 : Symbol(sc4, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 28, 19))
>C.bar : Symbol(C.bar, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 12, 45))
>C : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
>bar : Symbol(C.bar, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 12, 45))
}
}
}
}
class E extends C {
>E : Symbol(E, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 32, 1))
>C : Symbol(C, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 3, 1))
protected z: string;
>z : Symbol(E.z, Decl(protectedClassPropertyAccessibleWithinNestedSubclass.ts, 34, 19))
}
|