mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-28 03:16:32 +00:00
added $ for refs and removed == for ref test
== in refs should use the pointer to compare
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user