mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1657: Vim9: no proper error for nested ":def!"
Problem: Vim9: no proper error for nested ":def!". Solution: Check for "!". (closes #6920)
This commit is contained in:
@@ -4320,6 +4320,12 @@ compile_nested_function(exarg_T *eap, cctx_T *cctx)
|
||||
ufunc_T *ufunc;
|
||||
int r;
|
||||
|
||||
if (*name_start == '!')
|
||||
{
|
||||
emsg(_(e_cannot_use_bang_with_nested_def));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Only g:Func() can use a namespace.
|
||||
if (name_start[1] == ':' && !is_global)
|
||||
{
|
||||
|
Reference in New Issue
Block a user