0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 8.1.1828: not strict enough checking syntax of method invocation

Problem:    Not strict enough checking syntax of method invocation.
Solution:   Check there is no white space inside ->method(.
This commit is contained in:
Bram Moolenaar
2019-08-08 21:10:01 +02:00
parent 47ed553fd5
commit 5184132ec0
4 changed files with 29 additions and 4 deletions

View File

@@ -112,3 +112,13 @@ func Test_method_funcref()
delfunc Concat
endfunc
func Test_method_syntax()
eval [1, 2, 3] ->sort( )
eval [1, 2, 3]
\ ->sort(
\ )
call assert_fails('eval [1, 2, 3]-> sort()', 'E260:')
call assert_fails('eval [1, 2, 3]->sort ()', 'E274:')
call assert_fails('eval [1, 2, 3]-> sort ()', 'E260:')
endfunc