Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
28172:f5cd730da5b6 | 28173:b0c885507de4 |
---|---|
1038 set_function_type(ufunc); | 1038 set_function_type(ufunc); |
1039 | 1039 |
1040 // The function reference count will be 1. When the ISN_FUNCREF | 1040 // The function reference count will be 1. When the ISN_FUNCREF |
1041 // instruction is deleted the reference count is decremented and the | 1041 // instruction is deleted the reference count is decremented and the |
1042 // function is freed. | 1042 // function is freed. |
1043 return generate_FUNCREF(cctx, ufunc); | 1043 return generate_FUNCREF(cctx, ufunc, NULL); |
1044 } | 1044 } |
1045 | 1045 |
1046 func_ptr_unref(ufunc); | 1046 func_ptr_unref(ufunc); |
1047 return FAIL; | 1047 return FAIL; |
1048 } | 1048 } |