Revert "Don't mark async functions as hoist"

This reverts commit d34cb69912.
This commit is contained in:
Erik
2016-02-02 22:13:26 -05:00
parent 7428654c19
commit ec61bd9386
3 changed files with 1 additions and 4 deletions

View File

@@ -87,6 +87,7 @@ function plainFunction(path: NodePath, callId: Object) {
t.callExpression(container, [])
)
]);
declar._blockHoist = true;
retFunction.id = asyncFnId;
path.replaceWith(declar);

View File

@@ -1,5 +1,3 @@
function normalFunction() {}
async function foo() {
var wat = await bar();
}

View File

@@ -1,5 +1,3 @@
function normalFunction() {}
let foo = function () {
var ref = babelHelpers.asyncToGenerator(function* () {
var wat = yield bar();