mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.1951: Vim9: hard to debug vim9_class errors from CI
Problem: Vim9: hard to debug vim9_class errors from CI Solution: Include the line number in assert_xxx() calls. Include the entire error message in the tests. Fix the indentation in the test file. Add tags for new error codes. closes: #13206 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
committed by
Christian Brabandt
parent
413f83990f
commit
b90e3bc491
@@ -4479,6 +4479,9 @@ E1380 vim9class.txt /*E1380*
|
||||
E1381 vim9class.txt /*E1381*
|
||||
E1382 vim9class.txt /*E1382*
|
||||
E1383 vim9class.txt /*E1383*
|
||||
E1384 vim9class.txt /*E1384*
|
||||
E1385 vim9class.txt /*E1385*
|
||||
E1386 vim9class.txt /*E1386*
|
||||
E1387 vim9class.txt /*E1387*
|
||||
E1388 vim9class.txt /*E1388*
|
||||
E1389 vim9class.txt /*E1389*
|
||||
|
@@ -258,10 +258,15 @@ If the class extends a parent class, the same thing happens. In the second
|
||||
step the object variables of the parent class are initialized first. There is
|
||||
no need to call "super()" or "new()" on the parent.
|
||||
|
||||
*E1365*
|
||||
*E1365*
|
||||
When defining the new() method the return type should not be specified. It
|
||||
always returns an object of the class.
|
||||
|
||||
*E1386*
|
||||
When invoking an object method, the method name should be preceded by the
|
||||
object variable name. A object method cannot be invoked using the class
|
||||
name.
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. Class Variables and Methods *Vim9-class-member*
|
||||
@@ -282,7 +287,7 @@ prefix in the class where they are defined: >
|
||||
Since the name is used as-is, shadowing the name by a method argument name
|
||||
or local variable name is not allowed.
|
||||
|
||||
*E1374* *E1375*
|
||||
*E1374* *E1375* *E1384* *E1385*
|
||||
To access a class member outside of the class where it is defined, the class
|
||||
name prefix must be used. A class member cannot be accessed using an object.
|
||||
|
||||
|
@@ -2396,6 +2396,7 @@ EXTERN char e_io_file_requires_name_to_be_set[]
|
||||
#ifdef FEAT_EVAL
|
||||
EXTERN char e_invalid_callback_argument[]
|
||||
INIT(= N_("E921: Invalid callback argument"));
|
||||
// E922 unused
|
||||
EXTERN char e_second_argument_of_function_must_be_list_or_dict[]
|
||||
INIT(= N_("E923: Second argument of function() must be a list or a dict"));
|
||||
#endif
|
||||
@@ -2790,7 +2791,7 @@ EXTERN char e_no_white_space_allowed_after_dot[]
|
||||
INIT(= N_("E1074: No white space allowed after dot"));
|
||||
EXTERN char e_namespace_not_supported_str[]
|
||||
INIT(= N_("E1075: Namespace not supported: %s"));
|
||||
// E1076 was deleted
|
||||
// E1076 unused (was deleted)
|
||||
EXTERN char e_missing_argument_type_for_str[]
|
||||
INIT(= N_("E1077: Missing argument type for %s"));
|
||||
#endif
|
||||
@@ -2858,6 +2859,7 @@ PLURAL_MSG(e_one_argument_too_many, "E1106: One argument too many",
|
||||
|
||||
EXTERN char e_string_list_dict_or_blob_required[]
|
||||
INIT(= N_("E1107: String, List, Dict or Blob required"));
|
||||
// E1108 unused
|
||||
EXTERN char e_list_item_nr_is_not_list[]
|
||||
INIT(= N_("E1109: List item %d is not a List"));
|
||||
EXTERN char e_list_item_nr_does_not_contain_3_numbers[]
|
||||
@@ -3210,6 +3212,7 @@ EXTERN char e_list_dict_blob_or_string_required_for_argument_nr[]
|
||||
INIT(= N_("E1251: List, Dictionary, Blob or String required for argument %d"));
|
||||
EXTERN char e_string_list_or_blob_required_for_argument_nr[]
|
||||
INIT(= N_("E1252: String, List or Blob required for argument %d"));
|
||||
// E1253 unused
|
||||
EXTERN char e_cannot_use_script_variable_in_for_loop[]
|
||||
INIT(= N_("E1254: Cannot use script variable in for loop"));
|
||||
#endif
|
||||
@@ -3523,7 +3526,7 @@ EXTERN char e_class_method_str_accessible_only_using_class_str[]
|
||||
INIT(= N_("E1385: Class method \"%s\" accessible only using class \"%s\""));
|
||||
EXTERN char e_object_method_str_accessible_only_using_object_str[]
|
||||
INIT(= N_("E1386: Object method \"%s\" accessible only using class \"%s\" object"));
|
||||
EXTERN char e_public_member_not_supported_in_interface[]
|
||||
EXTERN char e_public_variable_not_supported_in_interface[]
|
||||
INIT(= N_("E1387: Public variable not supported in an interface"));
|
||||
EXTERN char e_public_keyword_not_supported_for_method[]
|
||||
INIT(= N_("E1388: Public keyword not supported for a method"));
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -699,6 +699,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1951,
|
||||
/**/
|
||||
1950,
|
||||
/**/
|
||||
|
@@ -1577,7 +1577,7 @@ early_ret:
|
||||
}
|
||||
if (!is_class)
|
||||
{
|
||||
emsg(_(e_public_member_not_supported_in_interface));
|
||||
emsg(_(e_public_variable_not_supported_in_interface));
|
||||
break;
|
||||
}
|
||||
has_public = TRUE;
|
||||
|
Reference in New Issue
Block a user