Add testcase for #5688
This commit is contained in:
parent
38068f9778
commit
78b2012a92
1 changed files with 17 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ py
|
||||||
py
|
py
|
||||||
px
|
px
|
||||||
6
|
6
|
||||||
|
proc (){.closure, gcsafe, locks: 0.}
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -177,3 +178,19 @@ block tclosure2:
|
||||||
|
|
||||||
|
|
||||||
outer2()
|
outer2()
|
||||||
|
|
||||||
|
# bug #5688
|
||||||
|
|
||||||
|
import typetraits
|
||||||
|
|
||||||
|
proc myDiscard[T](a: T) = discard
|
||||||
|
|
||||||
|
proc foo() =
|
||||||
|
let a = 5
|
||||||
|
let f = (proc() =
|
||||||
|
myDiscard (proc() = echo a)
|
||||||
|
)
|
||||||
|
echo name(type(f))
|
||||||
|
|
||||||
|
foo()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue