mirror of
https://github.com/vim/vim.git
synced 2025-10-18 07:54:29 -04:00
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)
This commit is contained in:
@@ -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:')
|
||||
|
Reference in New Issue
Block a user