Problem: Vim9: concatenating two lists may result in wrong type.
Solution: Remove the type instead of using list<any>. (closes #9692)
copy = list_alloc();
if (copy != NULL)
{
- if (orig->lv_type == NULL)
+ if (orig->lv_type == NULL || top || deep)
copy->lv_type = NULL;
else
- copy->lv_type = alloc_type(top || deep
- ? &t_list_any: orig->lv_type);
+ copy->lv_type = alloc_type(orig->lv_type);
if (copyID != 0)
{
// Do this before adding the items, because one of the items may
assert_equal([[1, 2]], lln)
END
v9.CheckDefAndScriptSuccess(lines)
+
+ lines =<< trim END
+ var ln: list<number> = [0]
+ var lln: list<list<number>> = [ln + []]
+ END
+ v9.CheckDefAndScriptSuccess(lines)
enddef
" test multiply, divide, modulo
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4295,
/**/
4294,
/**/