summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-07-16 09:08:15 +0200
committerGitHub <noreply@github.com>2019-07-16 09:08:15 +0200
commit102b71f42e699afa1c319bd56cb44fbb22507cc0 (patch)
treee31ace89d5f2f598943b199cbbf711c4e9cc8276 /lib/pure
parent8550a8127c6c80754d8a6f4300e4c77ee126e6ec (diff)
parent76f9ddb6ab461ba18811c8b257d286602bca0475 (diff)
downloadNim-102b71f42e699afa1c319bd56cb44fbb22507cc0.tar.gz
Merge pull request #11740 from nim-lang/araq-fixes-11723
fixes #11723
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/strformat.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/strformat.nim b/lib/pure/strformat.nim
index d3026165a..ba75ce95f 100644
--- a/lib/pure/strformat.nim
+++ b/lib/pure/strformat.nim
@@ -415,7 +415,7 @@ proc parseStandardFormatSpecifier*(s: string; start = 0;
     raise newException(ValueError,
       "invalid format string, cannot parse: " & s[i..^1])
 
-proc formatValue*(result: var string; value: SomeInteger; specifier: string) =
+proc formatValue*[T: SomeInteger](result: var string; value: T; specifier: string) =
   ## Standard format implementation for ``SomeInteger``. It makes little
   ## sense to call this directly, but it is required to exist
   ## by the ``&`` macro.
@@ -509,7 +509,7 @@ proc formatValue*(result: var string; value: string; specifier: string) =
       setLen(value, runeOffset(value, spec.precision))
   result.add alignString(value, spec.minimumWidth, spec.align, spec.fill)
 
-proc formatValue[T](result: var string; value: T; specifier: string) =
+proc formatValue[T: not SomeInteger](result: var string; value: T; specifier: string) =
   mixin `$`
   formatValue(result, $value, specifier)