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
|
=== tests/cases/conformance/expressions/optionalChaining/privateIdentifierChain/privateIdentifierChain.1.ts ===
class A {
>A : Symbol(A, Decl(privateIdentifierChain.1.ts, 0, 0))
a?: A
>a : Symbol(A.a, Decl(privateIdentifierChain.1.ts, 0, 9))
>A : Symbol(A, Decl(privateIdentifierChain.1.ts, 0, 0))
#b?: A;
>#b : Symbol(A.#b, Decl(privateIdentifierChain.1.ts, 1, 9))
>A : Symbol(A, Decl(privateIdentifierChain.1.ts, 0, 0))
getA(): A {
>getA : Symbol(A.getA, Decl(privateIdentifierChain.1.ts, 2, 11))
>A : Symbol(A, Decl(privateIdentifierChain.1.ts, 0, 0))
return new A();
>A : Symbol(A, Decl(privateIdentifierChain.1.ts, 0, 0))
}
constructor() {
this?.#b; // Error
>this?.#b : Symbol(A.#b, Decl(privateIdentifierChain.1.ts, 1, 9))
>this : Symbol(A, Decl(privateIdentifierChain.1.ts, 0, 0))
this?.a.#b; // Error
>this?.a.#b : Symbol(A.#b, Decl(privateIdentifierChain.1.ts, 1, 9))
>this?.a : Symbol(A.a, Decl(privateIdentifierChain.1.ts, 0, 9))
>this : Symbol(A, Decl(privateIdentifierChain.1.ts, 0, 0))
>a : Symbol(A.a, Decl(privateIdentifierChain.1.ts, 0, 9))
this?.getA().#b; // Error
>this?.getA().#b : Symbol(A.#b, Decl(privateIdentifierChain.1.ts, 1, 9))
>this?.getA : Symbol(A.getA, Decl(privateIdentifierChain.1.ts, 2, 11))
>this : Symbol(A, Decl(privateIdentifierChain.1.ts, 0, 0))
>getA : Symbol(A.getA, Decl(privateIdentifierChain.1.ts, 2, 11))
}
}
|