# HG changeset patch # User Bram Moolenaar # Date 1596301204 -7200 # Node ID 9ade1da224023aa1f9fd6243159ce2d277e06aa6 # Parent 5a1fbb77df55dab168b859f3b7ae4684ecca74fd patch 8.2.1344: Vim9: No test for trying to redefine global function Commit: https://github.com/vim/vim/commit/2c79e9d14dc0e61d8c357946d01107ec23ec0fe2 Author: Bram Moolenaar 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. diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim --- 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() diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1344, +/**/ 1343, /**/ 1342,