Justin Ridgewell 852348d700 Fix default parameter - rest parameter edge case (#3572)
When the rest parameter shared the same name as a default identifier
for a param, the loop would be hoisted outside the function!

```js
var a = 1;

for (var _len = arguments.length, a = Array(_len > 1 ? _len - 1 : 0),
_key = 1; _key < _len; _key++) {
  a[_key - 1] = arguments[_key];
}

function foo2() {
  var b = arguments.length <= 0 || arguments[0] === undefined ? a :
arguments[0];

  assert.equal(b, 1);
}
foo2(undefined, 2);
```

And if you tried to reference any index or `#length`, it’d blow up and
refuse to transpile.
2016-12-16 10:53:52 -05:00
..
2015-12-21 10:43:59 +01:00
2015-10-29 17:51:24 +00:00