Mercurial > vim
diff src/eval.c @ 31002:a09404dad917 v9.0.0836
patch 9.0.0836: wrong error when using extend() with funcref
Commit: https://github.com/vim/vim/commit/91c75d18d9cdc32df57e648640de7476fbcb4d76
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat Nov 5 20:21:58 2022 +0000
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 https://github.com/vim/vim/issues/11468, closes https://github.com/vim/vim/issues/11455)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Nov 2022 21:30:04 +0100 |
parents | 360f286b5869 |
children | a52697bcffa6 |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -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)