summaryrefslogtreecommitdiff
path: root/src/vim9expr.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-23 11:29:15 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-23 11:29:15 +0000
commita915fa010330ee7212e06d3511acd363d04d2d28 (patch)
tree632c812369ceff7cfb07ea46358ebfb010868943 /src/vim9expr.c
parent81b573d7e55bd48988f298ce8e652d902e9bdeba (diff)
downloadvim-git-a915fa010330ee7212e06d3511acd363d04d2d28.tar.gz
patch 8.2.4612: Vim9: cannot use a recursive call in a nested functionv8.2.4612
Problem: Vim9: cannot use a recursive call in a nested function. (Sergey Vlasov) Solution: Define the funcref before compiling the function. (closes #9989)
Diffstat (limited to 'src/vim9expr.c')
-rw-r--r--src/vim9expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vim9expr.c b/src/vim9expr.c
index 3a329ccf4..8c7d0b0e9 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -1040,7 +1040,7 @@ compile_lambda(char_u **arg, cctx_T *cctx)
// 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);