diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2023-10-28 15:53:55 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-10-28 15:53:55 +0200 |
commit | feaccd239573a6265d39d3a917862ee40742eab4 (patch) | |
tree | 3ccb80ce860395236ba3d4a44b4257af99e4b21a /src/errors.h | |
parent | 87ca5e86fa0ef305f3d39cc4261b622f21417f7f (diff) |
patch 9.0.2078: several problems with type aliasesv9.0.2078
Problem: several problems with type aliases
Solution: Check for more error conditions, add tests,
fix issues
Check for more error conditions and add additional tests
fixes #13434
fixes #13437
fixes #13438
closes #13441
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/errors.h')
-rw-r--r-- | src/errors.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/errors.h b/src/errors.h index 4c6b63bd75..f8e1dfe911 100644 --- a/src/errors.h +++ b/src/errors.h @@ -3542,8 +3542,8 @@ EXTERN char e_type_can_only_be_defined_in_vim9_script[] INIT(= N_("E1393: Type can only be defined in Vim9 script")); EXTERN char e_type_name_must_start_with_uppercase_letter_str[] INIT(= N_("E1394: Type name must start with an uppercase letter: %s")); -EXTERN char e_using_typealias_as_variable[] - INIT(= N_("E1395: Type alias \"%s\" cannot be used as a variable")); +EXTERN char e_cannot_modify_typealias[] + INIT(= N_("E1395: Type alias \"%s\" cannot be modified")); EXTERN char e_typealias_already_exists_for_str[] INIT(= N_("E1396: Type alias \"%s\" already exists")); EXTERN char e_missing_typealias_name[] @@ -3552,8 +3552,16 @@ EXTERN char e_missing_typealias_type[] INIT(= N_("E1398: Missing type alias type")); EXTERN char e_type_can_only_be_used_in_script[] INIT(= N_("E1399: Type can only be used in a script")); -#endif -// E1400 - E1499 unused (reserved for Vim9 class support) +EXTERN char e_using_typealias_as_number[] + INIT(= N_("E1400: Using type alias \"%s\" as a Number")); +EXTERN char e_using_typealias_as_float[] + INIT(= N_("E1401: Using type alias \"%s\" as a Float")); +EXTERN char e_using_typealias_as_string[] + INIT(= N_("E1402: Using type alias \"%s\" as a String")); +EXTERN char e_using_typealias_as_value[] + INIT(= N_("E1403: Type alias \"%s\" cannot be used as a value")); +#endif +// E1404 - E1499 unused (reserved for Vim9 class support) EXTERN char e_cannot_mix_positional_and_non_positional_str[] INIT(= N_("E1500: Cannot mix positional and non-positional arguments: %s")); EXTERN char e_fmt_arg_nr_unused_str[] |