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/vim9.h b/src/vim9.h
index 2752aa8..fd28e5f 100644
--- a/src/vim9.h
+++ b/src/vim9.h
@@ -247,6 +247,7 @@
int sref_sid; // script ID
int sref_idx; // index in sn_var_vals
int sref_seq; // sn_script_seq when compiled
+ type_T *sref_type; // type of the variable when compiled
} scriptref_T;
typedef struct {