diff src/errors.h @ 33682:f126ffc85f7c v9.0.2078

patch 9.0.2078: several problems with type aliases Commit: https://github.com/vim/vim/commit/feaccd239573a6265d39d3a917862ee40742eab4 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Oct 28 15:53:55 2023 +0200 patch 9.0.2078: several problems with type aliases 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>
author Christian Brabandt <cb@256bit.org>
date Sat, 28 Oct 2023 16:00:06 +0200
parents 7d9d2404a3d4
children 643db54ed3e7
line wrap: on
line diff
--- a/src/errors.h
+++ b/src/errors.h
@@ -3542,8 +3542,8 @@ EXTERN char e_type_can_only_be_defined_i
 	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[]