vim-patch:8.2.1395: Vim9: no error if declaring a funcref with lower case letter

Problem:    Vim9: no error if declaring a funcref with a lower case letter.
Solution:   Check the name after the type is inferred. Fix confusing name.

98b4f145eb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-10-28 11:39:51 +08:00
parent 685ff3ee72
commit bfdf10d870
3 changed files with 8 additions and 8 deletions

View File

@@ -1444,7 +1444,7 @@ char *get_lval(char *const name, typval_T *const rettv, lval_T *const lp, const
}
wrong = ((lp->ll_dict->dv_scope == VAR_DEF_SCOPE
&& tv_is_func(*rettv)
&& !var_check_func_name((const char *)key, lp->ll_di == NULL))
&& var_wrong_func_name((const char *)key, lp->ll_di == NULL))
|| !valid_varname((const char *)key));
if (len != -1) {
key[len] = prevval;