From 760242b870eb2c9054ef31489abbb230bb56eb72 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 3 Dec 2015 01:07:51 +0100 Subject: removes 'x is iterator' special casing in the language --- compiler/semtypinst.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/semtypinst.nim') diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 7957ac50a..20b60a88d 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -77,7 +77,7 @@ proc cacheTypeInst*(inst: PType) = # update the refcount let gt = inst.sons[0] let t = if gt.kind == tyGenericBody: gt.lastSon else: gt - if t.kind in {tyStatic, tyGenericParam, tyIter} + tyTypeClasses: + if t.kind in {tyStatic, tyGenericParam} + tyTypeClasses: return gt.sym.typeInstCache.safeAdd(inst) @@ -390,7 +390,7 @@ proc replaceTypeVarsTAux(cl: var TReplTypeVars, t: PType): PType = result = t if t == nil: return - if t.kind in {tyStatic, tyGenericParam, tyIter} + tyTypeClasses: + if t.kind in {tyStatic, tyGenericParam} + tyTypeClasses: let lookup = PType(idTableGet(cl.typeMap, t)) if lookup != nil: return lookup -- cgit 1.4.1-2-gfad0