From e6c5622aa74c1014b022071d9d525a0e13805246 Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 14 Nov 2016 23:18:30 +0100 Subject: removed tyArrayConstr completely from the compiler; introduced tyAlias instead in preparation for further bugfixes --- compiler/transf.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/transf.nim') diff --git a/compiler/transf.nim b/compiler/transf.nim index 5cd5e298b..4b6bff197 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 = typ #skipTypes(typ, {tyGenericInst}) + r.typ = typ #skipTypes(typ, {tyGenericInst, tyAlias}) incl(r.flags, sfFromGeneric) let owner = getCurrOwner(c) if owner.isIterator and not c.tooEarly: @@ -326,7 +326,7 @@ proc transformYield(c: PTransf, n: PNode): PTransNode = # c.transCon.forStmt.len == 3 means that there is one for loop variable # and thus no tuple unpacking: if e.typ.isNil: return result # can happen in nimsuggest for unknown reasons - if skipTypes(e.typ, {tyGenericInst}).kind == tyTuple and + if skipTypes(e.typ, {tyGenericInst, tyAlias}).kind == tyTuple and c.transCon.forStmt.len != 3: e = skipConv(e) if e.kind == nkPar: -- cgit 1.4.1-2-gfad0