summary refs log tree commit diff stats
path: root/tests/proc/tnestprc.nim
blob: 9b3c33d5e30b9afadc514fa4c9bab582d64c5999 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  file: "tnestprc.nim"
  output: "10"
"""
# Test nested procs without closures

proc Add3(x: int): int =
  proc add(x, y: int): int {.noconv.} =
    result = x + y

  result = add(x, 3)

echo Add3(7) #OUT 10