diff --git a/lib/system/seqs_v2.nim b/lib/system/seqs_v2.nim index 9aa4e71b98..efc2919fd4 100644 --- a/lib/system/seqs_v2.nim +++ b/lib/system/seqs_v2.nim @@ -102,7 +102,7 @@ proc grow*[T](x: var seq[T]; newLen: Natural; value: T) = for i in oldLen .. newLen-1: xu.p.data[i] = value -proc add*[T](x: var seq[T]; value: sink T) {.magic: "AppendSeqElem", noSideEffect, nodestroy.} = +proc add*[T](x: var seq[T]; y: sink T) {.magic: "AppendSeqElem", noSideEffect, nodestroy.} = ## Generic proc for adding a data item `y` to a container `x`. ## ## For containers that have an order, `add` means *append*. New generic @@ -119,7 +119,7 @@ proc add*[T](x: var seq[T]; value: sink T) {.magic: "AppendSeqElem", noSideEffec # copyMem(). This is fine as know by construction that # in `xu.p.data[oldLen]` there is nothing to destroy. # We also save the `wasMoved + destroy` pair for the sink parameter. - xu.p.data[oldLen] = value + xu.p.data[oldLen] = y proc setLen[T](s: var seq[T], newlen: Natural) = {.noSideEffect.}: