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:
@@ -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 = {}
|
||||
|
Reference in New Issue
Block a user