summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-11-16 00:13:39 +0100
committerAraq <rumpf_a@web.de>2018-11-16 00:13:49 +0100
commit4bd9f32f335b43d1cdcfbbd99cbe91bb478a400c (patch)
treea629a0df2999c02a574b3c4e82ca988e6204f2b2 /lib
parent2eb14bdd41933d3b1b624e48d7513172be1a1e7a (diff)
downloadNim-4bd9f32f335b43d1cdcfbbd99cbe91bb478a400c.tar.gz
--gc:destructors: hello world example compiles and runs
Diffstat (limited to 'lib')
-rw-r--r--lib/core/seqs.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/core/seqs.nim b/lib/core/seqs.nim
index 84626c473..fb81a30de 100644
--- a/lib/core/seqs.nim
+++ b/lib/core/seqs.nim
@@ -125,7 +125,7 @@ proc grow*[T](x: var seq[T]; newLen: Natural; value: T) =
   if newLen <= oldLen: return
   var xu = cast[ptr NimSeqV2[T]](addr x)
 
-  xu.p = prepareSeqAdd(oldLen, xu.p, newLen - oldLen, sizeof(T))
+  xu.p = cast[typeof(xu.p)](prepareSeqAdd(oldLen, xu.p, newLen - oldLen, sizeof(T)))
   xu.len = newLen
   for i in oldLen .. newLen-1:
     x.data[i] = value