patch 8.2.4260: Vim9: can still use a global function without g:
Problem: Vim9: can still use a global function without g: at the script
level.
Solution: Also check for g: at the script level. (issue #9637)
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index 5fbdef8..41aaa28 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -887,7 +887,7 @@
enddef
-def HasEval()
+def s:HasEval()
if has("eval")
echo "yes"
else
@@ -895,7 +895,7 @@
endif
enddef
-def HasNothing()
+def s:HasNothing()
if has("nothing")
echo "yes"
else
@@ -903,7 +903,7 @@
endif
enddef
-def HasSomething()
+def s:HasSomething()
if has("nothing")
echo "nothing"
elseif has("something")
@@ -915,7 +915,7 @@
endif
enddef
-def HasGuiRunning()
+def s:HasGuiRunning()
if has("gui_running")
echo "yes"
else
@@ -2487,7 +2487,7 @@
res)
enddef
-func Legacy() dict
+func s:Legacy() dict
echo 'legacy'
endfunc
@@ -2501,7 +2501,7 @@
assert_match('<SNR>\d*_UseMember\_s*' ..
'var d = {func: Legacy}\_s*' ..
'\d PUSHS "func"\_s*' ..
- '\d PUSHFUNC "g:Legacy"\_s*' ..
+ '\d PUSHFUNC "<80><fd>R\d\+_Legacy"\_s*' ..
'\d NEWDICT size 1\_s*' ..
'\d STORE $0\_s*' ..