Koenig's lookup implementation
This commit is contained in:
parent
4741e8f9a1
commit
94f4256811
5 changed files with 137 additions and 131 deletions
|
|
@ -9,8 +9,8 @@ type
|
|||
TMyObj = object
|
||||
x, y: int
|
||||
|
||||
proc `$`*(a: TMyObj): bool =
|
||||
result = "x: " & a.x & " y: " & a.y
|
||||
proc `$`*(a: TMyObj): string =
|
||||
result = "x: " & $a.x & " y: " & $a.y
|
||||
|
||||
var a: TMyObj
|
||||
echo toString(a)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue