1
0
forked from aniani/vim

patch 8.2.2405: Vim9: no need to allow white space before "(" for :def

Problem:    Vim9: no need to allow white space before "(" for :def.
Solution:   Give an error for stray white space. (issue #7734)
This commit is contained in:
Bram Moolenaar
2021-01-24 21:14:20 +01:00
parent 107e9cecf7
commit 4efd994829
3 changed files with 40 additions and 0 deletions

View File

@@ -116,6 +116,38 @@ def Test_missing_endfunc_enddef()
CheckScriptFailure(lines, 'E126:', 2)
enddef
def Test_white_space_before_paren()
var lines =<< trim END
vim9script
def Test ()
echo 'test'
enddef
END
CheckScriptFailure(lines, 'E1068:', 2)
lines =<< trim END
vim9script
func Test ()
echo 'test'
endfunc
END
CheckScriptFailure(lines, 'E1068:', 2)
lines =<< trim END
def Test ()
echo 'test'
enddef
END
CheckScriptFailure(lines, 'E1068:', 1)
lines =<< trim END
func Test ()
echo 'test'
endfunc
END
CheckScriptSuccess(lines)
enddef
def Test_enddef_dict_key()
var d = {
enddef: 'x',