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))