diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2024-04-15 19:19:52 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-04-15 19:19:52 +0200 |
commit | bce51d9005dd1c5bc002acbac2e12b649abcb013 (patch) | |
tree | 046a2767183c0fd9eff9249fd44ed676db906de3 /src/vim9compile.c | |
parent | a59e031aa0bdc5cc3d1f4ed719126bf1a1b858ce (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/vim9compile.c')
-rw-r--r-- | src/vim9compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c index 7e1d911c1c..0e05f820c5 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -1222,7 +1222,7 @@ compile_one_expr_in_str(char_u *p, cctx_T *cctx) } if (compile_expr0(&block_start, cctx) == FAIL) return NULL; - may_generate_2STRING(-1, TRUE, cctx); + may_generate_2STRING(-1, TOSTRING_INTERPOLATE, cctx); return block_end + 1; } @@ -2421,7 +2421,7 @@ compile_assign_unlet( return FAIL; } if (dest_type == VAR_DICT - && may_generate_2STRING(-1, FALSE, cctx) == FAIL) + && may_generate_2STRING(-1, TOSTRING_NONE, cctx) == FAIL) return FAIL; if (dest_type == VAR_LIST || dest_type == VAR_BLOB) { @@ -2975,7 +2975,7 @@ compile_assignment( if (*op == '.') { - if (may_generate_2STRING(-1, FALSE, cctx) == FAIL) + if (may_generate_2STRING(-1, TOSTRING_NONE, cctx) == FAIL) goto theend; } else |