From 36e6ca16d1ece106d88fbb951b544b80c360d600 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Wed, 5 Sep 2018 20:57:50 +0200 Subject: [PATCH] Fix too broad generic match for toHex (#8889) Fixes #8865 --- lib/pure/strutils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 7730aa7a2e..396f149728 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -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)