facebook/regenerator

Spread operator not supported in function call

decademoon opened this issue · 0 comments

regenerator-transform@0.14.4

The following code fails to be transformed:

async function foo() {
  bar(...await x);
}

See this babel repl.

Exception occurs at the assertion here:

Ep.explodeExpression = function(path, ignoreResult) {
const t = util.getTypes();
let expr = path.node;
if (expr) {
t.assertExpression(expr);
} else {
return expr;
}

Expected type "Expression" with option {}, but instead got "SpreadElement"