commit | efc084e3353d6854b6dac8b240f70cb0abb838ad | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Thu Sep 09 22:30:52 2021 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Thu Sep 09 22:30:52 2021 +0200 |
tree | 3abfd67a91c755bd3e63b041702d8f7f96112c76 | |
parent | 6c391a74fe90190796ca0b0c010112948a6e75d7 [diff] [blame] |
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