1
0
forked from aniani/vim

patch 8.2.1506: Vim9: no error when using a number other than 0 or 1 as bool

Problem:    Vim9: no error when using a number other than 0 or 1 as bool.
Solution:   Check the number is 0 or 1.
This commit is contained in:
Bram Moolenaar
2020-08-22 15:06:35 +02:00
parent 1b04ce2d40
commit d70840ed68
4 changed files with 23 additions and 5 deletions

View File

@@ -73,7 +73,8 @@ EXTERN char e_const_requires_a_value[]
INIT(= N_("E1021: const requires a value"));
EXTERN char e_type_or_initialization_required[]
INIT(= N_("E1022: type or initialization required"));
// E1023 unused
EXTERN char e_using_number_as_bool_nr[]
INIT(= N_("E1023: Using a Number as a Bool: %d"));
EXTERN char e_using_number_as_string[]
INIT(= N_("E1024: Using a Number as a String"));
EXTERN char e_using_rcurly_outside_if_block_scope[]