summary refs log blame commit diff stats
path: root/tests/exception/tfinally.nim
blob: 16fb3e7da1a98546856c69ccd4d254f42d59f56c (plain) (tree)
1
2
3
4
5
6
7
8

                      
                         
   



                               


              
                  
              
           
                
            
 
                            
 
discard """
  file: "tfinally.nim"
  output: "came\nhere\n3"
"""
# Test return in try statement:

proc main: int = 
  try:
    try:
      return 1
    finally:
      echo("came")
      return 2
  finally: 
    echo("here")
    return 3

echo main() #OUT came here 3