mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.2357: Vim9: crash when parsing function return type fails
Problem: Vim9: crash when parsing function return type fails. Solution: Bail out and set return type to "unknown". (closes #7685)
This commit is contained in:
@@ -3886,6 +3886,12 @@ define_function(exarg_T *eap, char_u *name_arg)
|
||||
{
|
||||
p = ret_type;
|
||||
fp->uf_ret_type = parse_type(&p, &fp->uf_type_list, TRUE);
|
||||
if (fp->uf_ret_type == NULL)
|
||||
{
|
||||
fp->uf_ret_type = &t_void;
|
||||
SOURCING_LNUM = lnum_save;
|
||||
goto erret;
|
||||
}
|
||||
}
|
||||
SOURCING_LNUM = lnum_save;
|
||||
}
|
||||
|
Reference in New Issue
Block a user