vim-patch:partial:9.0.0359: error message for wrong argument type is not specific (#23315)

Problem:    Error message for wrong argument type is not specific.
Solution:   Include more information in the error. (Yegappan Lakshmanan,
            closes vim/vim#11037)

8deb2b30c7

Skip reduce() and deepcopy() changes because of missing patches.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2023-04-25 23:39:15 +08:00
committed by GitHub
parent ac9f8669a8
commit 7e0d668012
10 changed files with 79 additions and 45 deletions

View File

@@ -2406,15 +2406,12 @@ void f_sign_unplace(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
rettv->vval.v_number = -1;
if (argvars[0].v_type != VAR_STRING) {
emsg(_(e_invarg));
if (tv_check_for_string_arg(argvars, 0) == FAIL
|| tv_check_for_opt_dict_arg(argvars, 1) == FAIL) {
return;
}
if (argvars[1].v_type != VAR_UNKNOWN) {
if (tv_check_for_dict_arg(argvars, 1) == FAIL) {
return;
}
dict = argvars[1].vval.v_dict;
}