diff src/eval.c @ 25184:e495f40e4b07 v8.2.3128

patch 8.2.3128: Vim9: uninitialzed list does not get type checked Commit: https://github.com/vim/vim/commit/f055d4502365f24de6c0f210a06e2c146a75dc4d Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 8 20:57:24 2021 +0200 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 https://github.com/vim/vim/issues/8529)
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Jul 2021 21:00:06 +0200
parents 610e15e8778d
children 0a3b1c66d3f2
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -959,7 +959,7 @@ get_lval(
 		&& 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)