Skip to content

Commit

Permalink
*Without* d=nimPreviewSlimSystem (which I usually use), and without
Browse files Browse the repository at this point in the history
the `int` type conversion, recent nim compilers fail with ambiguity of
`objectdollar.$(x: T: object)` and `dollars.$(x: uint64)`.
  • Loading branch information
c-blake committed Apr 23, 2024
1 parent c30ff2d commit 47daae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adix/lghisto.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 47daae6

Please sign in to comment.