fix parenthesis output of AST_ClassExpression (#2677)

fixes #2676
This commit is contained in:
Alex Lam S.L
2017-12-28 05:07:19 +08:00
committed by GitHub
parent 9f7d1f7ac6
commit 0a3fac6e68
2 changed files with 16 additions and 7 deletions

View File

@@ -1197,3 +1197,18 @@ class_method_using_arguments: {
expect_stdout: "PASS"
node_version: ">=6"
}
issue_2676: {
options = {
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
class A {}
A.a = 42;
}
expect: {
(class {}).a = 42;
}
}