Mercurial > vim
changeset 21588:9ade1da22402 v8.2.1344
patch 8.2.1344: Vim9: No test for trying to redefine global function
Commit: https://github.com/vim/vim/commit/2c79e9d14dc0e61d8c357946d01107ec23ec0fe2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 1 18:57:52 2020 +0200
patch 8.2.1344: Vim9: No test for trying to redefine global function
Problem: Vim9: No test for trying to redefine global function.
Solution: Add a test.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Aug 2020 19:00:04 +0200 |
parents | 5a1fbb77df55 |
children | a38f99a23aa8 |
files | src/testdir/test_vim9_func.vim src/version.c |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -159,6 +159,19 @@ def Test_nested_global_function() delfunc g:Inner END CheckScriptSuccess(lines) + + lines =<< trim END + vim9script + def Outer() + def g:Inner(): string + return 'inner' + enddef + enddef + defcompile + Outer() + Outer() + END + CheckScriptFailure(lines, "E122:") enddef def Test_global_local_function()