Fix for deeply nested async arrows
This commit is contained in:
parent
f2fdc74d1b
commit
fa9f8ea4be
@ -27,7 +27,9 @@ let awaitVisitor = {
|
||||
},
|
||||
|
||||
ArrowFunctionExpression(path) {
|
||||
if (!path.node.async) {
|
||||
path.arrowFunctionToShadowed();
|
||||
}
|
||||
},
|
||||
|
||||
AwaitExpression({ node }) {
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
async function s(x) {
|
||||
let t = async (y) => {
|
||||
let r = async (z) => {
|
||||
await z;
|
||||
return this.x;
|
||||
}
|
||||
await r;
|
||||
|
||||
return this.g(r);
|
||||
}
|
||||
await t;
|
||||
return this.h(t);
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
let s = function () {
|
||||
var ref = babelHelpers.asyncToGenerator(function* (x) {
|
||||
let t = (() => {
|
||||
var _this2 = this;
|
||||
|
||||
var ref = babelHelpers.asyncToGenerator(function* (y) {
|
||||
let r = (() => {
|
||||
var _this = this;
|
||||
|
||||
var ref = babelHelpers.asyncToGenerator(function* (z) {
|
||||
yield z;
|
||||
return _this.x;
|
||||
});
|
||||
return _x3 => ref.apply(this, arguments);
|
||||
})();
|
||||
yield r;
|
||||
|
||||
return _this2.g(r);
|
||||
});
|
||||
return _x2 => ref.apply(this, arguments);
|
||||
})();
|
||||
yield t;
|
||||
return this.h(t);
|
||||
});
|
||||
return function s(_x) {
|
||||
return ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
Loading…
x
Reference in New Issue
Block a user