mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
closure iterators do have 'result'
This commit is contained in:
@@ -1006,7 +1006,8 @@ proc activate(c: PContext, n: PNode) =
|
||||
discard
|
||||
|
||||
proc maybeAddResult(c: PContext, s: PSym, n: PNode) =
|
||||
if s.typ.sons[0] != nil and s.kind != skIterator:
|
||||
if s.typ.sons[0] != nil and not
|
||||
(s.kind == skIterator and s.typ.callConv != ccClosure):
|
||||
addResult(c, s.typ.sons[0], n.info, s.kind)
|
||||
addResultNode(c, n)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user