Fix too broad generic match for toHex (#8889)

Fixes #8865
This commit is contained in:
LemonBoy
2018-09-05 20:57:50 +02:00
committed by Andreas Rumpf
parent d34233b501
commit 36e6ca16d1

View File

@@ -820,7 +820,7 @@ proc toHex*(x: BiggestInt, len: Positive): string {.noSideEffect,
# handle negative overflow
if n == 0 and x < 0: n = -1
proc toHex*[T](x: T): string =
proc toHex*[T: SomeInteger](x: T): string =
## Shortcut for ``toHex(x, T.sizeOf * 2)``
toHex(BiggestInt(x), T.sizeOf * 2)