1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2021-09-09 22:30:52 +02:00
parent 6c391a74fe
commit efc084e335
3 changed files with 26 additions and 0 deletions

View File

@@ -1217,6 +1217,7 @@ list_copy(list_T *orig, int deep, int copyID)
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