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

Output code is invalid when input is { [a]: function*(){ } } #3217

Closed
Getfree opened this issue Jan 26, 2019 · 1 comment
Closed

Output code is invalid when input is { [a]: function*(){ } } #3217

Getfree opened this issue Jan 26, 2019 · 1 comment
Assignees
Labels
internal-issue-created An internal Google issue has been created to track this GitHub issue triage-done Has been reviewed by someone on triage rotation.

Comments

@Getfree
Copy link

Getfree commented Jan 26, 2019

Input.js

let a = 1 ;

let obj = {
	[a]: function*(){ }
} ;

Command line:

java -jar closure-compiler-v20190121.jar --language_out NO_TRANSPILE -O SIMPLE  --js_output_file Output.js Input.js

Output.js

'use strict';
let a = 1, obj = {*[a]:function*() {
}};

Output file contains invalid syntax. There's an extra asterisk before [a].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal-issue-created An internal Google issue has been created to track this GitHub issue triage-done Has been reviewed by someone on triage rotation.
Projects
None yet
Development

No branches or pull requests

3 participants