patch 8.2.3128: Vim9: uninitialzed list does not get type checked
Problem: Vim9: uninitialzed list does not get type checked.
Solution: Set the type when initializing the variable. (closes #8529)
diff --git a/src/userfunc.c b/src/userfunc.c
index 4234681..4ab7cc1 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -1512,7 +1512,7 @@
{
if (type != NULL && ht == get_script_local_ht())
{
- svar_T *sv = find_typval_in_script(&v->di_tv);
+ svar_T *sv = find_typval_in_script(&v->di_tv, TRUE);
if (sv != NULL)
*type = sv->sv_type;