0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4164: error in legacy code for function shadowing variable

Problem:    Error in legacy code for function shadowing variable.
Solution:   Only give the error in Vim9 script.
This commit is contained in:
Bram Moolenaar
2022-01-20 19:56:49 +00:00
parent 2017d6f3b1
commit 6f0ddbf00d
2 changed files with 3 additions and 1 deletions

View File

@@ -4466,7 +4466,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
int var_conflict = FALSE; int var_conflict = FALSE;
v = find_var(name, &ht, TRUE); v = find_var(name, &ht, TRUE);
if (v != NULL) if (v != NULL && (in_vim9script() || v->di_tv.v_type == VAR_FUNC))
var_conflict = TRUE; var_conflict = TRUE;
if (SCRIPT_ID_VALID(current_sctx.sc_sid)) if (SCRIPT_ID_VALID(current_sctx.sc_sid))

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
4164,
/**/ /**/
4163, 4163,
/**/ /**/