patch 8.2.4580: Vim9: incorrect error for shadowing variable
Problem: Vim9: incorrect error for shadowing variable.
Solution: Do not pass the context when compiling a referenced function.
diff --git a/src/vim9expr.c b/src/vim9expr.c
index 8276a77..3a329cc 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -364,7 +364,7 @@
// Need to compile any default values to get the argument types.
compile_type = get_compile_type(ufunc);
if (func_needs_compiling(ufunc, compile_type)
- && compile_def_function(ufunc, TRUE, compile_type, cctx) == FAIL)
+ && compile_def_function(ufunc, TRUE, compile_type, NULL) == FAIL)
return FAIL;
return generate_PUSHFUNC(cctx, ufunc->uf_name, ufunc->uf_func_type);
}