Detect assignment pattern for for-in/of (#4140)
Furthermore do not allow default value for rest parameter JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -60,6 +60,9 @@ checkSyntax ("[()] = []");
|
||||
checkSyntax ("try { let [$] = $;");
|
||||
checkSyntax ("let a, [ b.c ] = [6];");
|
||||
checkSyntax ("let [(a)] = [1]");
|
||||
checkSyntax ("[...a = []] = [1]");
|
||||
checkSyntax ("[...[a] = []] = [1]");
|
||||
checkSyntax ("[...[a, [...b] = []] = []] = [1]");
|
||||
|
||||
mustThrow ("var [a] = 4");
|
||||
mustThrow ("var [a] = 5");
|
||||
|
||||
Reference in New Issue
Block a user