diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2023-09-28 22:46:37 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-09-28 22:46:37 +0200 |
commit | 413f83990f15d5d59d27ab741670f527a7a3feb8 (patch) | |
tree | a2ed23ee4e864430e0ebf59a0f33e864ecb843ef /src | |
parent | f057aca1cc2480e820b3ca5d8d407e3976369777 (diff) |
patch 9.0.1950: Vim9: error codes spread outv9.0.1950
Problem: Vim9: error codes spread out
Solution: group them together and reserve 100
more for future use
Reserve 100 error codes for future enhancements to the Vim9 class
support
closes: #13207
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/errors.h | 18 | ||||
-rw-r--r-- | src/testdir/test_format.vim | 122 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 73 insertions, 69 deletions
diff --git a/src/errors.h b/src/errors.h index baf36d5e4a..975e033b53 100644 --- a/src/errors.h +++ b/src/errors.h @@ -3532,18 +3532,20 @@ EXTERN char e_missing_name_after_implements[] EXTERN char e_cannot_use_an_object_variable_except_with_the_new_method_str[] INIT(= N_("E1390: Cannot use an object variable \"this.%s\" except with the \"new\" method")); #endif +// E1391 - E1499 unused (reserved for Vim9 class support) EXTERN char e_cannot_mix_positional_and_non_positional_str[] - INIT(= N_("E1400: Cannot mix positional and non-positional arguments: %s")); + INIT(= N_("E1500: Cannot mix positional and non-positional arguments: %s")); EXTERN char e_fmt_arg_nr_unused_str[] - INIT(= N_("E1401: format argument %d unused in $-style format: %s")); + INIT(= N_("E1501: format argument %d unused in $-style format: %s")); EXTERN char e_positional_num_field_spec_reused_str_str[] - INIT(= N_("E1402: Positional argument %d used as field width reused as different type: %s/%s")); + INIT(= N_("E1502: Positional argument %d used as field width reused as different type: %s/%s")); EXTERN char e_positional_nr_out_of_bounds_str[] - INIT(= N_("E1403: Positional argument %d out of bounds: %s")); + INIT(= N_("E1503: Positional argument %d out of bounds: %s")); EXTERN char e_positional_arg_num_type_inconsistent_str_str[] - INIT(= N_("E1404: Positional argument %d type used inconsistently: %s/%s")); + INIT(= N_("E1504: Positional argument %d type used inconsistently: %s/%s")); EXTERN char e_invalid_format_specifier_str[] - INIT(= N_("E1405: Invalid format specifier: %s")); + INIT(= N_("E1505: Invalid format specifier: %s")); EXTERN char e_aptypes_is_null_nr_str[] - INIT(= "E1408: Internal error: ap_types or ap_types[idx] is NULL: %d: %s"); -// E1391 - E1399 unused + INIT(= "E1520: Internal error: ap_types or ap_types[idx] is NULL: %d: %s"); + +// E1506 - E1519 unused diff --git a/src/testdir/test_format.vim b/src/testdir/test_format.vim index f665d15a9b..af364c2a15 100644 --- a/src/testdir/test_format.vim +++ b/src/testdir/test_format.vim @@ -107,65 +107,65 @@ func Test_printf_pos_misc() call v9.CheckLegacyAndVim9Failure(["call printf('%1$d%2$d', 1, 3, 4)"], "E767:") - call v9.CheckLegacyAndVim9Failure(["call printf('%2$d%d', 1, 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$d', 1, 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$d%d', 1, 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$*1$d', 1, 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%2$.*1$d%d', 1, 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$.*1$d', 1, 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$%')"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$')"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$_')"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.*d', 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*.*2$d', 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*.*d', 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%*.*1$d', 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%*1$.*d', 3)"], "E1400:") - call v9.CheckLegacyAndVim9Failure(["call printf('%*1$.*1$d', 3)"], "E1400:") - - call v9.CheckLegacyAndVim9Failure(["call printf('%2$d', 3, 3)"], "E1401:") - - call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$d %1$ld', 3, 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$*1$d', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$p %1$*1$d', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$f %1$*1$d', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$lud %1$*1$d', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$llud %1$*1$d', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$lld %1$*1$d', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$*1$d', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$c %1$*1$d', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$*1$d', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %2$*1$d', 3, 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$ld', 3)"], "E1402:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$.*1$ld', 3)"], "E1402:") - - call v9.CheckLegacyAndVim9Failure(["call printf('%1$d%2$d', 3)"], "E1403:") - - call v9.CheckLegacyAndVim9Failure(["call printf('%1$d %1$s', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$s', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$ud %1$d', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$f', 3.0)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$d %1$ld', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$d', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$p %1$d', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$f %1$d', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$lud %1$d', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$llud %1$d', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$lld %1$d', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$d', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$c %1$d', 3)"], "E1404:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$d', 3)"], "E1404:") - - call v9.CheckLegacyAndVim9Failure(["call printf('%1$.2$d', 3)"], "E1405:") - call v9.CheckLegacyAndVim9Failure(["call printf('%01$d', 3)"], "E1405:") - call v9.CheckLegacyAndVim9Failure(["call printf('%01$0d', 3)"], "E1405:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2d', 3)"], "E1405:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3.*2$d', 3)"], "E1405:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.2$d', 3)"], "E1405:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.*2d', 3)"], "E1405:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$1$.5d', 5)"], "E1405:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$5.1$d', 5)"], "E1405:") - call v9.CheckLegacyAndVim9Failure(["call printf('%1$1$.1$d', 5)"], "E1405:") + call v9.CheckLegacyAndVim9Failure(["call printf('%2$d%d', 1, 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$d', 1, 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$d%d', 1, 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$*1$d', 1, 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%2$.*1$d%d', 1, 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%d%2$.*1$d', 1, 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$%')"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$')"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$_')"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.*d', 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*.*2$d', 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*.*d', 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%*.*1$d', 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%*1$.*d', 3)"], "E1500:") + call v9.CheckLegacyAndVim9Failure(["call printf('%*1$.*1$d', 3)"], "E1500:") + + call v9.CheckLegacyAndVim9Failure(["call printf('%2$d', 3, 3)"], "E1501:") + + call v9.CheckLegacyAndVim9Failure(["call printf('%2$*1$d %1$ld', 3, 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$*1$d', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$p %1$*1$d', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$f %1$*1$d', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$lud %1$*1$d', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$llud %1$*1$d', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$lld %1$*1$d', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$*1$d', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$c %1$*1$d', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$*1$d', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %2$*1$d', 3, 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$ld', 3)"], "E1502:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$.*1$ld', 3)"], "E1502:") + + call v9.CheckLegacyAndVim9Failure(["call printf('%1$d%2$d', 3)"], "E1503:") + + call v9.CheckLegacyAndVim9Failure(["call printf('%1$d %1$s', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$s', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$ud %1$d', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$f', 3.0)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*1$d %1$ld', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$d', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$p %1$d', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$f %1$d', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$lud %1$d', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$llud %1$d', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$lld %1$d', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$s %1$d', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$c %1$d', 3)"], "E1504:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$ld %1$d', 3)"], "E1504:") + + call v9.CheckLegacyAndVim9Failure(["call printf('%1$.2$d', 3)"], "E1505:") + call v9.CheckLegacyAndVim9Failure(["call printf('%01$d', 3)"], "E1505:") + call v9.CheckLegacyAndVim9Failure(["call printf('%01$0d', 3)"], "E1505:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*2d', 3)"], "E1505:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3.*2$d', 3)"], "E1505:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.2$d', 3)"], "E1505:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$*3$.*2d', 3)"], "E1505:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$1$.5d', 5)"], "E1505:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$5.1$d', 5)"], "E1505:") + call v9.CheckLegacyAndVim9Failure(["call printf('%1$1$.1$d', 5)"], "E1505:") endfunc func Test_printf_pos_float() @@ -296,9 +296,9 @@ func Test_printf_pos_errors() call v9.CheckLegacyAndVim9Failure(['echo printf("%1$d", [])'], 'E745:') call v9.CheckLegacyAndVim9Failure(['echo printf("%1$d", 1, 2)'], 'E767:') call v9.CheckLegacyAndVim9Failure(['echo printf("%*d", 1)'], 'E766:') - call v9.CheckLegacyAndVim9Failure(['echo printf("%1$s")'], 'E1403:') + call v9.CheckLegacyAndVim9Failure(['echo printf("%1$s")'], 'E1503:') call v9.CheckLegacyAndVim9Failure(['echo printf("%1$d", 1.2)'], 'E805:') - call v9.CheckLegacyAndVim9Failure(['echo printf("%1$f")'], 'E1403:') + call v9.CheckLegacyAndVim9Failure(['echo printf("%1$f")'], 'E1503:') endfunc func Test_printf_pos_64bit() diff --git a/src/version.c b/src/version.c index dade6d2fed..0bb2239ee0 100644 --- a/src/version.c +++ b/src/version.c @@ -700,6 +700,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1950, +/**/ 1949, /**/ 1948, |