Iterator fixes (#11234)

This commit is contained in:
Jasper Jenkins 2019-05-13 11:50:21 -07:00 • committed by Andreas Rumpf
commit 6fc74cec55
8 changed files with 142 additions and 17 deletions

View file

@ -1813,6 +1813,9 @@ template detailedInfo*(sym: PSym): string =
proc isInlineIterator*(s: PSym): bool {.inline.} =
s.kind == skIterator and s.typ.callConv != ccClosure
proc isClosureIterator*(s: PSym): bool {.inline.} =
s.kind == skIterator and s.typ.callConv == ccClosure
proc isSinkParam*(s: PSym): bool {.inline.} =
s.kind == skParam and (s.typ.kind == tySink or tfHasOwned in s.typ.flags)