mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 15:31:28 +00:00
Add testcase for #5688
This commit is contained in:
@@ -33,6 +33,7 @@ py
|
||||
py
|
||||
px
|
||||
6
|
||||
proc (){.closure, gcsafe, locks: 0.}
|
||||
'''
|
||||
"""
|
||||
|
||||
@@ -177,3 +178,19 @@ block tclosure2:
|
||||
|
||||
|
||||
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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user