diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-26 20:15:18 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-26 20:15:18 +0100 |
commit | b35efa5ed040162f5c988c71dfc1159045e47585 (patch) | |
tree | df4c2a1b3c97337afd1351672c27c0759c3d5bbb /src/evalvars.c | |
parent | ad39c094d261109a695aba2c4f19fe336736cc55 (diff) |
patch 8.2.0322: Vim9: error checks not testedv8.2.0322
Problem: Vim9: error checks not tested.
Solution: Add more test cases. Avoid error for function loaded later.
Diffstat (limited to 'src/evalvars.c')
-rw-r--r-- | src/evalvars.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c index 894ee287da..227253e1f9 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -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 |