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.
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index f3721ba..2ee91f1 100644
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -353,7 +353,7 @@
def Test_delfunc()
let lines =<< trim END
vim9script
- def GoneSoon()
+ def g:GoneSoon()
echo 'hello'
enddef
@@ -361,7 +361,7 @@
GoneSoon()
enddef
- delfunc GoneSoon
+ delfunc g:GoneSoon
CallGoneSoon()
END
writefile(lines, 'XToDelFunc')