Support nested destructuring patterns in catch header (#3488)
This patch fixes #3433. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
Dániel Bátyai
parent
1725e014b8
commit
d0e8629342
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user