patch 8.2.3782: Vim9: no error if a function shadows a script variable
Problem: Vim9: no error if a function shadows a script variable.
Solution: Check the function doesn't shadow a variable. (closes #9310)
diff --git a/src/evalvars.c b/src/evalvars.c
index d91ec01..0410259 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -2712,7 +2712,7 @@
type = sv->sv_type;
}
}
- else if (in_vim9script())
+ else if (in_vim9script() && (flags & EVAL_VAR_NO_FUNC) == 0)
{
ufunc_T *ufunc = find_func(name, FALSE, NULL);