0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0477: Vim9: error messages not tested

Problem:    Vim9: error messages not tested.
Solution:   Add more tests.
This commit is contained in:
Bram Moolenaar
2020-03-29 18:40:30 +02:00
parent 52ea92b19d
commit c58164c5cf
3 changed files with 29 additions and 1 deletions

View File

@@ -1612,7 +1612,21 @@ call_def_function(
case ISN_NEGATENR:
tv = STACK_TV_BOT(-1);
tv->vval.v_number = -tv->vval.v_number;
if (tv->v_type != VAR_NUMBER
#ifdef FEAT_FLOAT
&& tv->v_type != VAR_FLOAT
#endif
)
{
emsg(_(e_number_exp));
goto failed;
}
#ifdef FEAT_FLOAT
if (tv->v_type == VAR_FLOAT)
tv->vval.v_float = -tv->vval.v_float;
else
#endif
tv->vval.v_number = -tv->vval.v_number;
break;
case ISN_CHECKNR: