mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.2252: Vim9: crash when using lambda without return type in dict
Problem: Vim9: crash when using lambda without return type in dict. Solution: Without a return type use t_unknown. (closes #7587)
This commit is contained in:
@@ -480,7 +480,10 @@ check_type(type_T *expected, type_T *actual, int give_msg, int argidx)
|
||||
}
|
||||
else if (expected->tt_type == VAR_FUNC)
|
||||
{
|
||||
if (expected->tt_member != &t_unknown)
|
||||
// If the return type is unknown it can be anything, including
|
||||
// nothing, thus there is no point in checking.
|
||||
if (expected->tt_member != &t_unknown
|
||||
&& actual->tt_member != &t_unknown)
|
||||
ret = check_type(expected->tt_member, actual->tt_member,
|
||||
FALSE, 0);
|
||||
if (ret == OK && expected->tt_argcount != -1
|
||||
|
Reference in New Issue
Block a user