diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-12-30 13:32:18 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-12-30 13:32:18 +0100 |
commit | 2162a71c9314ed8bba7a8b9926e2d9637f7c6825 (patch) | |
tree | 8ed5e417327d044b9fc3fb35cbb7503bbd2f7bb9 /compiler/semstmts.nim | |
parent | 9cc066d99ddbeffb3e6fdacbe8f9159131bb942c (diff) | |
download | Nim-2162a71c9314ed8bba7a8b9926e2d9637f7c6825.tar.gz |
closure iterators do have 'result'
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index f54f523ad..0e167c1f1 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -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) |