patch 8.2.3422: Vim9: no failure if return type differs from returned var

Problem:    Vim9: no failure if return type differs from returned variable.
Solution:   Copy type when copying a list. (closes #8847)
diff --git a/src/list.c b/src/list.c
index 76101ba..336bf3b 100644
--- a/src/list.c
+++ b/src/list.c
@@ -1217,6 +1217,7 @@
     copy = list_alloc();
     if (copy != NULL)
     {
+	copy->lv_type = orig->lv_type;
 	if (copyID != 0)
 	{
 	    // Do this before adding the items, because one of the items may