mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -639,3 +639,5 @@ EXTERN char e_list_or_dict_required_for_argument_nr[]
|
|||||||
INIT(= N_("E1227: List or Dictionary required for argument %d"));
|
INIT(= N_("E1227: List or Dictionary required for argument %d"));
|
||||||
EXTERN char e_list_or_dict_or_blob_required_for_argument_nr[]
|
EXTERN char e_list_or_dict_or_blob_required_for_argument_nr[]
|
||||||
INIT(= N_("E1228: List or Dictionary or Blob required for argument %d"));
|
INIT(= N_("E1228: List or Dictionary or Blob required for argument %d"));
|
||||||
|
EXTERN char e_expected_dictionary_for_using_key_str_but_got_str[]
|
||||||
|
INIT(= N_("E1229: Expected dictionary for using key \"%s\", but got %s"));
|
||||||
|
@@ -3114,7 +3114,7 @@ func Test_expr7_fails()
|
|||||||
call CheckDefExecAndScriptFailure(["var x = +g:alist"], 'E745:', 1)
|
call CheckDefExecAndScriptFailure(["var x = +g:alist"], 'E745:', 1)
|
||||||
call CheckDefExecAndScriptFailure(["var x = +g:adict"], 'E728:', 1)
|
call CheckDefExecAndScriptFailure(["var x = +g:adict"], 'E728:', 1)
|
||||||
|
|
||||||
call CheckDefAndScriptFailure2(["var x = ''", "var y = x.memb"], 'E715:', 'E488:', 2)
|
call CheckDefAndScriptFailure2(["var x = ''", "var y = x.memb"], 'E1229: Expected dictionary for using key "memb", but got string', 'E488:', 2)
|
||||||
|
|
||||||
call CheckDefAndScriptFailure2(["'yes'->", "Echo()"], 'E488: Trailing characters: ->', 'E260: Missing name after ->', 1)
|
call CheckDefAndScriptFailure2(["'yes'->", "Echo()"], 'E488: Trailing characters: ->', 'E260: Missing name after ->', 1)
|
||||||
|
|
||||||
|
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3238,
|
||||||
/**/
|
/**/
|
||||||
3237,
|
3237,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -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];
|
type = ((type_T **)stack->ga_data)[stack->ga_len - 1];
|
||||||
if (type->tt_type != VAR_DICT && type != &t_any)
|
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;
|
return FAIL;
|
||||||
}
|
}
|
||||||
// change dict type to dict member type
|
// change dict type to dict member type
|
||||||
|
Reference in New Issue
Block a user