diff options
author | Araq <rumpf_a@web.de> | 2012-07-16 08:43:54 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-07-16 08:43:54 +0200 |
commit | 56b4e3ad91a0dda632ba6bab7139665a3da163d3 (patch) | |
tree | c45763ca7c383f4ae9f0900945d77268075e12bc /compiler/ccgtrav.nim | |
parent | 4215686cce1aaebd4021c856d504103f7e9a9586 (diff) | |
download | Nim-56b4e3ad91a0dda632ba6bab7139665a3da163d3.tar.gz |
closures shouldn't leak anymore
Diffstat (limited to 'compiler/ccgtrav.nim')
-rw-r--r-- | compiler/ccgtrav.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/ccgtrav.nim b/compiler/ccgtrav.nim index 75357ff46..1ff6346f6 100644 --- a/compiler/ccgtrav.nim +++ b/compiler/ccgtrav.nim @@ -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) = |