patch 9.1.0329: String interpolation fails for Dict type
Problem: String interpolation fails for Dict type
Solution: Support Dict data type properly, also support :put =Dict
(without having to convert it to string() first)
(Yegappan Lakshmanan)
fixes: #14529
closes: #14541
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index c1869c1..1fa460d 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -950,6 +950,10 @@
endif
call assert_equal(0, tmp)
+ #" Dict interpolation
+ VAR d = {'a': 10, 'b': [1, 2]}
+ call assert_equal("{'a': 10, 'b': [1, 2]}", $'{d}')
+
#" Stray closing brace.
call assert_fails('echo $"moo}"', 'E1278:')
#" Undefined variable in expansion.