Files
Nim/tests/proc/tnestprc.nim
Adam Strzelecki e80465dacf tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00

17 lines
223 B
Nim

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