patch 8.2.2744: Vim9: no way to explicitly ignore an argument
Problem: Vim9: no way to explicitly ignore an argument.
Solution: Use the underscore as the name for an ignored argument.
diff --git a/src/eval.c b/src/eval.c
index 05b6584..fe9d4ec 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3514,7 +3514,12 @@
{
int flags = evalarg == NULL ? 0 : evalarg->eval_flags;
- if ((in_vim9script() ? **arg : *skipwhite(*arg)) == '(')
+ if (in_vim9script() && len == 1 && *s == '_')
+ {
+ emsg(_(e_cannot_use_underscore_here));
+ ret = FAIL;
+ }
+ else if ((in_vim9script() ? **arg : *skipwhite(*arg)) == '(')
{
// "name(..." recursive!
*arg = skipwhite(*arg);