diff src/userfunc.c @ 19946:8466e62a2481 v8.2.0529

patch 8.2.0529: Vim9: function argument with default not checked Commit: https://github.com/vim/vim/commit/49cf7cc8d2df1509cbe23647166c6cc954d59513 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 7 22:45:00 2020 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Tue, 07 Apr 2020 23:00:04 +0200
parents 3055cd26e139
children aadd1cae2ff5
line wrap: on
line diff
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -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)