TypeScript/tests/baselines/reference/importHelpersES6.symbols
Ashley Claymore af689cc5d5
ES private field check (#44648)
* es private fields in in (#52)

add support for the 'private-fields-in-in' TC39 proposal

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [fixup] include inToken when walking forEachChild(node, cb)

* [squash] re-accept lib definition baseline changes

* [squash] reduce if/else to ternary

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] drop 'originalName' and rename parameter instead

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] extend spelling suggestion to all privateIdentifiers

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] revert the added lexical spelling suggestions logic

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] update baseline

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] inline variable as per PR suggestion

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] test targets both esnext and es2020 as per PR comment

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* switch to using a binary expression

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] PrivateIdentifier now extends PrimaryExpression

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] accept public api baseline changes

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] classPrivateFieldInHelper now has documentation

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] type-check now follows existing in-expression path

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] parser now follows existing binaryExpression path

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] correct typo in comment

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] no longer use esNext flag

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] swap 'reciever, state' helper params

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] remove change to parenthesizerRules

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] apply suggested changes to checker

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] remove need for assertion in fixSpelling

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] improve comment hint in test

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] fix comment typos

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] add flow-test for Foo | FooSub | Bar

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] add checkExternalEmitHelpers call and new test case

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] simplify and correct parser

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] move most of the added checker logic to expression level

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] always error when privateId could not be resolved

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] reword comment

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] fix codeFixSpelling test

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] do less work

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* store symbol by priateId not binaryExpression

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* moved parsePrivateIdentifier into parsePrimaryExpression

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] checkInExpressionn bails out early on silentNeverType

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] more detailed error messages

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] resolves conflict in diagnosticMessages.json

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] update baseline for importHelpersES6

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] remove redundent if and comment from parser

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] split up grammar/check/symbolLookup

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>

* [squash] reword message for existing left side of in-expression error

Signed-off-by: Ashley Claymore <acutmore@users.noreply.github.com>
2021-09-24 09:05:27 -07:00

92 lines
4.6 KiB
Plaintext

=== tests/cases/compiler/a.ts ===
declare var dec: any;
>dec : Symbol(dec, Decl(a.ts, 0, 11))
@dec export class A {
>dec : Symbol(dec, Decl(a.ts, 0, 11))
>A : Symbol(A, Decl(a.ts, 0, 21))
#x: number = 1;
>#x : Symbol(A.#x, Decl(a.ts, 1, 21))
async f() { this.#x = await this.#x; }
>f : Symbol(A.f, Decl(a.ts, 2, 19))
>this.#x : Symbol(A.#x, Decl(a.ts, 1, 21))
>this : Symbol(A, Decl(a.ts, 0, 21))
>this.#x : Symbol(A.#x, Decl(a.ts, 1, 21))
>this : Symbol(A, Decl(a.ts, 0, 21))
g(u) { return #x in u; }
>g : Symbol(A.g, Decl(a.ts, 3, 42))
>u : Symbol(u, Decl(a.ts, 4, 6))
>#x : Symbol(A.#x, Decl(a.ts, 1, 21))
>u : Symbol(u, Decl(a.ts, 4, 6))
}
const o = { a: 1 };
>o : Symbol(o, Decl(a.ts, 7, 5))
>a : Symbol(a, Decl(a.ts, 7, 11))
const y = { ...o };
>y : Symbol(y, Decl(a.ts, 8, 5))
>o : Symbol(o, Decl(a.ts, 7, 5))
=== tests/cases/compiler/tslib.d.ts ===
export declare function __extends(d: Function, b: Function): void;
>__extends : Symbol(__extends, Decl(tslib.d.ts, --, --))
>d : Symbol(d, Decl(tslib.d.ts, --, --))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>b : Symbol(b, Decl(tslib.d.ts, --, --))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
>__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --))
>decorators : Symbol(decorators, Decl(tslib.d.ts, --, --))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>target : Symbol(target, Decl(tslib.d.ts, --, --))
>key : Symbol(key, Decl(tslib.d.ts, --, --))
>desc : Symbol(desc, Decl(tslib.d.ts, --, --))
export declare function __param(paramIndex: number, decorator: Function): Function;
>__param : Symbol(__param, Decl(tslib.d.ts, --, --))
>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --))
>decorator : Symbol(decorator, Decl(tslib.d.ts, --, --))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
>__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --))
>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --))
>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --))
>thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --))
>_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --))
>P : Symbol(P, Decl(tslib.d.ts, --, --))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
>generator : Symbol(generator, Decl(tslib.d.ts, --, --))
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
export declare function __classPrivateFieldGet(a: any, b: any, c: any, d: any): any;
>__classPrivateFieldGet : Symbol(__classPrivateFieldGet, Decl(tslib.d.ts, --, --))
>a : Symbol(a, Decl(tslib.d.ts, --, --))
>b : Symbol(b, Decl(tslib.d.ts, --, --))
>c : Symbol(c, Decl(tslib.d.ts, --, --))
>d : Symbol(d, Decl(tslib.d.ts, --, --))
export declare function __classPrivateFieldSet(a: any, b: any, c: any, d: any, e: any): any;
>__classPrivateFieldSet : Symbol(__classPrivateFieldSet, Decl(tslib.d.ts, --, --))
>a : Symbol(a, Decl(tslib.d.ts, --, --))
>b : Symbol(b, Decl(tslib.d.ts, --, --))
>c : Symbol(c, Decl(tslib.d.ts, --, --))
>d : Symbol(d, Decl(tslib.d.ts, --, --))
>e : Symbol(e, Decl(tslib.d.ts, --, --))
export declare function __classPrivateFieldIn(a: any, b: any): boolean;
>__classPrivateFieldIn : Symbol(__classPrivateFieldIn, Decl(tslib.d.ts, --, --))
>a : Symbol(a, Decl(tslib.d.ts, --, --))
>b : Symbol(b, Decl(tslib.d.ts, --, --))