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

JSC_REDECLARED_VARIABLE_ERROR: Illegal redeclared variable #2909

Closed
thheller opened this issue Apr 27, 2018 · 2 comments
Closed

JSC_REDECLARED_VARIABLE_ERROR: Illegal redeclared variable #2909

thheller opened this issue Apr 27, 2018 · 2 comments
Assignees

Comments

@thheller
Copy link

let types;
[x, ...types] = [1,2,3];

Compiling this piece of code yields the following error in the Compiler but executes fine in Chrome.

JSC_REDECLARED_VARIABLE_ERROR: Illegal redeclared variable: types at line 3 character 7
[x, ...types] = [1,2,3];

Reproduced with the closure-compiler.appspot.com web compiler and the v20180422 release.

Seen in the jsonld npm package.

@brad4d brad4d self-assigned this Apr 27, 2018
@brad4d
Copy link
Contributor

brad4d commented Apr 27, 2018

For some reason REST is included in the list of DECLARATION_PARENTS in Reference.java

@brad4d
Copy link
Contributor

brad4d commented Apr 28, 2018

I'm sending a fix for internal review.
Thanks for the report @thheller .

Yannic pushed a commit to Yannic/com_google_closure_compiler that referenced this issue Jul 16, 2018
Fixes google#2909

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195425689
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