Skip to content

JSC_REDECLARED_VARIABLE_ERROR: Illegal redeclared variable #2909

Closed
@thheller

Description

@thheller
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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions