Mercurial > vim
diff src/vim9expr.c @ 28173:b0c885507de4 v8.2.4612
patch 8.2.4612: Vim9: cannot use a recursive call in a nested function
Commit: https://github.com/vim/vim/commit/a915fa010330ee7212e06d3511acd363d04d2d28
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 23 11:29:15 2022 +0000
patch 8.2.4612: Vim9: cannot use a recursive call in a nested function
Problem: Vim9: cannot use a recursive call in a nested function. (Sergey
Vlasov)
Solution: Define the funcref before compiling the function. (closes #9989)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Mar 2022 12:30:04 +0100 |
parents | d54541ce3e1b |
children | 662d2d5db9a6 |
line wrap: on
line diff
--- a/src/vim9expr.c +++ b/src/vim9expr.c @@ -1040,7 +1040,7 @@ compile_lambda(char_u **arg, cctx_T *cct // The function reference count will be 1. When the ISN_FUNCREF // instruction is deleted the reference count is decremented and the // function is freed. - return generate_FUNCREF(cctx, ufunc); + return generate_FUNCREF(cctx, ufunc, NULL); } func_ptr_unref(ufunc);