Problem: Can delete a numbered function. (Naohiro Ono)
Solution: Disallow deleting a numbered function. (closes #8760)
func d.fn()
return 1
endfunc
+
+ " cannot delete the dict function by number
+ let nr = substitute(execute('echo d'), '.*function(''\(\d\+\)'').*', '\1', '')
+ call assert_fails('delfunction g:' .. nr, 'E475: Invalid argument: g:')
+
delfunc d.fn
call assert_equal({'a' : 10}, d)
endfunc
if (eap->nextcmd != NULL)
*p = NUL;
+ if (isdigit(*name) && fudi.fd_dict == NULL)
+ {
+ if (!eap->skip)
+ semsg(_(e_invarg2), eap->arg);
+ vim_free(name);
+ return;
+ }
if (!eap->skip)
fp = find_func(name, is_global, NULL);
vim_free(name);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3408,
/**/
3407,
/**/