diff options
Diffstat (limited to 'compiler/seminst.nim')
-rwxr-xr-x | compiler/seminst.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/seminst.nim b/compiler/seminst.nim index 8e164531a..0a1a17f72 100755 --- a/compiler/seminst.nim +++ b/compiler/seminst.nim @@ -93,9 +93,7 @@ proc instantiateBody(c: PContext, n: PNode, result: PSym) = # add it here, so that recursive generic procs are possible: addDecl(c, result) pushProcCon(c, result) - if result.kind in {skProc, skMethod, skConverter, skMacro}: - addResult(c, result.typ.sons[0], n.info, result.kind) - addResultNode(c, n) + maybeAddResult(c, result, n) var b = n.sons[bodyPos] var symMap: TIdTable InitIdTable symMap @@ -168,6 +166,8 @@ proc generateInstance(c: PContext, fn: PSym, pt: TIdTable, result.typ = newTypeS(tyProc, c) rawAddSon(result.typ, nil) result.typ.callConv = fn.typ.callConv + if result.kind == skIterator: result.typ.flags.incl(tfIterator) + var oldPrc = GenericCacheGet(c, entry) if oldPrc == nil: c.generics.generics.add(entry) |