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.
diff --git a/src/userfunc.c b/src/userfunc.c
index 680017c..5de5dd0 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -4466,7 +4466,7 @@
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))
diff --git a/src/version.c b/src/version.c
index 2dd0194..f2ce6a4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4164,
+/**/
4163,
/**/
4162,