mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
79 lines
3.2 KiB
Plaintext
79 lines
3.2 KiB
Plaintext
//// [tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts] ////
|
|
|
|
=== classPropertyAsProtected.ts ===
|
|
class C {
|
|
>C : Symbol(C, Decl(classPropertyAsProtected.ts, 0, 0))
|
|
|
|
protected x: string;
|
|
>x : Symbol(C.x, Decl(classPropertyAsProtected.ts, 0, 9))
|
|
|
|
protected get y() { return null; }
|
|
>y : Symbol(C.y, Decl(classPropertyAsProtected.ts, 1, 24), Decl(classPropertyAsProtected.ts, 2, 38))
|
|
|
|
protected set y(x) { }
|
|
>y : Symbol(C.y, Decl(classPropertyAsProtected.ts, 1, 24), Decl(classPropertyAsProtected.ts, 2, 38))
|
|
>x : Symbol(x, Decl(classPropertyAsProtected.ts, 3, 20))
|
|
|
|
protected foo() { }
|
|
>foo : Symbol(C.foo, Decl(classPropertyAsProtected.ts, 3, 26))
|
|
|
|
protected static a: string;
|
|
>a : Symbol(C.a, Decl(classPropertyAsProtected.ts, 4, 23))
|
|
|
|
protected static get b() { return null; }
|
|
>b : Symbol(C.b, Decl(classPropertyAsProtected.ts, 6, 31), Decl(classPropertyAsProtected.ts, 7, 45))
|
|
|
|
protected static set b(x) { }
|
|
>b : Symbol(C.b, Decl(classPropertyAsProtected.ts, 6, 31), Decl(classPropertyAsProtected.ts, 7, 45))
|
|
>x : Symbol(x, Decl(classPropertyAsProtected.ts, 8, 27))
|
|
|
|
protected static foo() { }
|
|
>foo : Symbol(C.foo, Decl(classPropertyAsProtected.ts, 8, 33))
|
|
}
|
|
|
|
declare var c: C;
|
|
>c : Symbol(c, Decl(classPropertyAsProtected.ts, 12, 11))
|
|
>C : Symbol(C, Decl(classPropertyAsProtected.ts, 0, 0))
|
|
|
|
// all errors
|
|
c.x;
|
|
>c.x : Symbol(C.x, Decl(classPropertyAsProtected.ts, 0, 9))
|
|
>c : Symbol(c, Decl(classPropertyAsProtected.ts, 12, 11))
|
|
>x : Symbol(C.x, Decl(classPropertyAsProtected.ts, 0, 9))
|
|
|
|
c.y;
|
|
>c.y : Symbol(C.y, Decl(classPropertyAsProtected.ts, 1, 24), Decl(classPropertyAsProtected.ts, 2, 38))
|
|
>c : Symbol(c, Decl(classPropertyAsProtected.ts, 12, 11))
|
|
>y : Symbol(C.y, Decl(classPropertyAsProtected.ts, 1, 24), Decl(classPropertyAsProtected.ts, 2, 38))
|
|
|
|
c.y = 1;
|
|
>c.y : Symbol(C.y, Decl(classPropertyAsProtected.ts, 1, 24), Decl(classPropertyAsProtected.ts, 2, 38))
|
|
>c : Symbol(c, Decl(classPropertyAsProtected.ts, 12, 11))
|
|
>y : Symbol(C.y, Decl(classPropertyAsProtected.ts, 1, 24), Decl(classPropertyAsProtected.ts, 2, 38))
|
|
|
|
c.foo();
|
|
>c.foo : Symbol(C.foo, Decl(classPropertyAsProtected.ts, 3, 26))
|
|
>c : Symbol(c, Decl(classPropertyAsProtected.ts, 12, 11))
|
|
>foo : Symbol(C.foo, Decl(classPropertyAsProtected.ts, 3, 26))
|
|
|
|
C.a;
|
|
>C.a : Symbol(C.a, Decl(classPropertyAsProtected.ts, 4, 23))
|
|
>C : Symbol(C, Decl(classPropertyAsProtected.ts, 0, 0))
|
|
>a : Symbol(C.a, Decl(classPropertyAsProtected.ts, 4, 23))
|
|
|
|
C.b();
|
|
>C.b : Symbol(C.b, Decl(classPropertyAsProtected.ts, 6, 31), Decl(classPropertyAsProtected.ts, 7, 45))
|
|
>C : Symbol(C, Decl(classPropertyAsProtected.ts, 0, 0))
|
|
>b : Symbol(C.b, Decl(classPropertyAsProtected.ts, 6, 31), Decl(classPropertyAsProtected.ts, 7, 45))
|
|
|
|
C.b = 1;
|
|
>C.b : Symbol(C.b, Decl(classPropertyAsProtected.ts, 6, 31), Decl(classPropertyAsProtected.ts, 7, 45))
|
|
>C : Symbol(C, Decl(classPropertyAsProtected.ts, 0, 0))
|
|
>b : Symbol(C.b, Decl(classPropertyAsProtected.ts, 6, 31), Decl(classPropertyAsProtected.ts, 7, 45))
|
|
|
|
C.foo();
|
|
>C.foo : Symbol(C.foo, Decl(classPropertyAsProtected.ts, 8, 33))
|
|
>C : Symbol(C, Decl(classPropertyAsProtected.ts, 0, 0))
|
|
>foo : Symbol(C.foo, Decl(classPropertyAsProtected.ts, 8, 33))
|
|
|