From 685b8963dafeb57362b85125bd28755f598c744c Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 11 May 2016 21:16:26 +0200 Subject: [PATCH] fixes #4110 --- compiler/cgen.nim | 3 ++- compiler/transf.nim | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index cd3117d4b0..0a8f89f2e0 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -331,7 +331,8 @@ proc getTemp(p: BProc, t: PType, result: var TLoc; needsInit=false) = linefmt(p, cpsLocals, "$1 $2;$n", getTypeDesc(p.module, t), result.r) result.k = locTemp #result.a = - 1 - result.t = getUniqueType(t) + result.t = t + #result.t = getUniqueType(t) result.s = OnStack result.flags = {} constructLoc(p, result, not needsInit) diff --git a/compiler/transf.nim b/compiler/transf.nim index 0647553c66..25988fb8c5 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -95,7 +95,7 @@ proc getCurrOwner(c: PTransf): PSym = proc newTemp(c: PTransf, typ: PType, info: TLineInfo): PNode = let r = newSym(skTemp, getIdent(genPrefix), getCurrOwner(c), info) - r.typ = skipTypes(typ, {tyGenericInst}) + r.typ = typ #skipTypes(typ, {tyGenericInst}) incl(r.flags, sfFromGeneric) let owner = getCurrOwner(c) if owner.isIterator and not c.tooEarly: