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

Cannot read property 'file' of undefined at Scope.toArray #6950

Open
haf opened this Issue Dec 1, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@haf

haf commented Dec 1, 2017

Here's a minimal repro:

const fn = edit => noop => {
  const a = [ 1, 2 ]
  const [ sid, ignored ] = [ 1, a[0] ];
}

Will not crash if:

  • you remove the access to a
  • you remove edit

Will not not crash if (aka, unaffected by):

  • you add a return statement
  • you rename any variable
  • you change the number of values in a

Versions

  • "babel-plugin-react-transform": "2.0.2",
  • "babel-plugin-transform-react-constant-elements": "^6.23.0",
  • "babel-plugin-transform-runtime": "6.23.0",

This is similar to #5915 which was closed as fixed when it's not (if the person who closed it had bothered to write a unit test for the bug, he'd know that).

@babel-bot

This comment has been minimized.

Show comment
Hide comment
@babel-bot

babel-bot Dec 1, 2017

Collaborator

Hey @haf! 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.

Collaborator

babel-bot commented Dec 1, 2017

Hey @haf! 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.

@nicolo-ribaudo

This comment has been minimized.

Show comment
Hide comment
@nicolo-ribaudo

nicolo-ribaudo Dec 1, 2017

Member

That issue was closed as fixed in Babel 7.0.0-alpha.19, so it won't work in Babel 6. Can you test it with Babel 7.0.0-beta.32?

Member

nicolo-ribaudo commented Dec 1, 2017

That issue was closed as fixed in Babel 7.0.0-alpha.19, so it won't work in Babel 6. Can you test it with Babel 7.0.0-beta.32?

@haf

This comment has been minimized.

Show comment
Hide comment
@haf

haf Dec 1, 2017

The comment about it being fixed referenced the REPL which is broken, which the latter comments in that thread indicate. I've given you a test case, and that test-case even breaks your REPL. Have you written a unit test with it?

Babel 7 is a beta right now, so it's not for us so far. Also, trying to migrate to the latest recommended settings so we can move straight to 7 once it's out of beta triggered #6951

haf commented Dec 1, 2017

The comment about it being fixed referenced the REPL which is broken, which the latter comments in that thread indicate. I've given you a test case, and that test-case even breaks your REPL. Have you written a unit test with it?

Babel 7 is a beta right now, so it's not for us so far. Also, trying to migrate to the latest recommended settings so we can move straight to 7 once it's out of beta triggered #6951

@nicolo-ribaudo

This comment has been minimized.

Show comment
Hide comment
@nicolo-ribaudo

nicolo-ribaudo Dec 2, 2017

Member

Ok, can you post a reproducible example? WIth the informations you have given, I am unable to reproduce the bug (neither with babel 6.23 nor with babel 7.0.0-beta.32).

https://gist.github.com/nicolo-ribaudo/cc8fef58fee5ef70d9c16c9811854ba2

Member

nicolo-ribaudo commented Dec 2, 2017

Ok, can you post a reproducible example? WIth the informations you have given, I am unable to reproduce the bug (neither with babel 6.23 nor with babel 7.0.0-beta.32).

https://gist.github.com/nicolo-ribaudo/cc8fef58fee5ef70d9c16c9811854ba2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment