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:
@@ -4466,7 +4466,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
|
||||
int var_conflict = FALSE;
|
||||
|
||||
v = find_var(name, &ht, TRUE);
|
||||
if (v != NULL)
|
||||
if (v != NULL && (in_vim9script() || v->di_tv.v_type == VAR_FUNC))
|
||||
var_conflict = TRUE;
|
||||
|
||||
if (SCRIPT_ID_VALID(current_sctx.sc_sid))
|
||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4164,
|
||||
/**/
|
||||
4163,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user