-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Unable to destructure let assignments #2012
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
Comments
Can you try removing the label |
Removing the label also resolved the issue. So it does appear to be the combination of the label and the let statement together. |
I would guess that it works with 'var' because the UnreachableCodeElimination pass knows that 'var's are hoisted making it unsafe to remove them. @Dominator008 do you think UnreachableCodeElimination is assuming that code after a label that is never mentioned is automatically unreachable? |
@brad4d I think this might be a bug with Es6RewriteBlockScopedDeclarations. |
@arciisine Did you use |
For the above, yeah |
@arciisine Cool thanks. I have a fix for this internally. It will be pushed out soon :) |
Awesome @Dominator008, looking forward to it. |
Fixes google#2012 on GitHub. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133411970
I'm working on compiling some generated code, and I seem to be running into an unexpected error when attempting to destructure an array using a let declaration. Changing the let to a var resolves the issue. It looks like the issue could be related to #1124.
The sample code:
With running this with the closure compiler, I received the following error:
The text was updated successfully, but these errors were encountered: