Skip to content

Commit

Permalink
bug fix: imagine a break happens before setting caught! It means, `…
Browse files Browse the repository at this point in the history
…caught` must be set as a first statement
  • Loading branch information
dours committed Aug 25, 2022
1 parent 43bbc2b commit 44099c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ object StatementPasses {
(x._1.toList.flatMap(x => x._2.toList.map (
name => (Assign(List(Ident(name, ann.pos), Ident("current-exception", ann.pos)), ann.pos))
))) ++
List(body, Assign(List(Ident("caught", ann.pos), BoolLiteral(true, ann.pos)), ann.pos)),
List(Assign(List(Ident("caught", ann.pos), BoolLiteral(true, ann.pos)), ann.pos), body),
ann.pos
)
)
Expand Down

0 comments on commit 44099c2

Please sign in to comment.