summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-05-09 23:19:22 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-09 23:19:22 +0200
commit68db996b621b98066fb7ab7028ed5c6aaa3954a8 (patch)
tree1f2bdef2e7049b051dcbe12c5effde327322b3eb /src/evalfunc.c
parent918b08957c51ae079f8f456198f8a1869a3d2a4c (diff)
patch 8.2.2846: Vim9: "echo Func()" does not give an error for using voidv8.2.2846
Problem: Vim9: "echo Func()" does not give an error for a function without a return value. Solution: Give an error. Be more specific about why a value is invalid.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index a0caf3dce8..6a2244961e 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3175,7 +3175,8 @@ execute_common(typval_T *argvars, typval_T *rettv, int arg_off)
else if (argvars[arg_off].v_type == VAR_JOB
|| argvars[arg_off].v_type == VAR_CHANNEL)
{
- emsg(_(e_inval_string));
+ semsg(_(e_using_invalid_value_as_string_str),
+ vartype_name(argvars[arg_off].v_type));
return;
}
else