mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.4313: Vim9: cannot change type of list after making a slice
Problem: Vim9: cannot change type of list after making a slice. Solution: Adjust the declared member type. (closes #9696)
This commit is contained in:
@@ -182,6 +182,9 @@ compile_member(int is_slice, int *keeping_dict, cctx_T *cctx)
|
||||
vartype == VAR_LIST ? ISN_LISTSLICE : ISN_ANYSLICE,
|
||||
2) == FAIL)
|
||||
return FAIL;
|
||||
// a copy is made so the member type is no longer declared
|
||||
if (typep->type_decl->tt_type == VAR_LIST)
|
||||
typep->type_decl = &t_list_any;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user