mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
fixes #3794
This commit is contained in:
@@ -57,6 +57,8 @@ proc parentObj(accessor: Rope; m: BModule): Rope {.inline.} =
|
||||
|
||||
proc genTraverseProc(c: var TTraversalClosure, accessor: Rope, typ: PType) =
|
||||
if typ == nil: return
|
||||
|
||||
let typ = getUniqueType(typ)
|
||||
var p = c.p
|
||||
case typ.kind
|
||||
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()
|
||||
Reference in New Issue
Block a user