From bf82f79f1e27b4580672af457a95f3d85ea781a4 Mon Sep 17 00:00:00 2001 From: Simon Hafner Date: Thu, 21 Feb 2013 15:11:48 -0600 Subject: added tests, actually implemented $ and == --- lib/system.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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: ## -- cgit 1.4.1-2-gfad0