tregionptrs2.nim 312 B

123456789101112131415161718192021222324
  1. # bug #2039
  2. type
  3. RegionTy = object
  4. ThingyPtr = RegionTy ptr Thingy
  5. Thingy = object
  6. next: ThingyPtr
  7. name: string
  8. proc iname(t: ThingyPtr) =
  9. var x = t
  10. while not x.isNil:
  11. echo x.name
  12. x = x.next
  13. proc go() =
  14. var athing : ThingyPtr
  15. iname(athing)
  16. go()