fixes #4070
This commit is contained in:
parent
95ffeb6079
commit
299351a909
2 changed files with 21 additions and 0 deletions
20
tests/closure/tdeeplynested.nim
Normal file
20
tests/closure/tdeeplynested.nim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
discard """
|
||||
output: '''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)()
|
||||
Loading…
Add table
Add a link
Reference in a new issue