summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-02-28 21:28:19 +0100
committerAraq <rumpf_a@web.de>2013-02-28 21:28:19 +0100
commitd13bcf657503a84f3568b86a7cfce4a28be03f7b (patch)
tree2c29bb8edfcb944449095e2c92a120663958ed93 /lib
parent8090b6c02704cd7e8942ac846c9e086874d88241 (diff)
downloadNim-d13bcf657503a84f3568b86a7cfce4a28be03f7b.tar.gz
better overloading resolution for generics
Diffstat (limited to 'lib')
-rwxr-xr-xlib/system.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 5f9a24ba9..db78d2740 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1532,7 +1532,7 @@ iterator fieldPairs*[S: tuple|object, T: tuple|object](x: S, y: T): tuple[
   ## The current implementation also has a bug that affects symbol binding
   ## in the loop body.
 
-proc `==`*[T: tuple](x, y: T): bool = 
+proc `==`*[T: tuple|object](x, y: T): bool = 
   ## generic ``==`` operator for tuples that is lifted from the components
   ## of `x` and `y`.
   for a, b in fields(x, y):
@@ -1557,7 +1557,7 @@ proc `<`*[T: tuple](x, y: T): bool =
     if c > 0: return false
   return false
 
-proc `$`*[T: tuple](x: T): string = 
+proc `$`*[T: tuple|object](x: T): string = 
   ## generic ``$`` operator for tuples that is lifted from the components
   ## of `x`. Example:
   ##