commit | 8b848cafb0a88f8d8e8f46caa8d67431b4faa374 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Thu Sep 10 22:28:01 2020 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Thu Sep 10 22:28:01 2020 +0200 |
tree | 9692269664c2bd8f644f83cd54e24fa49f2e96fe | |
parent | dfa3d5524e816c1ff7f603f9f3b7703a53a0f822 [diff] [blame] |
patch 8.2.1657: Vim9: no proper error for nested ":def!" Problem: Vim9: no proper error for nested ":def!". Solution: Check for "!". (closes #6920)
diff --git a/src/vim9compile.c b/src/vim9compile.c index 7199e85..43d994e 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c
@@ -4320,6 +4320,12 @@ 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) {