Problem: Vim9: error when adding 1 to float.
Solution: Accept t_number_bool. (closes #8687)
g:inc_counter += 1
assert_equal(2, g:inc_counter)
+ if has('float')
+ var f: float
+ f += 1
+ assert_equal(1.0, f)
+ endif
+
$SOME_ENV_VAR ..= 'more'
assert_equal('somemore', $SOME_ENV_VAR)
CheckDefFailure(['$SOME_ENV_VAR += "more"'], 'E1051:')
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3278,
/**/
3277,
/**/
if (
#ifdef FEAT_FLOAT
// If variable is float operation with number is OK.
- !(expected == &t_float && stacktype == &t_number) &&
+ !(expected == &t_float && (stacktype == &t_number
+ || stacktype == &t_number_bool)) &&
#endif
need_type(stacktype, expected, -1, 0, cctx,
FALSE, FALSE) == FAIL)