added $ for refs and removed == for ref test
== in refs should use the pointer to compare
This commit is contained in:
parent
bf82f79f1e
commit
e366eeaafc
2 changed files with 14 additions and 8 deletions
|
|
@ -1557,6 +1557,8 @@ proc `<`*[T: tuple](x, y: T): bool =
|
|||
if c > 0: return false
|
||||
return false
|
||||
|
||||
proc `$`*[T: ref](x: T): string = $x[]
|
||||
|
||||
proc `$`*[T: tuple|object](x: T): string =
|
||||
## generic ``$`` operator for tuples that is lifted from the components
|
||||
## of `x`. Example:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue