Test arrow function inside generator. (#5605)

This commit is contained in:
Artem Yavorsky
2017-04-12 21:13:58 +03:00
committed by Logan Smyth
parent d1c954b36f
commit 3146b245ed
3 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
function* gen () {
const a = () => {
return 1;
};
}

View File

@@ -0,0 +1,17 @@
var _marked = [gen].map(regeneratorRuntime.mark);
function gen() {
var a;
return regeneratorRuntime.wrap(function gen$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
a = () => {
return 1;
};
case 1:
case "end":
return _context.stop();
}
}, _marked[0], this);
}

View File

@@ -0,0 +1,5 @@
{
"plugins": [
"transform-regenerator"
]
}