bugfix: finally sections are executed before return/break
This commit is contained in:
parent
f182d8d708
commit
0a57f662fa
7 changed files with 71 additions and 49 deletions
|
|
@ -2,9 +2,14 @@
|
|||
|
||||
proc main: int =
|
||||
try:
|
||||
return 1
|
||||
try:
|
||||
return 1
|
||||
finally:
|
||||
stdout.write("came ")
|
||||
return 2
|
||||
finally:
|
||||
echo "came here"
|
||||
stdout.write("here ")
|
||||
return 3
|
||||
|
||||
discard main() #OUT came here
|
||||
echo main() #OUT came here 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue