babel / babylon

PSA: moved into babel/babel as @babel/parser -->

Home Page:https://github.com/babel/babel/tree/master/packages/babel-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use object-rest-spread in a function

tolmasky opened this issue · comments

Here's the REPL example: https://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&code_lz=FAMwrgdgxgLglgewgAgB4AoCUwDewCQAbgIYBOyxyAvMujsgHROkCmAzjMgL7XJsIBbFjAAWcCAHNMAbmBcgA&debug=false&circleciRepo=&evaluate=false&lineWrap=true&presets=es2015%2Creact%2Cstage-0&prettier=false&targets=&version=6.26.0

function x()
{
	var a = ({ ...rest } = something);
}

If you comment out "function x()" it works fine. The actual example from my code was

function *x() { yield { capture:({ ...rest } = s) } }

Input Code

var your => (code) => here;

Babylon/Babel Configuration

plugins:["objectRestSpread"] for parser.
and transform-object-rest-spread.
commented

Hey @tolmasky! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@babel-bot move to babel/babel.

@babel-bot move to babel/babel

commented

Hey @tolmasky! I've moved your issue to the correct repository. Please make sure to keep an eye on the new issue for the latest information.