From 6f0ddbf00dfc4c6eb70aa4abc415cad7aba46b6a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 20 Jan 2022 19:56:49 +0000 Subject: 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. --- src/userfunc.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/userfunc.c b/src/userfunc.c index 680017ca76..5de5dd00f2 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -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)) diff --git a/src/version.c b/src/version.c index 2dd019443a..f2ce6a42b7 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4164, /**/ 4163, /**/ -- cgit v1.2.3