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



                       




















                               

 
discard """
  file: "tfinally2.nim"
  output: "ABCD"
"""
# Test break in try statement:

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