Improve binding patterns for arrow functions

This commit is contained in:
Anthony Van de Gejuchte
2016-09-07 01:00:07 +02:00
committed by Richard van Velzen
parent 947b8750e8
commit 32c2cc33bb
12 changed files with 243 additions and 54 deletions

View File

@@ -124,4 +124,8 @@ describe("Object", function() {
assert.throws(testCase(test), fail(test), errorMessage(test));
}
});
it("Should be able to use shorthand properties", function() {
var ast = Uglify.parse("var foo = 123\nvar obj = {foo: foo}");
assert.strictEqual(ast.print_to_string({ecma: 6}), "var foo=123;var obj={foo};");
})
});