Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

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

Closed
tolmasky opened this issue Sep 14, 2017 · 6 comments
Closed

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

tolmasky opened this issue Sep 14, 2017 · 6 comments

Comments

@tolmasky
Copy link

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.
@hzoo
Copy link
Member

hzoo commented Sep 14, 2017

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.

@jridgewell
Copy link
Member

@babel-bot move to babel/babel.

@jridgewell
Copy link
Member

Ugh, @babel-bot fail.

@jridgewell
Copy link
Member

@babel-bot move to babel/babel

@hzoo
Copy link
Member

hzoo commented Sep 14, 2017

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.

@jridgewell
Copy link
Member

@hzoo bot?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants