patch 8.1.1692: using *{} for literal dict is not backwards compatible
Problem: Using *{} for literal dict is not backwards compatible. (Yasuhiro
Matsumoto)
Solution: Use ~{} instead.
diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim
index 56c84a2..20a31de 100644
--- a/src/testdir/test_listdict.vim
+++ b/src/testdir/test_listdict.vim
@@ -281,8 +281,11 @@
endfunc
func Test_dict_literal_keys()
- call assert_equal({'one': 1, 'two2': 2, '3three': 3, '44': 4}, *{one: 1, two2: 2, 3three: 3, 44: 4},)
- call assert_equal('2 3', trim(execute('echo 2 *{blue: 3}.blue')))
+ call assert_equal({'one': 1, 'two2': 2, '3three': 3, '44': 4}, ~{one: 1, two2: 2, 3three: 3, 44: 4},)
+
+ " why *{} cannot be used
+ let blue = 'blue'
+ call assert_equal('6', trim(execute('echo 2 *{blue: 3}.blue')))
endfunc
" Nasty: deepcopy() dict that refers to itself (fails when noref used)