Nim/tests/typalias.nim
Andreas Rumpf ddaedab835 version 0.7.2
2008-12-12 14:02:27 +01:00

15 lines
193 B
Nim

type
TMyObj = TYourObj
TYourObj = object of TObject
x, y: int
proc init: TYourObj =
result.x = 0
result.y = -1
proc f(x: var TYourObj) =
nil
var m: TMyObj = init()
f(m)