patch 8.2.3411: Vim9: crash when using base name of import
Problem: Vim9: crash when using base name of import. (Naohiro Ono)
Solution: Check the import flags. (closes #8843)
diff --git a/src/evalvars.c b/src/evalvars.c
index 1af9ec5..5a26eff 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -3260,6 +3260,12 @@
semsg(_(e_redefining_imported_item_str), name);
goto failed;
}
+ if (import->imp_flags & IMP_FLAGS_STAR)
+ {
+ semsg(_(e_cannot_use_str_itself_it_is_imported_with_star),
+ name);
+ goto failed;
+ }
sv = ((svar_T *)si->sn_var_vals.ga_data) + import->imp_var_vals_idx;
where.wt_variable = TRUE;