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

@@ -2436,7 +2436,7 @@ void tv_dict_extend(dict_T *const d1, dict_T *const d2, const char *const action
// Check the key to be valid when adding to any scope.
if (d1->dv_scope == VAR_DEF_SCOPE
&& tv_is_func(di2->di_tv)
&& !var_check_func_name((const char *)di2->di_key, di1 == NULL)) {
&& var_wrong_func_name((const char *)di2->di_key, di1 == NULL)) {
break;
}
if (!valid_varname((const char *)di2->di_key)) {