Skip to content

Commit b9a2cac

Browse files
committed
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.
1 parent eef2102 commit b9a2cac

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/testdir/test_vim9_script.vim

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,6 +1651,19 @@ def Test_func_overrules_import_fails()
16511651
delete('XexportedFunc.vim')
16521652
enddef
16531653

1654+
def Test_func_redefine_fails()
1655+
let lines =<< trim END
1656+
vim9script
1657+
def Func()
1658+
echo 'one'
1659+
enddef
1660+
def Func()
1661+
echo 'two'
1662+
enddef
1663+
END
1664+
CheckScriptFailure(lines, 'E1073:')
1665+
enddef
1666+
16541667
def Test_fixed_size_list()
16551668
# will be allocated as one piece of memory, check that changes work
16561669
let l = [1, 2, 3, 4]

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1350,
757759
/**/
758760
1349,
759761
/**/

0 commit comments

Comments
 (0)