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



              
                        

                
                      



                                   
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)())