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
..
2016-02-12 11:29:58 -05:00
2016-11-29 08:40:27 -05:00
2016-12-08 18:25:39 -05:00
2016-12-08 18:25:39 -05:00
2016-12-08 18:25:39 -05:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-12-08 18:25:39 -05:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-10-24 17:18:36 -04:00
2016-12-08 21:55:37 -05:00
2016-10-24 17:18:36 -04:00
2016-12-16 10:51:37 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:39:23 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-11-29 08:40:27 -05:00
2016-12-16 10:51:37 -05:00
2016-11-29 08:40:27 -05:00
2016-12-08 09:48:15 -05:00
2016-12-08 21:51:24 -05:00
2016-11-30 12:24:59 -05:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-08 18:25:39 -05:00
2016-12-02 17:07:16 -06:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-02 17:07:16 -06:00
2016-12-16 10:52:48 -05:00
2016-12-01 16:11:36 -05:00
2016-11-29 08:40:27 -05:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-16 10:53:52 -05:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-01 16:11:36 -05:00
2016-12-02 17:07:16 -06:00
2016-12-09 11:55:19 -05:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-01 23:39:45 -05:00
2016-12-08 20:15:21 -05:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-11-30 12:19:54 -05:00
2016-12-03 20:09:07 -05:00
2016-11-30 12:19:54 -05:00
2016-11-30 12:19:54 -05:00
2016-11-30 12:19:54 -05:00
2016-12-03 20:09:07 -05:00
2016-12-03 20:09:07 -05:00
2016-12-08 18:25:39 -05:00
2016-12-11 21:04:24 -05:00
2016-12-02 17:07:16 -06:00
2016-12-02 17:07:16 -06:00
2016-12-08 18:25:39 -05:00
2016-11-29 21:23:53 -05:00
2016-11-29 08:39:23 -05:00
2016-11-29 08:39:23 -05:00
2016-11-29 21:23:53 -05:00
2016-11-29 08:39:23 -05:00
2016-11-29 08:39:23 -05:00
2016-11-29 08:39:23 -05:00
2016-11-29 08:39:23 -05:00
2016-11-29 08:39:23 -05:00
2016-12-05 13:39:14 -05:00
2016-12-08 18:25:39 -05:00
2016-11-29 08:40:27 -05:00
2016-12-16 10:52:48 -05:00
2016-12-08 19:33:55 -05:00
2015-10-29 17:51:24 +00:00