bugfix: finally sections are executed before return/break
This commit is contained in:
parent
0a57f662fa
commit
ea2306b301
6 changed files with 64 additions and 2 deletions
12
tests/accept/run/tfinally3.nim
Normal file
12
tests/accept/run/tfinally3.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Test break in try statement:
|
||||
|
||||
proc main: bool =
|
||||
while true:
|
||||
try:
|
||||
return true
|
||||
finally:
|
||||
break
|
||||
return false
|
||||
|
||||
echo main() #OUT false
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue