summary refs log tree commit diff stats
path: root/compiler/transf.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-12-03 01:07:51 +0100
committerAraq <rumpf_a@web.de>2015-12-03 01:08:03 +0100
commit760242b870eb2c9054ef31489abbb230bb56eb72 (patch)
treef7f93549edd5ab3799270fe623eea1703edae694 /compiler/transf.nim
parent50e83d6433dd60a101c02016f3effcb34c04efd5 (diff)
downloadNim-760242b870eb2c9054ef31489abbb230bb56eb72.tar.gz
removes 'x is iterator' special casing in the language
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r--compiler/transf.nim6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim
index 3d78a6b92..3a5ff982e 100644
--- a/compiler/transf.nim
+++ b/compiler/transf.nim
@@ -478,9 +478,8 @@ proc transformFor(c: PTransf, n: PNode): PTransNode =
     result[1] = newNode(nkEmpty).PTransNode
     return result
   c.breakSyms.add(labl)
-  if call.typ.kind != tyIter and
-    (call.kind notin nkCallKinds or call.sons[0].kind != nkSym or
-      call.sons[0].sym.kind != skIterator):
+  if call.kind notin nkCallKinds or call.sons[0].kind != nkSym or
+      call.sons[0].sym.kind != skIterator:
     n.sons[length-1] = transformLoopBody(c, n.sons[length-1]).PNode
     result[1] = lambdalifting.liftForLoop(n).PTransNode
     discard c.breakSyms.pop
@@ -512,7 +511,6 @@ proc transformFor(c: PTransf, n: PNode): PTransNode =
   for i in countup(1, sonsLen(call) - 1):
     var arg = transform(c, call.sons[i]).PNode
     var formal = skipTypes(iter.typ, abstractInst).n.sons[i].sym
-    if arg.typ.kind == tyIter: continue
     case putArgInto(arg, formal.typ)
     of paDirectMapping:
       idNodeTablePut(newC.mapping, formal, arg)