patch 8.2.1071: Vim9: no line break allowed inside a lambda
Problem: Vim9: no line break allowed inside a lambda.
Solution: Handle line break inside a lambda in Vim9 script.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 5d03e0f..d37c5c9 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3001,7 +3001,7 @@
}
else if (p == arg && *arg == '{')
{
- int ret = get_lambda_tv(&p, &rettv, FALSE);
+ int ret = get_lambda_tv(&p, &rettv, NULL);
// Can be "{x -> ret}()".
// Can be "{'a': 1}->Func()".
@@ -3065,7 +3065,7 @@
ufunc_T *ufunc;
// Get the funcref in "rettv".
- if (get_lambda_tv(arg, &rettv, TRUE) != OK)
+ if (get_lambda_tv(arg, &rettv, &EVALARG_EVALUATE) != OK)
return FAIL;
ufunc = rettv.vval.v_partial->pt_func;
@@ -3095,7 +3095,7 @@
int ret = FAIL;
// Get the funcref in "rettv".
- if (get_lambda_tv(arg, &rettv, TRUE) == FAIL)
+ if (get_lambda_tv(arg, &rettv, &EVALARG_EVALUATE) == FAIL)
return FAIL;
if (**arg != '(')