4741e8f9a ^
30823c1ce ^
e80465dac ^
94f425681 ^
1 2 3 4
5
6 7 8 9 10 11
12
13
14 15 16 17
discard """ output: '''x: 0 y: 0''' """ proc toString*[T](x: T): string = return $x type TMyObj = object x, y: int proc `$`*(a: TMyObj): string = result = "x: " & $a.x & " y: " & $a.y var a: TMyObj echo toString(a)