diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-24 13:54:45 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-24 13:54:45 +0000 |
commit | acc4b5648b49ec13c4f35ee0bf552eda71b0c372 (patch) | |
tree | 1d39323dfdfb6cec204d7a342dc6a70bf010fb91 /src/vim9compile.c | |
parent | 8e4af851fd3eff4b22fca962e5be783742e8f1bb (diff) | |
download | vim-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/vim9compile.c')
-rw-r--r-- | src/vim9compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c index 2b706ad18..9ad1e7ddc 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -332,7 +332,7 @@ check_defined(char_u *p, size_t len, cctx_T *cctx, int is_arg) && (lookup_local(p, len, NULL, cctx) == OK || arg_exists(p, len, NULL, NULL, NULL, cctx) == OK)) || find_imported(p, len, FALSE, cctx) != NULL - || (ufunc = find_func_even_dead(p, FALSE)) != NULL) + || (ufunc = find_func_even_dead(p, 0)) != NULL) { // A local or script-local function can shadow a global function. if (ufunc == NULL || ((ufunc->uf_flags & FC_DEAD) == 0 |