diff options
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r-- | compiler/transf.nim | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim index 8dcb74729..ce0157f22 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -97,10 +97,7 @@ proc newTemp(c: PTransf, typ: PType, info: TLineInfo): PNode = r.typ = typ #skipTypes(typ, {tyGenericInst, tyAlias, tySink}) incl(r.flags, sfFromGeneric) let owner = getCurrOwner(c) - if owner.isIterator and not c.tooEarly: - result = freshVarForClosureIter(c.graph, r, c.idgen, owner) - else: - result = newSymNode(r) + result = newSymNode(r) proc transform(c: PTransf, n: PNode): PNode @@ -176,13 +173,10 @@ proc transformSym(c: PTransf, n: PNode): PNode = proc freshVar(c: PTransf; v: PSym): PNode = let owner = getCurrOwner(c) - if owner.isIterator and not c.tooEarly: - result = freshVarForClosureIter(c.graph, v, c.idgen, owner) - else: - var newVar = copySym(v, c.idgen) - incl(newVar.flags, sfFromGeneric) - newVar.owner = owner - result = newSymNode(newVar) + var newVar = copySym(v, c.idgen) + incl(newVar.flags, sfFromGeneric) + newVar.owner = owner + result = newSymNode(newVar) proc transformVarSection(c: PTransf, v: PNode): PNode = result = newTransNode(v) |