patch 8.2.2501: not always clear where an error is reported
Problem: Not always clear where an error is reported.
Solution: Add the where_T structure and pass it around. (closes #7796)
diff --git a/src/list.c b/src/list.c
index 4d33aa6..484ce74 100644
--- a/src/list.c
+++ b/src/list.c
@@ -698,7 +698,7 @@
listitem_T *ni;
if (l->lv_type != NULL && l->lv_type->tt_member != NULL
- && check_typval_type(l->lv_type->tt_member, tv, 0) == FAIL)
+ && check_typval_arg_type(l->lv_type->tt_member, tv, 0) == FAIL)
return FAIL;
ni = listitem_alloc();
if (ni == NULL)
@@ -2135,8 +2135,8 @@
}
if (filtermap == FILTERMAP_MAP)
{
- if (type != NULL && check_typval_type(type->tt_member,
- &newtv, 0) == FAIL)
+ if (type != NULL && check_typval_arg_type(
+ type->tt_member, &newtv, 0) == FAIL)
{
clear_tv(&newtv);
break;
@@ -2270,8 +2270,8 @@
if (filtermap != FILTERMAP_FILTER)
{
if (filtermap == FILTERMAP_MAP && type != NULL
- && check_typval_type(type->tt_member,
- &newtv, 0) == FAIL)
+ && check_typval_arg_type(
+ type->tt_member, &newtv, 0) == FAIL)
{
clear_tv(&newtv);
break;
@@ -2314,8 +2314,8 @@
}
if (filtermap == FILTERMAP_MAP)
{
- if (type != NULL && check_typval_type(type->tt_member,
- &newtv, 0) == FAIL)
+ if (type != NULL && check_typval_arg_type(
+ type->tt_member, &newtv, 0) == FAIL)
{
clear_tv(&newtv);
break;
@@ -2584,7 +2584,8 @@
}
else
item = NULL;
- if (type != NULL && check_typval_type(type, &argvars[1], 2) == FAIL)
+ if (type != NULL && check_typval_arg_type(
+ type, &argvars[1], 2) == FAIL)
goto theend;
list_extend(l1, l2, item);
@@ -2641,7 +2642,8 @@
else
action = (char_u *)"force";
- if (type != NULL && check_typval_type(type, &argvars[1], 2) == FAIL)
+ if (type != NULL && check_typval_arg_type(
+ type, &argvars[1], 2) == FAIL)
goto theend;
dict_extend(d1, d2, action);