summary refs log tree commit diff stats
path: root/tests/run/tfinally.nim
blob: 273aac72b09df72cb8978bc1d88f1c26a41baa0a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
discard """
  file: "tfinally.nim"
  output: '''came
here
3'''
"""
# 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