summary refs log blame commit diff stats
path: root/tests/accept/compile/typalias.nim
blob: ba9f38ed90078eb712b2dee814387e12ce32bdb4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                              
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)