-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Can't use object-rest-spread in a function #6247
Comments
In 6 this seems to happen because of this: https://github.com/babel/babel/blob/6.x/packages/babel-plugin-transform-object-rest-spread/src/index.js#L183 That is false and thus ref is never set, causing undefined to be used into createObjectSpread. Does the REPL use 7-beta? This code looks very different there. |
I guess its fixed in 7? https://runkit.com/tolmasky/59bac814a0dafb0012fb9954 Would it be possible to backport these changes to the 6 branch or are they 7 reliant? We've got users running into this now, and even after 7 ships we'll probably have to start on 6 for a while. |
Yup, fixed in 7. |
Would it be possible to backport these changes to the 6 branch or are they 7 reliant? We've got users running into this now, and even after 7 ships we'll probably have to start on 6 for a while. |
I don't think we're cutting any more 6 releases, mainly because there's not enough of us to fix 6 bugs and work on 7. |
Original issue submitted by @tolmasky in babel/babylon#724
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
If you comment out "function x()" it works fine. The actual example from my code was
Input Code
Babylon/Babel Configuration
The text was updated successfully, but these errors were encountered: