summaryrefslogtreecommitdiffstats
path: root/src/vim9expr.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2024-04-15 19:19:52 +0200
committerChristian Brabandt <cb@256bit.org>2024-04-15 19:19:52 +0200
commitbce51d9005dd1c5bc002acbac2e12b649abcb013 (patch)
tree046a2767183c0fd9eff9249fd44ed676db906de3 /src/vim9expr.c
parenta59e031aa0bdc5cc3d1f4ed719126bf1a1b858ce (diff)
patch 9.1.0335: String interpolation fails for List typev9.1.0335
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>
Diffstat (limited to 'src/vim9expr.c')
-rw-r--r--src/vim9expr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vim9expr.c b/src/vim9expr.c
index 97a7f4e08a..ac4d836229 100644
--- a/src/vim9expr.c
+++ b/src/vim9expr.c
@@ -142,7 +142,7 @@ compile_member(int is_slice, int *keeping_dict, cctx_T *cctx)
typep->type_curr = &t_any;
typep->type_decl = &t_any;
}
- if (may_generate_2STRING(-1, FALSE, cctx) == FAIL
+ if (may_generate_2STRING(-1, TOSTRING_NONE, cctx) == FAIL
|| generate_instr_drop(cctx, ISN_MEMBER, 1) == FAIL)
return FAIL;
if (keeping_dict != NULL)
@@ -1598,7 +1598,7 @@ compile_dict(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
}
if (isn->isn_type == ISN_PUSHS)
key = isn->isn_arg.string;
- else if (may_generate_2STRING(-1, FALSE, cctx) == FAIL)
+ else if (may_generate_2STRING(-1, TOSTRING_NONE, cctx) == FAIL)
return FAIL;
*arg = skipwhite(*arg);
if (**arg != ']')
@@ -3014,8 +3014,8 @@ compile_expr6(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
ppconst->pp_is_const = FALSE;
if (*op == '.')
{
- if (may_generate_2STRING(-2, FALSE, cctx) == FAIL
- || may_generate_2STRING(-1, FALSE, cctx) == FAIL)
+ if (may_generate_2STRING(-2, TOSTRING_NONE, cctx) == FAIL
+ || may_generate_2STRING(-1, TOSTRING_NONE, cctx) == FAIL)
return FAIL;
if (generate_CONCAT(cctx, 2) == FAIL)
return FAIL;