TypeScript/tests/baselines/reference/protectedClassPropertyAccessibleWithinSubclass.types
2015-04-13 14:29:37 -07:00

79 lines
5.2 KiB
Plaintext

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