summaryrefslogtreecommitdiff
path: root/src/vim9instr.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-24 13:54:45 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-24 13:54:45 +0000
commitacc4b5648b49ec13c4f35ee0bf552eda71b0c372 (patch)
tree1d39323dfdfb6cec204d7a342dc6a70bf010fb91 /src/vim9instr.c
parent8e4af851fd3eff4b22fca962e5be783742e8f1bb (diff)
downloadvim-git-acc4b5648b49ec13c4f35ee0bf552eda71b0c372.tar.gz
patch 8.2.4202: Vim9: cannot export function that exists globallyv8.2.4202
Problem: Vim9: cannot export function that exists globally. Solution: When checking if a function already exists only check for script-local functions. (closes #9615)
Diffstat (limited to 'src/vim9instr.c')
-rw-r--r--src/vim9instr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vim9instr.c b/src/vim9instr.c
index 493683acb..b6e28b0b9 100644
--- a/src/vim9instr.c
+++ b/src/vim9instr.c
@@ -2050,7 +2050,7 @@ delete_instr(isn_T *isn)
case ISN_NEWFUNC:
{
char_u *lambda = isn->isn_arg.newfunc.nf_lambda;
- ufunc_T *ufunc = find_func_even_dead(lambda, TRUE);
+ ufunc_T *ufunc = find_func_even_dead(lambda, FFED_IS_GLOBAL);
if (ufunc != NULL)
{