patch 8.2.2209: Vim9: return type of => lambda not parsed
Problem: Vim9: return type of => lambda not parsed.
Solution: Parse and use the return type.
diff --git a/src/vim9script.c b/src/vim9script.c
index fa455ab..163b8a7 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -511,7 +511,6 @@
char_u *name;
scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid);
type_T *type;
- int called_emsg_before = called_emsg;
typval_T init_tv;
if (eap->cmdidx == CMD_final || eap->cmdidx == CMD_const)
@@ -548,8 +547,8 @@
// parse type
p = skipwhite(p + 1);
- type = parse_type(&p, &si->sn_type_list);
- if (called_emsg != called_emsg_before)
+ type = parse_type(&p, &si->sn_type_list, TRUE);
+ if (type == NULL)
{
vim_free(name);
return p;