0
0
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:
Bram Moolenaar
2020-02-26 20:15:18 +01:00
parent ad39c094d2
commit b35efa5ed0
4 changed files with 27 additions and 12 deletions

View File

@@ -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