0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.0836: wrong error when using extend() with funcref

Problem:    Wrong error when using extend() with funcref.
Solution:   Better check the variable type. (closes #11468, closes #11455)
This commit is contained in:
zeertzjq
2022-11-05 20:21:58 +00:00
committed by Bram Moolenaar
parent 845bbb72ed
commit 91c75d18d9
5 changed files with 29 additions and 13 deletions

View File

@@ -1376,7 +1376,8 @@ get_lval(
else
prevval = 0; // avoid compiler warning
wrong = (lp->ll_dict->dv_scope == VAR_DEF_SCOPE
&& rettv->v_type == VAR_FUNC
&& (rettv->v_type == VAR_FUNC
|| rettv->v_type == VAR_PARTIAL)
&& var_wrong_func_name(key, lp->ll_di == NULL))
|| !valid_varname(key, -1, TRUE);
if (len != -1)