nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
549aedf
)
niti: fix escaping flag when executing the finish of with
author
Jean Privat
<jean@pryen.org>
Thu, 24 Mar 2016 22:44:29 +0000
(18:44 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 24 Mar 2016 22:44:29 +0000
(18:44 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/interpreter/naive_interpreter.nit
patch
|
blob
|
history
diff --git
a/src/interpreter/naive_interpreter.nit
b/src/interpreter/naive_interpreter.nit
index
213680e
..
c596f16
100644
(file)
--- 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