--gc:destructors: simple closures work

This commit is contained in:
Andreas Rumpf 2019-11-02 00:39:04 +01:00
commit 44a27ccfe1
4 changed files with 20 additions and 13 deletions

View file

@ -1193,8 +1193,6 @@ proc genDefault(p: BProc; n: PNode; d: var TLoc) =
if d.k == locNone: getTemp(p, n.typ, d, needsInit=true)
else: resetLoc(p, d)
proc trivialDestructor(s: PSym): bool {.inline.} = s.ast[bodyPos].len == 0
proc rawGenNew(p: BProc, a: TLoc, sizeExpr: Rope) =
var sizeExpr = sizeExpr
let typ = a.t