Consider the following code:
let l=[[[]]]
lockvar! l
call add(l[0][0], l) " Results in E741: Value is locked
let l2=deepcopy(l)
call add(l2[0][0], l) " Succeeds
Here you can see that deepcopy has purged all locks, but I do not see this
behavior documented in :h deepcopy(), though it is somewhat mentioned in
:h :lockvar:
You may want to make a copy of a list to avoid this.
See |deepcopy()|.
Can I rely on this behavior? I want to implement something like an
AlreadyChecked function from the first (and the only) answer to this question:
http://stackoverflow.com/questions/3071476/checking-whether-some-object-has-
been-already-tested
signature.asc
Description: This is a digitally signed message part.
