# HG changeset patch # User Bram Moolenaar # Date 1596313805 -7200 # Node ID 622021f43db1368d3243299fc4232ddb80b7cad6 # Parent 322067462eaf2c87edccdfe4fe72fba673833bca patch 8.2.1350: Vim9: no test for error message when redefining function Commit: https://github.com/vim/vim/commit/b9a2cac3ef293bfdfe80dea6c6d16d02b7af5435 Author: Bram Moolenaar Date: Sat Aug 1 22:23:20 2020 +0200 patch 8.2.1350: Vim9: no test for error message when redefining function Problem: Vim9: no test for error message when redefining function. Solution: Add a test. diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -1651,6 +1651,19 @@ def Test_func_overrules_import_fails() delete('XexportedFunc.vim') enddef +def Test_func_redefine_fails() + let lines =<< trim END + vim9script + def Func() + echo 'one' + enddef + def Func() + echo 'two' + enddef + END + CheckScriptFailure(lines, 'E1073:') +enddef + def Test_fixed_size_list() # will be allocated as one piece of memory, check that changes work let l = [1, 2, 3, 4] 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 */ /**/ + 1350, +/**/ 1349, /**/ 1348,