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

ES6 Destructuring Broken #11

Closed
molenzwiebel opened this issue Nov 15, 2017 · 1 comment
Closed

ES6 Destructuring Broken #11

molenzwiebel opened this issue Nov 15, 2017 · 1 comment

Comments

@molenzwiebel
Copy link

As of the current version, array destructuring seems to be broken in some cases.

Works fine:

const [a, b, c] = foo;

This renders as
schermafbeelding 2017-11-15 om 16 30 29

However, changing it to the following breaks it:

const [a, b, c] = foo();

As you can see, it now renders the lefthand as undefined:
schermafbeelding 2017-11-15 om 16 31 30

@Bogdan-Lyashenko
Copy link
Owner

Hey @molenzwiebel, thanks, nice catch. I totally missed ArrayPattern token, added it now 😸

Fixed, it's gonna look like:
image

similar to ObjectPattern which is done in the same way. Closing issue.

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

2 participants