diff options
author | Araq <rumpf_a@web.de> | 2018-11-16 00:13:39 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-11-16 00:13:49 +0100 |
commit | 4bd9f32f335b43d1cdcfbbd99cbe91bb478a400c (patch) | |
tree | a629a0df2999c02a574b3c4e82ca988e6204f2b2 /lib | |
parent | 2eb14bdd41933d3b1b624e48d7513172be1a1e7a (diff) | |
download | Nim-4bd9f32f335b43d1cdcfbbd99cbe91bb478a400c.tar.gz |
--gc:destructors: hello world example compiles and runs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/seqs.nim | 2 |
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 |