1
0
forked from aniani/vim

patch 8.2.0529: Vim9: function argument with default not checked

Problem:    Vim9: function argument with default not checked.
Solution:   Check type of argument with default value.
This commit is contained in:
Bram Moolenaar
2020-04-07 22:45:00 +02:00
parent 0b76b42d0a
commit 49cf7cc8d2
4 changed files with 28 additions and 5 deletions

View File

@@ -3045,8 +3045,8 @@ ex_function(exarg_T *eap)
{
p = ((char_u **)argtypes.ga_data)[i];
if (p == NULL)
// todo: get type from default value
type = &t_any;
// will get the type from the default value
type = &t_unknown;
else
type = parse_type(&p, &fp->uf_type_list);
if (type == NULL)