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/eval.c b/src/eval.c
index e0f0816..555cd38 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -959,7 +959,7 @@
&& lp->ll_tv == &v->di_tv
&& ht != NULL && ht == get_script_local_ht())
{
- svar_T *sv = find_typval_in_script(lp->ll_tv);
+ svar_T *sv = find_typval_in_script(lp->ll_tv, TRUE);
// Vim9 script local variable: get the type
if (sv != NULL)