1
0
forked from aniani/vim

patch 8.2.4554: Vim9: using null values not sufficiently tested

Problem:    Vim9: using null values not sufficiently tested.
Solution:   Add more tests.  Fix uncovered problem.
This commit is contained in:
Bram Moolenaar
2022-03-12 21:28:22 +00:00
parent 8b530b3158
commit badf04f5c2
4 changed files with 139 additions and 0 deletions

View File

@@ -1235,6 +1235,19 @@ common_type(type_T *type1, type_T *type2, type_T **dest, garray_T *type_gap)
{
type_T *common;
// When one of the types is t_func_unknown return the other one.
// Useful if a list or dict item is null_func.
if (type1 == &t_func_unknown)
{
*dest = type2;
return;
}
if (type2 == &t_func_unknown)
{
*dest = type1;
return;
}
common_type(type1->tt_member, type2->tt_member, &common, type_gap);
if (type1->tt_argcount == type2->tt_argcount
&& type1->tt_argcount >= 0)