TypeScript/tests/cases/compiler/argumentsAsPropertyName2.ts
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

12 lines
238 B
TypeScript

// target: es5
function foo() {
for (let x = 0; x < 1; ++x) {
let i : number;
[].forEach(function () { i });
({ arguments: 0 });
({ arguments });
({ arguments: arguments });
}
}