To: vim_dev@googlegroups.com Subject: Patch 8.2.2718 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///