0
0
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:
Bram Moolenaar
2020-09-10 22:28:01 +02:00
parent dfa3d5524e
commit 8b848cafb0
4 changed files with 27 additions and 0 deletions

View File

@@ -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)
{