make parenthesized array patterns illegal - cc @michaelficarra
This commit is contained in:
@@ -2,6 +2,14 @@ var test = require("./driver.js").test;
|
||||
var testFail = require("./driver.js").testFail;
|
||||
var testAssert = require("./driver.js").testAssert;
|
||||
|
||||
testFail("({a}) = 2;", "You're trying to assign to a parenthesized expression, instead of `({ foo }) = {}` use `({ foo } = {})` (1:1)", {
|
||||
ecmaVersion: 6
|
||||
});
|
||||
|
||||
testFail("([a]) = 2;", "You're trying to assign to a parenthesized expression, instead of `({ foo }) = {}` use `({ foo } = {})` (1:1)", {
|
||||
ecmaVersion: 6
|
||||
});
|
||||
|
||||
// ES7: Exponentiation Operator
|
||||
|
||||
test('a **= 2;', {
|
||||
|
||||
Reference in New Issue
Block a user