TypeScript/tests/baselines/reference/emitArrowFunctionWhenUsingArguments17.js
2015-04-16 12:42:25 -07:00

19 lines
453 B
TypeScript

//// [emitArrowFunctionWhenUsingArguments17.ts]
function f() {
var { arguments } = { arguments: "hello" };
if (Math.random()) {
return () => arguments[0];
}
var arguments = "world";
}
//// [emitArrowFunctionWhenUsingArguments17.js]
function f() {
var arguments = { arguments: "hello" }.arguments;
if (Math.random()) {
return function () { return arguments[0]; };
}
var arguments = "world";
}