comparison src/testdir/test_method.vim @ 17661:da7890e3359b v8.1.1828

patch 8.1.1828: not strict enough checking syntax of method invocation commit https://github.com/vim/vim/commit/5184132ec015f5889a3195d911e609d214f06bed Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 8 21:10:01 2019 +0200 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(.
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Aug 2019 21:15:05 +0200
parents 511a03fcdc78
children 06c3e15ad84d
comparison
equal deleted inserted replaced
17660:fc25327e28ea 17661:da7890e3359b
110 " too many arguments 110 " too many arguments
111 call assert_fails("eval 'one'->Partial('three', 'four')", 'E118:') 111 call assert_fails("eval 'one'->Partial('three', 'four')", 'E118:')
112 112
113 delfunc Concat 113 delfunc Concat
114 endfunc 114 endfunc
115
116 func Test_method_syntax()
117 eval [1, 2, 3] ->sort( )
118 eval [1, 2, 3]
119 \ ->sort(
120 \ )
121 call assert_fails('eval [1, 2, 3]-> sort()', 'E260:')
122 call assert_fails('eval [1, 2, 3]->sort ()', 'E274:')
123 call assert_fails('eval [1, 2, 3]-> sort ()', 'E260:')
124 endfunc