remove remnants of tyIter
This commit is contained in:
parent
8aecacc1df
commit
6f7b891bdc
11 changed files with 22 additions and 26 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue