1
0
forked from aniani/vim

patch 8.2.4324: Vim9: script-local function name can start with "_"

Problem:    Vim9: script-local function name can start with "_".
Solution:   Check for leading capital after "s:".  Correct error message.
This commit is contained in:
Bram Moolenaar
2022-02-07 21:54:01 +00:00
parent f681cfb90b
commit 3787f26c2e
5 changed files with 44 additions and 18 deletions

View File

@@ -888,7 +888,7 @@ compile_nested_function(exarg_T *eap, cctx_T *cctx, garray_T *lines_to_free)
return NULL;
if (!ASCII_ISUPPER(is_global ? name_start[2] : name_start[0]))
{
semsg(_(e_function_name_must_start_with_capital_or_s_str), name_start);
semsg(_(e_function_name_must_start_with_capital_str), name_start);
return NULL;
}