fixes #2039
This commit is contained in:
parent
e9a197e704
commit
ee4e95fefe
4 changed files with 30 additions and 6 deletions
23
tests/typerel/tregionptrs2.nim
Normal file
23
tests/typerel/tregionptrs2.nim
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
# bug #2039
|
||||
|
||||
type
|
||||
RegionTy = object
|
||||
ThingyPtr = RegionTy ptr Thingy
|
||||
Thingy = object
|
||||
next: ThingyPtr
|
||||
name: string
|
||||
|
||||
proc iname(t: ThingyPtr) =
|
||||
var x = t
|
||||
|
||||
while not x.isNil:
|
||||
echo x.name
|
||||
x = x.next
|
||||
|
||||
proc go() =
|
||||
var athing : ThingyPtr
|
||||
|
||||
iname(athing)
|
||||
|
||||
go()
|
||||
Loading…
Add table
Add a link
Reference in a new issue