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/eval.c b/src/eval.c
index d81ef17..51ee604 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -575,17 +575,16 @@
 
 /*
  * Convert "tv" to a string.
- * When "convert" is TRUE convert a List into a sequence of lines and a Dict
- * into a textual representation of the Dict.
+ * When "join_list" is TRUE convert a List into a sequence of lines.
  * Returns an allocated string (NULL when out of memory).
  */
     char_u *
-typval2string(typval_T *tv, int convert)
+typval2string(typval_T *tv, int join_list)
 {
     garray_T	ga;
     char_u	*retval;
 
-    if (convert && tv->v_type == VAR_LIST)
+    if (join_list && tv->v_type == VAR_LIST)
     {
 	ga_init2(&ga, sizeof(char), 80);
 	if (tv->vval.v_list != NULL)
@@ -597,8 +596,16 @@
 	ga_append(&ga, NUL);
 	retval = (char_u *)ga.ga_data;
     }
-    else if (convert && tv->v_type == VAR_DICT)
-	retval = dict2string(tv, get_copyID(), FALSE);
+    else if (tv->v_type == VAR_LIST || tv->v_type == VAR_DICT)
+    {
+	char_u	*tofree;
+	char_u	numbuf[NUMBUFLEN];
+
+	retval = tv2string(tv, &tofree, numbuf, 0);
+	// Make a copy if we have a value but it's not in allocated memory.
+	if (retval != NULL && tofree == NULL)
+	    retval = vim_strsave(retval);
+    }
     else
 	retval = vim_strsave(tv_get_string(tv));
     return retval;
@@ -607,13 +614,13 @@
 /*
  * Top level evaluation function, returning a string.  Does not handle line
  * breaks.
- * When "convert" is TRUE convert a List into a sequence of lines.
+ * When "join_list" is TRUE convert a List into a sequence of lines.
  * Return pointer to allocated memory, or NULL for failure.
  */
     char_u *
 eval_to_string_eap(
     char_u	*arg,
-    int		convert,
+    int		join_list,
     exarg_T	*eap,
     int		use_simple_function)
 {
@@ -631,7 +638,7 @@
 	retval = NULL;
     else
     {
-	retval = typval2string(&tv, convert);
+	retval = typval2string(&tv, join_list);
 	clear_tv(&tv);
     }
     clear_evalarg(&evalarg, NULL);
@@ -642,10 +649,10 @@
     char_u *
 eval_to_string(
     char_u	*arg,
-    int		convert,
+    int		join_list,
     int		use_simple_function)
 {
-    return eval_to_string_eap(arg, convert, NULL, use_simple_function);
+    return eval_to_string_eap(arg, join_list, NULL, use_simple_function);
 }
 
 /*