summary refs log blame commit diff stats
path: root/tests/lookups/tkoeniglookup.nim
blob: 8b140cceb5868dc1706dc7530ef2305a737f765c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11



                         
                                           





                 
                              
                                       



                
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)