summaryrefslogtreecommitdiff
path: root/src/vim9compile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-28 20:52:13 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-28 20:52:13 +0200
commitd47c39775b8d381005751b7b20da56412dafb5e4 (patch)
treeb5da177ef8fecdf379f397130272f1f05ffdcbb0 /src/vim9compile.c
parent53f7fccc9413c9f770694b56f40f242d383b2d5f (diff)
downloadvim-git-d47c39775b8d381005751b7b20da56412dafb5e4.tar.gz
patch 8.2.3238: Vim9: error message does not indicate the locationv8.2.3238
Problem: Vim9: error message does not indicate the location. Solution: Add the relevant text. (issue #8634)
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r--src/vim9compile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 0d54db3d5..cb00f0348 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -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