diff options
author | Simon Hafner <hafnersimon@gmail.com> | 2013-02-21 16:31:35 -0600 |
---|---|---|
committer | Simon Hafner <hafnersimon@gmail.com> | 2013-02-21 16:31:35 -0600 |
commit | e366eeaafc0b834cd57d0aa4bc16925271c4a79f (patch) | |
tree | 901ca0d33bb9a08d0a4f0b920a054a2761622693 /lib | |
parent | bf82f79f1e27b4580672af457a95f3d85ea781a4 (diff) | |
download | Nim-e366eeaafc0b834cd57d0aa4bc16925271c4a79f.tar.gz |
added $ for refs and removed == for ref test
== in refs should use the pointer to compare
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/system.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim index db78d2740..3f15dbeaf 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -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: |