summary refs log blame commit diff stats
path: root/tests/run/tfinally2.nim
blob: e1e8d4c7ee372816f98fe316beffe85550ec10c1 (plain) (tree)
1
2
3
4
5
6
7

                       
              

 
    
   








                              

                       

                


                     
          
             


                        

 
discard """
  file: "tfinally2.nim"
  output: '''A
B
C
D'''
"""
# Test break in try statement:

proc main: int = 
  try:
    block AB:
      try:
        try:
          break AB
        finally:
          echo("A")
        echo("skipped")
      finally: 
        block B:
          echo("B")
      echo("skipped")
    echo("C")
  finally:
    echo("D")
    
discard main() #OUT ABCD