0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.3238: Vim9: error message does not indicate the location

Problem:    Vim9: error message does not indicate the location.
Solution:   Add the relevant text. (issue #8634)
This commit is contained in:
Bram Moolenaar
2021-07-28 20:52:13 +02:00
parent 53f7fccc94
commit d47c39775b
4 changed files with 10 additions and 2 deletions

View File

@@ -2177,7 +2177,11 @@ generate_STRINGMEMBER(cctx_T *cctx, char_u *name, size_t len)
type = ((type_T **)stack->ga_data)[stack->ga_len - 1];
if (type->tt_type != VAR_DICT && type != &t_any)
{
emsg(_(e_dictreq));
char *tofree;
semsg(_(e_expected_dictionary_for_using_key_str_but_got_str),
name, type_name(type, &tofree));
vim_free(tofree);
return FAIL;
}
// change dict type to dict member type