patch 9.1.0335: String interpolation fails for List type
Problem: String interpolation fails for List type
Solution: use implicit string(list) for string interpolation and :put =
(Yegappan Lakshmanan)
related: #14529
closes: #14556
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/vim9cmds.c b/src/vim9cmds.c
index ad245b9..694bb33 100644
--- a/src/vim9cmds.c
+++ b/src/vim9cmds.c
@@ -1931,7 +1931,7 @@
return NULL;
if (cctx->ctx_skip == SKIP_YES)
return p;
- if (may_generate_2STRING(-1, FALSE, cctx) == FAIL)
+ if (may_generate_2STRING(-1, TOSTRING_NONE, cctx) == FAIL)
return NULL;
if (generate_instr_drop(cctx, ISN_THROW, 1) == NULL)
return NULL;
@@ -2359,7 +2359,7 @@
p += 2;
if (compile_expr0(&p, cctx) == FAIL)
return NULL;
- may_generate_2STRING(-1, TRUE, cctx);
+ may_generate_2STRING(-1, TOSTRING_TOLERANT, cctx);
++count;
p = skipwhite(p);
if (*p != '`')