From 47daae6dae49bfd709f3621c8ce84baa4bb5a016 Mon Sep 17 00:00:00 2001 From: Charles Blake Date: Tue, 23 Apr 2024 06:40:08 -0400 Subject: [PATCH] *Without* `d=nimPreviewSlimSystem` (which I usually use), and without the `int` type conversion, recent nim compilers fail with ambiguity of `objectdollar.$(x: T: object)` and `dollars.$(x: uint64)`. --- adix/lghisto.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adix/lghisto.nim b/adix/lghisto.nim index 099947b..3ffbceb 100644 --- a/adix/lghisto.nim +++ b/adix/lghisto.nim @@ -116,7 +116,7 @@ proc `$`*[C](s: LgHisto[C], nonZero=true): string = result.add "bins,cnts:\n" var tot = 0; var n = 0 for (a, b, c) in s.bins: - tot += int(c) + let c = int(c); tot += c if nonZero: if c != 0: result.add " [ " & $a & " , " & $b & " ): " & $c & "\n"; inc n else : result.add " [ " & $a & " , " & $b & " ): " & $c & "\n"