Support nested destructuring patterns in catch header (#3488)

This patch fixes #3433.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
This commit is contained in:
Robert Fancsik authored and Dániel Bátyai committed 2020-01-13 11:39:07 +01:00
1 parent 1725e014b8
commit d0e8629342
3 files changed
+21 -7

No files matched your search

+16
View File
@@ -71,3 +71,19 @@ try {
} catch (e) {
assert(e instanceof ReferenceError)
}
try {
throw [{a : 5}];
} catch([{a}]) {
assert(a === 5);
}
var catchReached = false;
try {
throw [{}];
assert(false);
} catch([{}]) {
catchReached = true;
}
assert(catchReached);