summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-04-04 09:34:16 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-04-04 09:34:16 +0200
commit9aeccda2629ae0828fbcd4fd8aa50b3abc7e95b3 (patch)
tree90e11c9e68eb8f732c3cec355eda14da6d7f7db3
parent08f5087d2c4f96ca6b82c1feed2f25c4e1f9f9b6 (diff)
downloadNim-9aeccda2629ae0828fbcd4fd8aa50b3abc7e95b3.tar.gz
system.nim: make min/max take openArrays, not varargs (breaking change)
-rw-r--r--lib/system.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim
index f6133b741..3d5e5f972 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1986,7 +1986,7 @@ proc min*(x, y: int64): int64 {.magic: "MinI", noSideEffect.} =
   ## The minimum value of two integers.
   if x <= y: x else: y
 
-proc min*[T](x: varargs[T]): T =
+proc min*[T](x: openArray[T]): T =
   ## The minimum value of `x`. ``T`` needs to have a ``<`` operator.
   result = x[0]
   for i in 1..high(x):
@@ -2004,7 +2004,7 @@ proc max*(x, y: int64): int64 {.magic: "MaxI", noSideEffect.} =
   ## The maximum value of two integers.
   if y <= x: x else: y
 
-proc max*[T](x: varargs[T]): T =
+proc max*[T](x: openArray[T]): T =
   ## The maximum value of `x`. ``T`` needs to have a ``<`` operator.
   result = x[0]
   for i in 1..high(x):
#n142'>142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177