mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.2252: Vim9: crash when using lambda without return type in dict
Problem: Vim9: crash when using lambda without return type in dict. Solution: Without a return type use t_unknown. (closes #7587)
This commit is contained in:
@@ -4837,7 +4837,8 @@ compile_return(char_u *arg, int check_return_type, cctx_T *cctx)
|
||||
if (cctx->ctx_skip != SKIP_YES)
|
||||
{
|
||||
stack_type = ((type_T **)stack->ga_data)[stack->ga_len - 1];
|
||||
if (check_return_type && cctx->ctx_ufunc->uf_ret_type == NULL)
|
||||
if (check_return_type && (cctx->ctx_ufunc->uf_ret_type == NULL
|
||||
|| cctx->ctx_ufunc->uf_ret_type == &t_unknown))
|
||||
{
|
||||
cctx->ctx_ufunc->uf_ret_type = stack_type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user