Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Denneisk committed Dec 12, 2024
1 parent 65440ca commit efcbc0d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions data/expression2/tests/regressions/3080.txt
Original file line number Diff line number Diff line change
@@ -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")
}
}

0 comments on commit efcbc0d

Please sign in to comment.