summary refs log tree commit diff stats
path: root/tests/closure/tnestedproc.nim
blob: 7eeeff1988c60d93780c04ebec84dff5260eef8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
discard """
  output: "11"
"""

proc p(x, y: int): int =
  result = x + y

echo p((proc (): int =
          var x = 7
          return x)(),
       (proc (): int = return 4)())