0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2168: Vim9: error for assigning to dict of dict

Problem:    Vim9: error for assigning to dict of dict.
Solution:   Remember the destination type. (closes #7506)
This commit is contained in:
Bram Moolenaar
2020-12-20 15:20:56 +01:00
parent d88dc4d4e9
commit d24602f43c
3 changed files with 15 additions and 5 deletions

View File

@@ -560,6 +560,12 @@ def Test_assignment_dict()
dict3.key = 'yet another'
assert_equal(dict3, {key: 'yet another'})
# member "any" can also be a dict and assigned to
var anydict: dict<any> = {nest: {}, nr: 0}
anydict.nest['this'] = 123
anydict.nest.that = 456
assert_equal({nest: {this: 123, that: 456}, nr: 0}, anydict)
var lines =<< trim END
vim9script
var dd = {}