1
0
forked from aniani/vim

patch 8.2.3150: Vim9: argument types are not checked at compile time

Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add more type checks. (Yegappan Lakshmanan, closes #8545)
This commit is contained in:
Yegappan Lakshmanan
2021-07-11 19:44:18 +02:00
committed by Bram Moolenaar
parent cc7eb2aa7a
commit c72bdd28ac
4 changed files with 118 additions and 21 deletions

View File

@@ -824,6 +824,9 @@ f_assert_report(typval_T *argvars, typval_T *rettv)
{
garray_T ga;
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
prepare_assert_error(&ga);
ga_concat(&ga, tv_get_string(&argvars[0]));
assert_error(&ga);