patch 8.0.0004
Problem: A string argument for function() that is not a function name
results in an error message with NULL. (Christian Brabandt)
Solution: Use the argument for the error message.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 7dd5c2a..3207441 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3612,7 +3612,7 @@
if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))
|| (is_funcref && trans_name == NULL))
- EMSG2(_(e_invarg2), s);
+ EMSG2(_(e_invarg2), use_string ? get_tv_string(&argvars[0]) : s);
/* Don't check an autoload name for existence here. */
else if (trans_name != NULL && (is_funcref
? find_func(trans_name) == NULL