From 2162a71c9314ed8bba7a8b9926e2d9637f7c6825 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 30 Dec 2015 13:32:18 +0100 Subject: closure iterators do have 'result' --- compiler/semstmts.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/semstmts.nim') 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) -- cgit 1.4.1-2-gfad0