TypeScript/tests/baselines/reference/argumentsAsPropertyName2.types
Eli Barzilay f447838f95 Fix handling of aruments in the emitter
Two problems are fixed:

* `isArgumentsLocalBinding` did only `PropertyAccessExpression`, now
  it's also doing `PropertyAssignment` (doesn't affect other files,
  since it's only used in the emitter).

* `visitShorthandPropertyAssignment` should call `visitIdentifier` on
  the synthesized id.  (For completion it might be better to make it
  visit the the original?)

Fixes #38594.
2020-06-13 07:05:21 -04:00

46 lines
1.1 KiB
Plaintext

=== tests/cases/compiler/argumentsAsPropertyName2.ts ===
// target: es5
function foo() {
>foo : () => void
for (let x = 0; x < 1; ++x) {
>x : number
>0 : 0
>x < 1 : boolean
>x : number
>1 : 1
>++x : number
>x : number
let i : number;
>i : number
[].forEach(function () { i });
>[].forEach(function () { i }) : void
>[].forEach : (callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any) => void
>[] : undefined[]
>forEach : (callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any) => void
>function () { i } : () => void
>i : number
({ arguments: 0 });
>({ arguments: 0 }) : { arguments: number; }
>{ arguments: 0 } : { arguments: number; }
>arguments : number
>0 : 0
({ arguments });
>({ arguments }) : { arguments: IArguments; }
>{ arguments } : { arguments: IArguments; }
>arguments : IArguments
({ arguments: arguments });
>({ arguments: arguments }) : { arguments: IArguments; }
>{ arguments: arguments } : { arguments: IArguments; }
>arguments : IArguments
>arguments : IArguments
}
}