diff --git a/src/eval.c b/src/eval.c index 71bd353701..488818a4b0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -5417,14 +5417,9 @@ eval9_leader( } if (rettv->v_type == VAR_FLOAT) { - if (vim9script) - { - rettv->v_type = VAR_BOOL; - val = f == 0.0 ? VVAL_TRUE : VVAL_FALSE; - type = VAR_BOOL; - } - else - f = !f; + rettv->v_type = VAR_BOOL; + val = f == 0.0 ? VVAL_TRUE : VVAL_FALSE; + type = VAR_BOOL; } else { diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim index 0be53dc5a3..a79c682791 100644 --- a/src/testdir/test_vimscript.vim +++ b/src/testdir/test_vimscript.vim @@ -7086,7 +7086,11 @@ func Test_compound_assignment_operators() call assert_fails('let x %= 0.5', 'E734:') call assert_fails('let x .= "f"', 'E734:') let x = !3.14 - call assert_equal(0.0, x) + call assert_equal(0, x) + call assert_equal(1, !!1.0) + let x = !0.0 + call assert_equal(1, x) + call assert_equal(0, !!0.0) " integer and float operations let x = 1 diff --git a/src/version.c b/src/version.c index 78ae26eef0..5dc95056bb 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2123, /**/ 2122, /**/