0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.3370: Vim9: no check for white space before type in declaration

Problem:    Vim9: no check for white space before type in declaration.
            (Naohiro Ono)
Solution:   Check for white space like in a compiled function. (closes #8785)
This commit is contained in:
Bram Moolenaar
2021-08-23 22:22:45 +02:00
parent 6b36d2a16d
commit 60faf8656e
3 changed files with 11 additions and 1 deletions

View File

@@ -887,7 +887,13 @@ get_lval(
if (*p == ':')
{
scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid);
char_u *tp = skipwhite(p + 1);
char_u *tp = skipwhite(p + 1);
if (tp == p + 1 && !quiet)
{
semsg(_(e_white_space_required_after_str_str), ":", p);
return NULL;
}
// parse the type after the name
lp->ll_type = parse_type(&tp, &si->sn_type_list, !quiet);