INIT(= N_("E687: Less targets than List items"));
EXTERN char e_more_targets_than_list_items[]
INIT(= N_("E688: More targets than List items"));
-EXTERN char e_can_only_index_list_dictionary_or_blob[]
- INIT(= N_("E689: Can only index a List, Dictionary or Blob"));
+EXTERN char e_index_not_allowed_after_str_str[]
+ INIT(= N_("E689: Index not allowed after a %s: %s"));
EXTERN char e_missing_in_after_for[]
INIT(= N_("E690: Missing \"in\" after :for"));
EXTERN char e_can_only_compare_list_with_list[]
#ifdef FEAT_EVAL
EXTERN char e_no_white_space_allowed_after_str_str[]
INIT(= N_("E1202: No white space allowed after '%s': %s"));
-EXTERN char e_dot_can_only_be_used_on_dictionary_str[]
- INIT(= N_("E1203: Dot can only be used on a dictionary: %s"));
+EXTERN char e_dot_not_allowed_after_str_str[]
+ INIT(= N_("E1203: Dot not allowed after a %s: %s"));
#endif
EXTERN char e_regexp_number_after_dot_pos_search_chr[]
INIT(= N_("E1204: No Number allowed after .: '\\%%%c'"));
&& v_type != VAR_OBJECT
&& v_type != VAR_CLASS)
{
- // TODO: have a message with obj/class, not just dict,
if (!quiet)
- semsg(_(e_dot_can_only_be_used_on_dictionary_str), name);
+ semsg(_(e_dot_not_allowed_after_str_str),
+ vartype_name(v_type), name);
return NULL;
}
if (v_type != VAR_LIST
&& v_type != VAR_OBJECT
&& v_type != VAR_CLASS)
{
- // TODO: have a message with obj/class, not just dict/list/blob,
if (!quiet)
- emsg(_(e_can_only_index_list_dictionary_or_blob));
+ semsg(_(e_index_not_allowed_after_str_str),
+ vartype_name(v_type), name);
return NULL;
}
let n = 0
let n.key = 3
END
- call v9.CheckScriptFailure(lines, 'E1203: Dot can only be used on a dictionary: n.key = 3')
+ call v9.CheckScriptFailure(lines, 'E1203: Dot not allowed after a number: n.key = 3')
let lines =<< trim END
vim9script
var n = 0
n.key = 3
END
- call v9.CheckScriptFailure(lines, 'E1203: Dot can only be used on a dictionary: n.key = 3')
+ call v9.CheckScriptFailure(lines, 'E1203: Dot not allowed after a number: n.key = 3')
let lines =<< trim END
var n = 0
n.key = 3
var n: any
n.key = 5
END
- v9.CheckDefExecAndScriptFailure(lines, ['E1148:', 'E1203: Dot can only be used on a dictionary: n.key = 5'], 2)
+ v9.CheckDefExecAndScriptFailure(lines, ['E1148:', 'E1203: Dot not allowed after a number: n.key = 5'], 2)
enddef
def Test_assignment_local()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2012,
/**/
2011,
/**/