From: Jean Privat Date: Thu, 24 Mar 2016 22:44:29 +0000 (-0400) Subject: niti: fix escaping flag when executing the finish of with X-Git-Url: http://nitlanguage.org niti: fix escaping flag when executing the finish of with Signed-off-by: Jean Privat --- diff --git a/src/interpreter/naive_interpreter.nit b/src/interpreter/naive_interpreter.nit index 213680e..c596f16 100644 --- a/src/interpreter/naive_interpreter.nit +++ b/src/interpreter/naive_interpreter.nit @@ -1838,7 +1838,13 @@ redef class AWithExpr v.callsite(method_start, [expr]) v.stmt(self.n_block) v.is_escape(self.break_mark) # Clear the break + + # Execute the finally without an escape + var old_mark = v.escapemark + v.escapemark = null v.callsite(method_finish, [expr]) + # Restore the escape unless another escape was provided + if v.escapemark == null then v.escapemark = old_mark end end