patch 9.2.0574: tests: missing test for v9.2.0572
Commit:
https://github.com/vim/vim/commit/b16a9ddc281dc11c0f7bd70de6a9d7041d9b2e54
Author: thinca <[email protected]>
Date: Sun May 31 19:43:42 2026 +0000
patch 9.2.0574: tests: missing test for v9.2.0572
Problem: tests: missing test for v9.2.0572 (the patch accidentally
included some additional unwanted changes from
https://github.com/vim/vim/issues/20372)
(thinca)
Solution: Add additional test for delfunc
(thinca)
Patch 9.2.0572 fixed ":call d.key()" and ":delfunction d.key" failing
with E1017 in Vim9 script, but only the :call form was covered by a
regression test. Add Test_delfunction_dict_funcref to exercise both
"delfunction d.key" and "delfunction d['k2']".
closes: #20372
Signed-off-by: thinca <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index a4c2d05d4..cec81f3ed 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -2178,4 +2178,23 @@ def Test_call_dict_funcref()
v9.CheckScriptSuccess(lines)
enddef
+" :delfunction on a funcref stored in a dict member used to fail with E1017 in
+" Vim9 script for the same reason as :call.
+def Test_delfunction_dict_funcref()
+ var lines =<< trim END
+ vim9script
+ func g:LegacyFunc()
+ endfunc
+ var d: dict<any> = {}
+ d.key = g:LegacyFunc
+ d['k2'] = g:LegacyFunc
+ delfunction d.key
+ assert_false(has_key(d, 'key'))
+ delfunction d['k2']
+ assert_false(has_key(d, 'k2'))
+ delfunction g:LegacyFunc
+ END
+ v9.CheckScriptSuccess(lines)
+enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
diff --git a/src/version.c b/src/version.c
index 53c557e43..361a0ca1f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 574,
/**/
573,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1wTmKK-00GUzL-64%40256bit.org.