patch 8.2.1338: Vim9: assigning to script-local variable doesn't check type
Problem: Vim9: assigning to script-local variable doesn't check type.
Solution: Use the type. (issue #6591)
diff --git a/src/vim9execute.c b/src/vim9execute.c
index de29988..6e9b53d 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1422,6 +1422,11 @@
dict_T *dict = tv_dict->vval.v_dict;
dictitem_T *di;
+ if (dict == NULL)
+ {
+ emsg(_(e_dictnull));
+ goto on_error;
+ }
if (key == NULL)
key = (char_u *)"";
tv = STACK_TV_BOT(-3);