diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-05 20:21:58 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-05 20:21:58 +0000 |
commit | 91c75d18d9cdc32df57e648640de7476fbcb4d76 (patch) | |
tree | 9fa0460b1c499a272b85c5613b5c546f2ff37c93 /src/eval.c | |
parent | 845bbb72ed2da4b5fb2a503d91cfd6435df2f584 (diff) |
patch 9.0.0836: wrong error when using extend() with funcrefv9.0.0836
Problem: Wrong error when using extend() with funcref.
Solution: Better check the variable type. (closes #11468, closes #11455)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index b815113e41..c57f6a4a05 100644 --- 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) |