fixes #3794
This commit is contained in:
parent
fb149d2eef
commit
eea2a63607
2 changed files with 14 additions and 0 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
12
tests/ccgbugs/tmissing_ccgtrav_unique_type.nim
Normal file
12
tests/ccgbugs/tmissing_ccgtrav_unique_type.nim
Normal 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()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue