mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.0322: Vim9: error checks not tested
Problem: Vim9: error checks not tested. Solution: Add more test cases. Avoid error for function loaded later.
This commit is contained in:
@@ -2541,8 +2541,10 @@ find_var_ht(char_u *name, char_u **varname)
|
||||
return &curtab->tp_vars->dv_hashtab;
|
||||
if (*name == 'v') // v: variable
|
||||
return &vimvarht;
|
||||
if (current_sctx.sc_version != SCRIPT_VERSION_VIM9)
|
||||
if (get_current_funccal() != NULL
|
||||
&& get_current_funccal()->func->uf_dfunc_idx < 0)
|
||||
{
|
||||
// a: and l: are only used in functions defined with ":function"
|
||||
if (*name == 'a') // a: function argument
|
||||
return get_funccal_args_ht();
|
||||
if (*name == 'l') // l: local function variable
|
||||
|
Reference in New Issue
Block a user