summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semstmts.nim')
-rwxr-xr-xcompiler/semstmts.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 37ffe2889..d68d0da1a 100755
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -792,7 +792,8 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
     if n.sons[genericParamsPos].kind == nkEmpty: 
       ParamsTypeCheck(c, s.typ)
       pushProcCon(c, s)
-      if s.typ.sons[0] != nil and kind != skIterator: 
+      if s.typ.sons[0] != nil and
+          (kind != skIterator or s.typ.callConv == ccClosure):
         addResult(c, s.typ.sons[0], n.info, kind)
         addResultNode(c, n)
       if sfImportc notin s.flags: