summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-07-15 17:22:01 +0200
committerAraq <rumpf_a@web.de>2019-07-15 17:22:01 +0200
commit76f9ddb6ab461ba18811c8b257d286602bca0475 (patch)
tree0acb566bf893fe8a291acd812d8b5326e80c791f /lib
parentdd7dd1b6dc775ab106fec3c4224f89d41a5ad176 (diff)
downloadNim-76f9ddb6ab461ba18811c8b257d286602bca0475.tar.gz
fixes #11723
Diffstat (limited to 'lib')
-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)
 
<tamasflaviu@gmail.com> 2015-01-09 19:40:41 -0500 committer Flaviu Tamas <tamasflaviu@gmail.com> 2015-01-09 19:40:41 -0500 Implement regex initialization' href='/ahoang/Nim/commit/src/nre.nim?h=devel&id=dec2f9efa9dd88d4bce0d42fa25dd758b90fa1a1'>dec2f9efa ^
00b047a66 ^






























ca4cf2429 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142