summary refs log tree commit diff stats
path: root/tests/proc/tnestprc.nim
blob: c10ad6abf52ed6768f0da302e47d8b497b1488e9 (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