74 lines
4.8 KiB
Text
74 lines
4.8 KiB
Text
=== tests/cases/conformance/classes/members/accessibility/protectedClassPropertyAccessibleWithinSubclass.ts ===
|
|
// no errors
|
|
|
|
class B {
|
|
>B : Symbol(B, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 0, 0))
|
|
|
|
protected x: string;
|
|
>x : Symbol(x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 2, 9))
|
|
|
|
protected static x: string;
|
|
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 3, 24))
|
|
}
|
|
|
|
class C extends B {
|
|
>C : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>B : Symbol(B, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 0, 0))
|
|
|
|
protected get y() { return this.x; }
|
|
>y : Symbol(y, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 7, 19), Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 8, 40))
|
|
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 2, 9))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 2, 9))
|
|
|
|
protected set y(x) { this.y = this.x; }
|
|
>y : Symbol(y, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 7, 19), Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 8, 40))
|
|
>x : Symbol(x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 9, 20))
|
|
>this.y : Symbol(y, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 7, 19), Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 8, 40))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>y : Symbol(y, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 7, 19), Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 8, 40))
|
|
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 2, 9))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 2, 9))
|
|
|
|
protected foo() { return this.x; }
|
|
>foo : Symbol(foo, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 9, 43))
|
|
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 2, 9))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 2, 9))
|
|
|
|
protected bar() { return this.foo(); }
|
|
>bar : Symbol(bar, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 10, 38))
|
|
>this.foo : Symbol(foo, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 9, 43))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>foo : Symbol(foo, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 9, 43))
|
|
|
|
protected static get y() { return this.x; }
|
|
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 11, 42), Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 13, 47))
|
|
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 3, 24))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 3, 24))
|
|
|
|
protected static set y(x) { this.y = this.x; }
|
|
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 11, 42), Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 13, 47))
|
|
>x : Symbol(x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 14, 27))
|
|
>this.y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 11, 42), Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 13, 47))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>y : Symbol(C.y, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 11, 42), Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 13, 47))
|
|
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 3, 24))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 3, 24))
|
|
|
|
protected static foo() { return this.x; }
|
|
>foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 14, 50))
|
|
>this.x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 3, 24))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>x : Symbol(B.x, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 3, 24))
|
|
|
|
protected static bar() { this.foo(); }
|
|
>bar : Symbol(C.bar, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 15, 45))
|
|
>this.foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 14, 50))
|
|
>this : Symbol(C, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 5, 1))
|
|
>foo : Symbol(C.foo, Decl(protectedClassPropertyAccessibleWithinSubclass.ts, 14, 50))
|
|
}
|
|
|