Skip to content

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

Closed
@Getfree

Description

@Getfree

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].

Metadata

Metadata

Assignees

Labels

internal-issue-createdAn internal Google issue has been created to track this GitHub issuetriage-doneHas been reviewed by someone on triage rotation.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions