summary refs log tree commit diff stats
path: root/tests/accept/run/tfinally2.nim
blob: 10d08e816b65b49f626a47ff3447060dec26cb40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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