fix rest parameter array allocation loop being incorrectly aliased - fixes #1800

This commit is contained in:
Sebastian McKenzie
2015-06-22 11:54:57 +01:00
parent aa151016f5
commit 8e1f134635
5 changed files with 62 additions and 6 deletions

View File

@@ -0,0 +1,7 @@
var fn = async (...rest) => rest;
var fn = async (...rest) => {
if (true) {
rest;
}
};

View File

@@ -0,0 +1,39 @@
"use strict";
var _this = this;
var fn = function fn() {
for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
rest[_key] = arguments[_key];
}
return regeneratorRuntime.async(function fn$(context$1$0) {
while (1) switch (context$1$0.prev = context$1$0.next) {
case 0:
return context$1$0.abrupt("return", rest);
case 1:
case "end":
return context$1$0.stop();
}
}, null, _this);
};
var fn = function fn() {
for (var _len2 = arguments.length, rest = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
rest[_key2] = arguments[_key2];
}
return regeneratorRuntime.async(function fn$(context$1$0) {
while (1) switch (context$1$0.prev = context$1$0.next) {
case 0:
if (true) {
rest;
}
case 1:
case "end":
return context$1$0.stop();
}
}, null, _this);
};

View File

@@ -0,0 +1,3 @@
{
"stage": 0
}