From 7dc26bb7146e7f24264bd4646a9f9a568e30276d Mon Sep 17 00:00:00 2001 From: andri lim Date: Tue, 22 Oct 2019 16:38:23 +0700 Subject: [PATCH] signed integer 'fromHex' --- stint/io.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stint/io.nim b/stint/io.nim index d29b0f3..9838b39 100644 --- a/stint/io.nim +++ b/stint/io.nim @@ -183,7 +183,7 @@ func parse*[bits: static[int]](input: string, T: typedesc[Stint[bits]], radix: s else: result = convert[T](no_overflow) -func fromHex*(T: type StUint, s: string): T {.inline.} = +func fromHex*(T: typedesc[StUint|Stint], s: string): T {.inline.} = ## Convert an hex string to the corresponding unsigned integer parse(s, type result, radix = 16)