Add test case for regression possibly introduced by #2833

This commit is contained in:
Victor Felder
2015-12-21 02:42:01 +01:00
parent 5d414a2323
commit f472670503
2 changed files with 19 additions and 1 deletions

View File

@@ -14,4 +14,11 @@ function t(...items) {
a.push(i);
}
return a;
}
}
// https://github.com/babel/babel/pull/2833#issuecomment-166039291
function t(...items) {
for (let i = 0; i < items.length; i++) {
return items[i];
}
}

View File

@@ -15,3 +15,14 @@ function t() {
}
return a;
}
// https://github.com/babel/babel/pull/2833#issuecomment-166039291
function t() {
for (var _len = arguments.length, items = Array(_len), _key = 0; _key < _len; _key++) {
items[_key] = arguments[_key];
}
for (var i = 0; i < items.length; i++) {
return items[i];
}
}