tdeeplynested.nim 330 B

123456789101112131415161718192021
  1. discard """
  2. output: '''int: 108'''
  3. """
  4. # bug #4070
  5. proc id(f: (proc())): auto =
  6. return f
  7. proc foo(myinteger: int): (iterator(): int) =
  8. return iterator(): int {.closure.} =
  9. proc bar() =
  10. proc kk() =
  11. echo "int: ", myinteger
  12. kk()
  13. id(bar)()
  14. discard foo(108)()