summary refs log tree commit diff stats
path: root/compiler/sigmatch.nim
diff options
context:
space:
mode:
authorJacek Sieka <arnetheduck@gmail.com>2016-10-24 21:10:48 +0800
committerJacek Sieka <arnetheduck@gmail.com>2016-10-24 21:10:48 +0800
commit6f7b891bdc27a92e13acb0a648cafdf7431708fe (patch)
tree3330726ed26d543d3ceac26a18586cfc569b51b3 /compiler/sigmatch.nim
parent8aecacc1dfd10cfbaf30964e2eb78dd672623d31 (diff)
downloadNim-6f7b891bdc27a92e13acb0a648cafdf7431708fe.tar.gz
remove remnants of tyIter
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r--compiler/sigmatch.nim14
1 files changed, 3 insertions, 11 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 44807dae2..15171874f 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -549,8 +549,6 @@ proc procTypeRel(c: var TCandidate, f, a: PType): TTypeRelation =
 
   of tyNil:
     result = f.allowsNil
-  of tyIter:
-    if tfIterator in f.flags: result = typeRel(c, f.base, a.base)
   else: discard
 
 proc typeRangeRel(f, a: PType): TTypeRelation {.noinline.} =
@@ -1223,13 +1221,6 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
       else:
         result = isNone
 
-  of tyIter:
-    if a.kind == tyIter or
-      (a.kind == tyProc and tfIterator in a.flags):
-      result = typeRel(c, f.base, a.base)
-    else:
-      result = isNone
-
   of tyStmt:
     if aOrig != nil and tfOldSchoolExprStmt notin f.flags:
       put(c, f, aOrig)
@@ -1587,8 +1578,9 @@ proc prepareOperand(c: PContext; formal: PType; a: PNode): PNode =
   elif a.typ.isNil:
     # XXX This is unsound! 'formal' can differ from overloaded routine to
     # overloaded routine!
-    let flags = if formal.kind == tyIter: {efDetermineType, efWantIterator}
-                else: {efDetermineType, efAllowStmt}
+    let flags = {efDetermineType, efAllowStmt}
+                #if formal.kind == tyIter: {efDetermineType, efWantIterator}
+                #else: {efDetermineType, efAllowStmt}
                 #elif formal.kind == tyStmt: {efDetermineType, efWantStmt}
                 #else: {efDetermineType}
     result = c.semOperand(c, a, flags)