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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user