diff 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
line wrap: on
line diff
--- a/src/testdir/test_eval_stuff.vim
+++ b/src/testdir/test_eval_stuff.vim
@@ -176,6 +176,13 @@ func Test_vvar_scriptversion2()
   call assert_true(v:versionlong > 8011525)
 endfunc
 
+func Test_dict_access_scriptversion2()
+  let l:x = {'foo': 1}
+
+  call assert_false(0 && l:x.foo)
+  call assert_true(1 && l:x.foo)
+endfunc
+
 func Test_scriptversion()
   call writefile(['scriptversion 9'], 'Xversionscript')
   call assert_fails('source Xversionscript', 'E999:')