Mercurial > vim
diff src/vim9compile.c @ 27348:9a9c34c84cd4 v8.2.4202
patch 8.2.4202: Vim9: cannot export function that exists globally
Commit: https://github.com/vim/vim/commit/acc4b5648b49ec13c4f35ee0bf552eda71b0c372
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 24 13:54:45 2022 +0000
patch 8.2.4202: Vim9: cannot export function that exists globally
Problem: Vim9: cannot export function that exists globally.
Solution: When checking if a function already exists only check for
script-local functions. (closes #9615)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 24 Jan 2022 15:00:04 +0100 |
parents | f7cb41ff22a4 |
children | 1aff400b819e |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -332,7 +332,7 @@ check_defined(char_u *p, size_t len, cct && (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