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.
diff --git a/src/userfunc.c b/src/userfunc.c
index 69a57c2..316eac6 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3045,8 +3045,8 @@
{
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)