mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-15 23:54:19 +00:00
fixes #2039
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user