0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.1794: no falsy Coalescing operator

Problem:    No falsy Coalescing operator.
Solution:   Add the "??" operator.  Fix mistake with function argument count.
This commit is contained in:
Bram Moolenaar
2020-10-03 20:17:30 +02:00
parent c8fe645c19
commit 92f26c256e
8 changed files with 257 additions and 97 deletions

View File

@@ -924,6 +924,10 @@ common_type(type_T *type1, type_T *type2, type_T **dest, garray_T *type_gap)
}
else
*dest = alloc_func_type(common, -1, type_gap);
// Use the minimum of min_argcount.
(*dest)->tt_min_argcount =
type1->tt_min_argcount < type2->tt_min_argcount
? type1->tt_min_argcount : type2->tt_min_argcount;
return;
}
}