patch 8.2.2224: Vim9: crash if script reloaded with different variable type

Problem:    Vim9: crash if script reloaded with different variable type.
Solution:   Check the type when accessing the variable.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 9d526ab..baf7923 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1327,6 +1327,7 @@
     sref->sref_sid = sid;
     sref->sref_idx = idx;
     sref->sref_seq = si->sn_script_seq;
+    sref->sref_type = type;
     return OK;
 }