diff src/evalvars.c @ 26504:7821550ba3a8 v8.2.3782

patch 8.2.3782: Vim9: no error if a function shadows a script variable Commit: https://github.com/vim/vim/commit/052ff291d72bc9c176f9562f021d7e8e030e74c0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 11 13:54:46 2021 +0000 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 https://github.com/vim/vim/issues/9310)
author Bram Moolenaar <Bram@vim.org>
date Sat, 11 Dec 2021 15:00:03 +0100
parents b115b552071f
children 13ba00ef7687
line wrap: on
line diff
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -2712,7 +2712,7 @@ eval_variable(
 		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);