mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
closures shouldn't leak anymore
This commit is contained in:
@@ -80,8 +80,10 @@ proc genTraverseProc(c: var TTraversalClosure, accessor: PRope, typ: PType) =
|
||||
genTraverseProc(c, ropef("$1.Field$2", accessor, i.toRope), typ.sons[i])
|
||||
of tyRef, tyString, tySequence:
|
||||
lineCg(p, cpsStmts, c.visitorFrmt, accessor)
|
||||
else:
|
||||
# no marker procs for closures yet
|
||||
of tyProc:
|
||||
if typ.callConv == ccClosure:
|
||||
lineCg(p, cpsStmts, c.visitorFrmt, ropef("$1.ClEnv", accessor))
|
||||
else:
|
||||
nil
|
||||
|
||||
proc genTraverseProcSeq(c: var TTraversalClosure, accessor: PRope, typ: PType) =
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
discard """
|
||||
file: "tclosure3.nim"
|
||||
output: "success"
|
||||
disabled: true
|
||||
"""
|
||||
|
||||
proc main =
|
||||
|
||||
Reference in New Issue
Block a user