From efcbc0decc3063dcd6c09cd94aa7386baac0d5a5 Mon Sep 17 00:00:00 2001 From: Denneisk <20892685+Denneisk@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:02:50 -0500 Subject: [PATCH] Add test --- data/expression2/tests/regressions/3080.txt | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 data/expression2/tests/regressions/3080.txt diff --git a/data/expression2/tests/regressions/3080.txt b/data/expression2/tests/regressions/3080.txt new file mode 100644 index 0000000000..e53317eff2 --- /dev/null +++ b/data/expression2/tests/regressions/3080.txt @@ -0,0 +1,40 @@ +## SHOULD_PASS:EXECUTE +@strict + +try { + error("A") +} catch(A:string) { + assert(A == "A") +} + +try { + if(1) { + error("B") + } +} catch(B:string) { + assert(B == "B") +} + +if(1) { + try { + error("C") + } catch(C:string) { + assert(C == "C") + } + + try { + if(1) { + error("D") + } + } catch(D:string) { + assert(D == "D") + } + + let Fn = function() { error("F") } + + try { + Fn() + } catch(F:string) { + assert(F == "F") + } +}