This commit is contained in:
Andreas Rumpf 2016-01-30 15:45:45 +01:00
commit eea2a63607
2 changed files with 14 additions and 0 deletions

View file

@ -57,6 +57,8 @@ proc parentObj(accessor: Rope; m: BModule): Rope {.inline.} =
proc genTraverseProc(c: var TTraversalClosure, accessor: Rope, typ: PType) = proc genTraverseProc(c: var TTraversalClosure, accessor: Rope, typ: PType) =
if typ == nil: return if typ == nil: return
let typ = getUniqueType(typ)
var p = c.p var p = c.p
case typ.kind case typ.kind
of tyGenericInst, tyGenericBody, tyTypeDesc: of tyGenericInst, tyGenericBody, tyTypeDesc:

View file

@ -0,0 +1,12 @@
# bug #3794
import options
proc getRef*(): Option[int] =
return none(int)
proc getChild*() =
let iter = iterator (): int {.closure.} =
let reference = getRef()