Patch 8.2.2718
Problem: Vim9: no explicit test for using a global function without the g:
prefix.
Solution: Add a test case.
Files: src/testdir/test_vim9_func.vim
*** ../vim-8.2.2717/src/testdir/test_vim9_func.vim 2021-03-29
22:14:45.608788413 +0200
--- src/testdir/test_vim9_func.vim 2021-04-05 15:38:07.413689843 +0200
***************
*** 621,626 ****
--- 621,650 ----
END
CheckScriptFailure(lines, 'E705:')
delfunc g:Func
+
+ # global function is found without g: prefix
+ lines =<< trim END
+ vim9script
+ def g:Func(): string
+ return 'global'
+ enddef
+ def AnotherFunc(): string
+ return Func()
+ enddef
+ assert_equal('global', AnotherFunc())
+ delfunc g:Func
+ END
+ CheckScriptSuccess(lines)
+
+ lines =<< trim END
+ vim9script
+ def g:Func(): string
+ return 'global'
+ enddef
+ assert_equal('global', Func())
+ delfunc g:Func
+ END
+ CheckScriptSuccess(lines)
enddef
func TakesOneArg(arg)
*** ../vim-8.2.2717/src/version.c 2021-04-05 14:13:16.405977713 +0200
--- src/version.c 2021-04-05 15:29:03.691222034 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2718,
/**/
--
hundred-and-one symptoms of being an internet addict:
61. Your best friends know your e-mail address, but neither your phone number
nor the address where you live.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202104051339.135DdHTa3071257%40masaka.moolenaar.net.