Fix function declaration issues inside catch blocks. (#3700)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-04-29 13:53:14 +02:00
committed by GitHub
parent 85401db547
commit 9e6c44be4f
5 changed files with 163 additions and 15 deletions
+5
View File
@@ -28,6 +28,11 @@ check_syntax_error("try {} catch([a] {}");
check_syntax_error("try {} catch([a] = [1]) {}");
check_syntax_error("try {} catch({a} = {a:1}) {}");
check_syntax_error("try {} catch(a,) {}");
check_syntax_error("try {} catch(a) { function a() {} }");
check_syntax_error("try {} catch(a) { { function a() {} } function a() {} }");
check_syntax_error("try {} catch([a]) { var a }");
check_syntax_error("try {} catch([a]) { { var a } }");
check_syntax_error("try {} catch([a]) { function a() {} }");
try {
throw [1,2]