mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
21 lines
330 B
Nim
21 lines
330 B
Nim
discard """
|
|
output: '''int: 108'''
|
|
"""
|
|
|
|
# bug #4070
|
|
|
|
proc id(f: (proc())): auto =
|
|
return f
|
|
|
|
proc foo(myinteger: int): (iterator(): int) =
|
|
return iterator(): int {.closure.} =
|
|
proc bar() =
|
|
proc kk() =
|
|
echo "int: ", myinteger
|
|
|
|
kk()
|
|
|
|
id(bar)()
|
|
|
|
discard foo(108)()
|