Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spread operator not supported in function call #397

Open
decademoon opened this issue Jun 17, 2020 · 0 comments
Open

Spread operator not supported in function call #397

decademoon opened this issue Jun 17, 2020 · 0 comments

Comments

@decademoon
Copy link

decademoon commented Jun 17, 2020

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant