1
0
forked from aniani/vim

patch 8.2.4580: Vim9: incorrect error for shadowing variable

Problem:    Vim9: incorrect error for shadowing variable.
Solution:   Do not pass the context when compiling a referenced function.
This commit is contained in:
Bram Moolenaar
2022-03-16 17:54:17 +00:00
parent 5cffa8df7e
commit 21dc8f1527
3 changed files with 21 additions and 1 deletions

View File

@@ -364,7 +364,7 @@ generate_funcref(cctx_T *cctx, char_u *name, int has_g_prefix)
// Need to compile any default values to get the argument types.
compile_type = get_compile_type(ufunc);
if (func_needs_compiling(ufunc, compile_type)
&& compile_def_function(ufunc, TRUE, compile_type, cctx) == FAIL)
&& compile_def_function(ufunc, TRUE, compile_type, NULL) == FAIL)
return FAIL;
return generate_PUSHFUNC(cctx, ufunc->uf_name, ufunc->uf_func_type);
}