Problem: In :def function list created after const is locked.
Solution: Reset v_lock. (closes #11154)
unlet w:FLIST
enddef
+def Test_create_list_after_const()
+ const a = 1
+ g:ll = []
+ assert_equal(0, islocked('g:ll'))
+ unlet g:ll
+enddef
+
def Test_var_declaration_fails()
var lines =<< trim END
vim9script
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 499,
/**/
498,
/**/
tv = STACK_TV_BOT(-1);
tv->v_type = VAR_LIST;
tv->vval.v_list = list;
+ tv->v_lock = 0;
if (list != NULL)
++list->lv_refcount;
return OK;