patch 8.2.1980: Vim9: some tests are not done at the script level
Problem: Vim9: some tests are not done at the script level.
Solution: Use CheckDefAndScriptSuccess() in more places. Fix uncovered
problems.
diff --git a/src/eval.c b/src/eval.c
index dc77153..0365adc 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3438,7 +3438,15 @@
}
#ifdef FEAT_FLOAT
if (rettv->v_type == VAR_FLOAT)
- f = !f;
+ {
+ if (in_vim9script())
+ {
+ rettv->v_type = VAR_BOOL;
+ val = f == 0.0 ? VVAL_TRUE : VVAL_FALSE;
+ }
+ else
+ f = !f;
+ }
else
#endif
{