f84b2d20a9
Previously, this error was reported in the checker, so JS files with checkJs: false were not erroring on this invalid syntax.
39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
=== 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))
|
|
}
|
|
}
|
|
|