0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2642: Vim9: no clear error for wrong inline function

Problem:    Vim9: no clear error for wrong inline function.
Solution:   Check for something following the "{".
This commit is contained in:
Bram Moolenaar
2021-03-22 18:22:30 +01:00
parent 2cec027af4
commit e98f60a591
3 changed files with 13 additions and 1 deletions

View File

@@ -954,10 +954,15 @@ lambda_function_body(
int lnum_save = -1;
linenr_T sourcing_lnum_top = SOURCING_LNUM;
if (!ends_excmd2(*arg, skipwhite(*arg + 1)))
{
semsg(_(e_trailing_arg), *arg + 1);
return FAIL;
}
CLEAR_FIELD(eap);
eap.cmdidx = CMD_block;
eap.forceit = FALSE;
eap.arg = *arg + 1;
eap.cmdlinep = &cmdline;
eap.skip = !evaluate;
if (evalarg->eval_cctx != NULL)