forked from aniani/vim
patch 8.2.3066: Vim9: debugging lambda does not work
Problem: Vim9: debugging lambda does not work. Solution: Use the compile type of the function when compiling a lambda. (closes #8412)
This commit is contained in:
@@ -3622,7 +3622,7 @@ compile_lambda(char_u **arg, cctx_T *cctx)
|
||||
// compile_return().
|
||||
if (ufunc->uf_ret_type->tt_type == VAR_VOID)
|
||||
ufunc->uf_ret_type = &t_unknown;
|
||||
compile_def_function(ufunc, FALSE, COMPILE_TYPE(ufunc), cctx);
|
||||
compile_def_function(ufunc, FALSE, cctx->ctx_compile_type, cctx);
|
||||
|
||||
// evalarg.eval_tofree_cmdline may have a copy of the last line and "*arg"
|
||||
// points into it. Point to the original line to avoid a dangling pointer.
|
||||
|
Reference in New Issue
Block a user