patch 8.2.1915: Vim9: error for wrong number of arguments is not useful
Problem: Vim9: error for wrong number of arguments is not useful.
Solution: Mention whatever we have for the name. (closes #7208)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 60b55d5..225d5d5 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1687,12 +1687,12 @@
if (argcount < type->tt_min_argcount - varargs)
{
- semsg(_(e_toofewarg), "[reference]");
+ semsg(_(e_toofewarg), name);
return FAIL;
}
if (!varargs && argcount > type->tt_argcount)
{
- semsg(_(e_toomanyarg), "[reference]");
+ semsg(_(e_toomanyarg), name);
return FAIL;
}
}