added $ for refs and removed == for ref test

== in refs should use the pointer to compare
This commit is contained in:
Simon Hafner
2013-02-21 16:31:35 -06:00
parent bf82f79f1e
commit e366eeaafc
2 changed files with 14 additions and 8 deletions

View File

@@ -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: