comparison src/testdir/test_eval_stuff.vim @ 17448:f8cd16838434 v8.1.1722

patch 8.1.1722: error when scriptversion is 2 a making a dictionary access commit https://github.com/vim/vim/commit/61343f0c44c8e71df04918d033e0a744c0b7f8aa Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 20 21:11:13 2019 +0200 patch 8.1.1722: error when scriptversion is 2 a making a dictionary access Problem: Error when scriptversion is 2 a making a dictionary access. Solution: Parse the subscript even when not evaluating the sub-expression. (closes #4704)
author Bram Moolenaar <Bram@vim.org>
date Sat, 20 Jul 2019 21:15:04 +0200
parents d5fa04016df0
children 2029737e6a22
comparison
equal deleted inserted replaced
17447:c8bdaff91140 17448:f8cd16838434
174 174
175 call assert_equal(v:version, v:versionlong / 10000) 175 call assert_equal(v:version, v:versionlong / 10000)
176 call assert_true(v:versionlong > 8011525) 176 call assert_true(v:versionlong > 8011525)
177 endfunc 177 endfunc
178 178
179 func Test_dict_access_scriptversion2()
180 let l:x = {'foo': 1}
181
182 call assert_false(0 && l:x.foo)
183 call assert_true(1 && l:x.foo)
184 endfunc
185
179 func Test_scriptversion() 186 func Test_scriptversion()
180 call writefile(['scriptversion 9'], 'Xversionscript') 187 call writefile(['scriptversion 9'], 'Xversionscript')
181 call assert_fails('source Xversionscript', 'E999:') 188 call assert_fails('source Xversionscript', 'E999:')
182 call delete('Xversionscript') 189 call delete('Xversionscript')
183 endfunc 190 endfunc