This commit is contained in:
Andreas Rumpf 2016-01-04 03:10:09 +01:00
commit 3d7c57db88
4 changed files with 34 additions and 3 deletions

View file

@ -114,6 +114,9 @@ proc transformSymAux(c: PTransf, n: PNode): PNode =
if n.sym.kind == skIterator and n.sym.typ.callConv == ccClosure:
if c.tooEarly: return n
else: return liftIterSym(n, getCurrOwner(c))
#elif n.sym.kind in {skVar, skLet} and n.sym.typ.callConv == ccClosure:
# echo n.info, " come heer for ", c.tooEarly
# if not c.tooEarly: return makeClosure(n.sym, nil, n.info)
var b: PNode
var tc = c.transCon
if sfBorrow in n.sym.flags and n.sym.kind in routineKinds: