diff src/vim9instr.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 6ed31017c303
children 1a6421c5be20
line wrap: on
line diff
--- 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)
 		{