Fix object destructuring for empty pattern (#3571)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-03-02 15:37:03 +01:00
committed by GitHub
parent f31931267a
commit ec39d08d67
7 changed files with 27 additions and 2 deletions
+2
View File
@@ -54,6 +54,8 @@ checkSyntax ("let {a:(a)} = {a:1}");
mustThrow ("var {a} = null");
mustThrow ("var {a} = undefined");
mustThrow ("function f ({a : {}}) {}; f({});");
mustThrow ("function f ({}) {}; f();");
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment