patch 8.2.2635: Vim9: cannot define an inline function
Problem: Vim9: cannot define an inline function.
Solution: Make an inline function mostly work.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 238ce5d..09b1fce 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3171,7 +3171,7 @@
/*
* Parse a lambda: "(arg, arg) => expr"
- * "*arg" points to the '{'.
+ * "*arg" points to the '('.
* Returns OK/FAIL when a lambda is recognized, NOTDONE if it's not a lambda.
*/
static int
@@ -5126,6 +5126,13 @@
}
}
+ void
+fill_exarg_from_cctx(exarg_T *eap, cctx_T *cctx)
+{
+ eap->getline = exarg_getline;
+ eap->cookie = cctx;
+}
+
/*
* Compile a nested :def command.
*/
@@ -5176,9 +5183,8 @@
return NULL;
eap->arg = name_end;
- eap->getline = exarg_getline;
- eap->cookie = cctx;
- eap->skip = cctx->ctx_skip == SKIP_YES;
+ fill_exarg_from_cctx(eap, cctx);
+
eap->forceit = FALSE;
lambda_name = vim_strsave(get_lambda_name());
if (lambda_name == NULL)