Mercurial > vim
comparison src/errors.h @ 34907:8c9e43278b2c v9.1.0314
patch 9.1.0314: Vim9: Can define a class in a function
Commit: https://github.com/vim/vim/commit/c51578fed8f21cf3c1ff72bbb599dca2db02be84
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sat Apr 13 17:58:09 2024 +0200
patch 9.1.0314: Vim9: Can define a class in a function
Problem: Vim9: Can define a class in a function
(Doug Kearns)
Solution: Give an error for a class defined in a function,
slightly reword some public error messages
(Yegappan Lakshmanan)
fixes: #13184
fixes: #13326
closes: #14537
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 13 Apr 2024 18:15:03 +0200 |
parents | e5d2d9024ad6 |
children |
comparison
equal
deleted
inserted
replaced
34906:cb75f6489b63 | 34907:8c9e43278b2c |
---|---|
3410 EXTERN char e_invalid_class_variable_declaration_str[] | 3410 EXTERN char e_invalid_class_variable_declaration_str[] |
3411 INIT(= N_("E1329: Invalid class variable declaration: %s")); | 3411 INIT(= N_("E1329: Invalid class variable declaration: %s")); |
3412 EXTERN char e_invalid_type_for_object_variable_str[] | 3412 EXTERN char e_invalid_type_for_object_variable_str[] |
3413 INIT(= N_("E1330: Invalid type for object variable: %s")); | 3413 INIT(= N_("E1330: Invalid type for object variable: %s")); |
3414 EXTERN char e_public_must_be_followed_by_var_static_final_or_const[] | 3414 EXTERN char e_public_must_be_followed_by_var_static_final_or_const[] |
3415 INIT(= N_("E1331: Public must be followed by \"var\" or \"static\" or \"final\" or \"const\"")); | 3415 INIT(= N_("E1331: public must be followed by \"var\" or \"static\" or \"final\" or \"const\"")); |
3416 EXTERN char e_public_variable_name_cannot_start_with_underscore_str[] | 3416 EXTERN char e_public_variable_name_cannot_start_with_underscore_str[] |
3417 INIT(= N_("E1332: Public variable name cannot start with underscore: %s")); | 3417 INIT(= N_("E1332: public variable name cannot start with underscore: %s")); |
3418 EXTERN char e_cannot_access_protected_variable_str[] | 3418 EXTERN char e_cannot_access_protected_variable_str[] |
3419 INIT(= N_("E1333: Cannot access protected variable \"%s\" in class \"%s\"")); | 3419 INIT(= N_("E1333: Cannot access protected variable \"%s\" in class \"%s\"")); |
3420 // E1334 unused | 3420 // E1334 unused |
3421 EXTERN char e_variable_is_not_writable_str[] | 3421 EXTERN char e_variable_is_not_writable_str[] |
3422 INIT(= N_("E1335: Variable \"%s\" in class \"%s\" is not writable")); | 3422 INIT(= N_("E1335: Variable \"%s\" in class \"%s\" is not writable")); |
3530 EXTERN char e_class_method_str_accessible_only_using_class_str[] | 3530 EXTERN char e_class_method_str_accessible_only_using_class_str[] |
3531 INIT(= N_("E1385: Class method \"%s\" accessible only using class \"%s\"")); | 3531 INIT(= N_("E1385: Class method \"%s\" accessible only using class \"%s\"")); |
3532 EXTERN char e_object_method_str_accessible_only_using_object_str[] | 3532 EXTERN char e_object_method_str_accessible_only_using_object_str[] |
3533 INIT(= N_("E1386: Object method \"%s\" accessible only using class \"%s\" object")); | 3533 INIT(= N_("E1386: Object method \"%s\" accessible only using class \"%s\" object")); |
3534 EXTERN char e_public_variable_not_supported_in_interface[] | 3534 EXTERN char e_public_variable_not_supported_in_interface[] |
3535 INIT(= N_("E1387: Public variable not supported in an interface")); | 3535 INIT(= N_("E1387: public variable not supported in an interface")); |
3536 EXTERN char e_public_keyword_not_supported_for_method[] | 3536 EXTERN char e_public_keyword_not_supported_for_method[] |
3537 INIT(= N_("E1388: Public keyword not supported for a method")); | 3537 INIT(= N_("E1388: public keyword not supported for a method")); |
3538 EXTERN char e_missing_name_after_implements[] | 3538 EXTERN char e_missing_name_after_implements[] |
3539 INIT(= N_("E1389: Missing name after implements")); | 3539 INIT(= N_("E1389: Missing name after implements")); |
3540 EXTERN char e_cannot_use_an_object_variable_except_with_the_new_method_str[] | 3540 EXTERN char e_cannot_use_an_object_variable_except_with_the_new_method_str[] |
3541 INIT(= N_("E1390: Cannot use an object variable \"this.%s\" except with the \"new\" method")); | 3541 INIT(= N_("E1390: Cannot use an object variable \"this.%s\" except with the \"new\" method")); |
3542 EXTERN char e_cannot_lock_object_variable_str[] | 3542 EXTERN char e_cannot_lock_object_variable_str[] |
3613 INIT(= N_("E1426: Enum \"%s\" ordinal value cannot be modified")); | 3613 INIT(= N_("E1426: Enum \"%s\" ordinal value cannot be modified")); |
3614 EXTERN char e_enum_str_name_cannot_be_modified[] | 3614 EXTERN char e_enum_str_name_cannot_be_modified[] |
3615 INIT(= N_("E1427: Enum \"%s\" name cannot be modified")); | 3615 INIT(= N_("E1427: Enum \"%s\" name cannot be modified")); |
3616 EXTERN char e_duplicate_enum_str[] | 3616 EXTERN char e_duplicate_enum_str[] |
3617 INIT(= N_("E1428: Duplicate enum value: %s")); | 3617 INIT(= N_("E1428: Duplicate enum value: %s")); |
3618 EXTERN char e_class_can_only_be_used_in_script[] | |
3619 INIT(= N_("E1429: Class can only be used in a script")); | |
3618 #endif | 3620 #endif |
3619 // E1429 - E1499 unused (reserved for Vim9 class support) | 3621 // E1429 - E1499 unused (reserved for Vim9 class support) |
3620 EXTERN char e_cannot_mix_positional_and_non_positional_str[] | 3622 EXTERN char e_cannot_mix_positional_and_non_positional_str[] |
3621 INIT(= N_("E1500: Cannot mix positional and non-positional arguments: %s")); | 3623 INIT(= N_("E1500: Cannot mix positional and non-positional arguments: %s")); |
3622 EXTERN char e_fmt_arg_nr_unused_str[] | 3624 EXTERN char e_fmt_arg_nr_unused_str[] |