mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
destructors.rst: added a missing 'var' to the motivating example
This commit is contained in:
@@ -68,7 +68,7 @@ written as:
|
||||
assert i < x.len
|
||||
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
|
||||
x.data[i] = y
|
||||
|
||||
|
||||
Reference in New Issue
Block a user