0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4586: Vim9: no error for using lower case name for "func" argument

Problem:    Vim9: no error for using lower case name for "func" argument.
            (Ernie Rael)
Solution:   Check the name as soon as the type is known.
This commit is contained in:
Bram Moolenaar
2022-03-17 16:30:03 +00:00
parent 155b088208
commit 1d9cef769d
3 changed files with 14 additions and 4 deletions

View File

@@ -429,6 +429,12 @@ parse_argument_types(ufunc_T *fp, garray_T *argtypes, int varargs)
if (type == NULL)
return FAIL;
fp->uf_arg_types[i] = type;
if (i < fp->uf_args.ga_len
&& (type->tt_type == VAR_FUNC
|| type->tt_type == VAR_PARTIAL)
&& var_wrong_func_name(
((char_u **)fp->uf_args.ga_data)[i], TRUE))
return FAIL;
}
}
}