Array or object pattern must be assignment expression. (#3744)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-05-15 22:29:27 +02:00
committed by GitHub
parent 1f00d750b7
commit 4aa27371b6
3 changed files with 45 additions and 8 deletions
+7
View File
@@ -225,3 +225,10 @@ mustThrow ("function f ({}) {}; f();");
({"a": ((a)) } = {a : 7});
assert (a === 7);
}) ();
try {
eval ("var a = 0; -{a} = {a:1}");
assert (false);
} catch (e) {
assert (e instanceof ReferenceError);
}