destructors.rst: added a missing 'var' to the motivating example
This commit is contained in:
parent
e58c2d261c
commit
44b1ecc287
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ written as:
|
||||||
assert i < x.len
|
assert i < x.len
|
||||||
x.data[i]
|
x.data[i]
|
||||||
|
|
||||||
proc `[]=`*[T](x: myseq[T]; i: Natural; y: sink T) =
|
proc `[]=`*[T](x: var myseq[T]; i: Natural; y: sink T) =
|
||||||
assert i < x.len
|
assert i < x.len
|
||||||
x.data[i] = y
|
x.data[i] = y
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue