mirror of
https://github.com/neovim/neovim.git
synced 2025-12-02 06:53:05 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user