To: vim_dev@googlegroups.com Subject: Patch 8.2.4164 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4164 (after 8.2.4162) Problem: Error in legacy code for function shadowing variable. Solution: Only give the error in Vim9 script. Files: src/userfunc.c *** ../vim-8.2.4163/src/userfunc.c 2022-01-20 19:38:42.055859122 +0000 --- src/userfunc.c 2022-01-20 19:55:07.165536296 +0000 *************** *** 4466,4472 **** int var_conflict = FALSE; v = find_var(name, &ht, TRUE); ! if (v != NULL) var_conflict = TRUE; if (SCRIPT_ID_VALID(current_sctx.sc_sid)) --- 4466,4472 ---- int var_conflict = FALSE; v = find_var(name, &ht, TRUE); ! if (v != NULL && (in_vim9script() || v->di_tv.v_type == VAR_FUNC)) var_conflict = TRUE; if (SCRIPT_ID_VALID(current_sctx.sc_sid)) *** ../vim-8.2.4163/src/version.c 2022-01-20 19:38:42.055859122 +0000 --- src/version.c 2022-01-20 19:56:33.335896678 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4164, /**/ -- Q: How do you tell the difference between a female cat and a male cat? A: You ask it a question and if HE answers, it's a male but, if SHE answers, it's a female. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///