next steps for first class iterators

This commit is contained in:
Araq 2012-11-26 02:43:32 +01:00
commit dd9ad9e497
7 changed files with 16 additions and 7 deletions

View file

@ -293,6 +293,8 @@ proc procTypeRel(c: var TCandidate, f, a: PType): TTypeRelation =
elif tfThread in f.flags and a.flags * {tfThread, tfNoSideEffect} == {}:
# noSideEffect implies ``tfThread``! XXX really?
return isNone
elif f.flags * {tfIterator} != a.flags * {tfIterator}:
return isNone
elif f.callconv != a.callconv:
# valid to pass a 'nimcall' thingie to 'closure':
if f.callconv == ccClosure and a.callconv == ccDefault: