0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.4589: cannot index the g: dictionary

Problem:    Cannot index the g: dictionary.
Solution:   Recognize using "g:[key]". (closes #9969)
This commit is contained in:
Bram Moolenaar
2022-03-18 19:44:48 +00:00
parent f35fd8e5d4
commit 2e17fef225
5 changed files with 29 additions and 9 deletions

View File

@@ -1116,6 +1116,14 @@ def Test_assignment_dict()
END
v9.CheckDefAndScriptSuccess(lines)
lines =<< trim END
var key = 'foo'
g:[key] = 'value'
assert_equal('value', g:foo)
unlet g:foo
END
v9.CheckDefAndScriptSuccess(lines)
lines =<< trim END
var dd = {one: 1}
dd.one) = 2