comparison src/testing.c @ 20189:63cc54100ae4 v8.2.0650

patch 8.2.0650: Vim9: script function can be deleted Commit: https://github.com/vim/vim/commit/4c17ad94ecb0a0fb26d6fface2614bc5172dea18 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 27 22:47:51 2020 +0200 patch 8.2.0650: Vim9: script function can be deleted Problem: Vim9: script function can be deleted. Solution: Disallow deleting script function. Delete functions when sourcing a script again.
author Bram Moolenaar <Bram@vim.org>
date Mon, 27 Apr 2020 23:00:03 +0200
parents 1f42c49c3d29
children 1af1d8ff2aa8
comparison
equal deleted inserted replaced
20188:085eb4da46f4 20189:63cc54100ae4
787 case VAR_FUNC: 787 case VAR_FUNC:
788 if (argvars[0].vval.v_string != NULL) 788 if (argvars[0].vval.v_string != NULL)
789 { 789 {
790 ufunc_T *fp; 790 ufunc_T *fp;
791 791
792 fp = find_func(argvars[0].vval.v_string, NULL); 792 fp = find_func(argvars[0].vval.v_string, FALSE, NULL);
793 if (fp != NULL) 793 if (fp != NULL)
794 retval = fp->uf_refcount; 794 retval = fp->uf_refcount;
795 } 795 }
796 break; 796 break;
797 case VAR_PARTIAL: 797 case VAR_PARTIAL: