diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-05-09 23:19:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-09 23:19:22 +0200 |
commit | 68db996b621b98066fb7ab7028ed5c6aaa3954a8 (patch) | |
tree | 1f2bdef2e7049b051dcbe12c5effde327322b3eb /src/evalfunc.c | |
parent | 918b08957c51ae079f8f456198f8a1869a3d2a4c (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.c | 3 |
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 |