Here's a legacy script that has a function that locks it's argument which is a dictionary in this example. Since this is probably the most complex legacy script I've written, I want to make sure it's expected/good behavior. (the proceeding after an error is spooky, but convenient...)

Asking because vim9script doesn't handle it.

-ernie

   func Lock(x)
        lockvar a:x
   endfunc

   let val = {'a': 99}

   call Lock(val)

   call extend(val, {'b': 100})
   echo val
   let val = {'c': 101}
   echo val

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/2e6291ac-7f83-8853-d014-fb2d22d8a30e%40raelity.com.

Raspunde prin e-mail lui