Fix evaluation order in non-binding destructuring patterns (#4173)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-08-28 15:13:02 +02:00
committed by GitHub
parent 28c186c98f
commit 2f08d8ac08
11 changed files with 92 additions and 36 deletions
+8
View File
@@ -226,6 +226,14 @@ mustThrow ("function f ({}) {}; f();");
assert (a === 7);
}) ();
(function () {
var o = {};
({ a : o.c } = { get a() { return 5.2 }})
assert(o.c == 5.2);
}) ();
try {
eval ("var a = 0; -{a} = {a:1}");
assert (false);