0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.3230: Vim9: type error when function return type is not known yet

Problem:    Vim9: type error when function return type is not known yet.
Solution:   When return type is unknown, use "any". (closes #8644)
This commit is contained in:
Bram Moolenaar
2021-07-27 22:21:44 +02:00
parent 4490ec4e83
commit f723701de0
3 changed files with 15 additions and 0 deletions

View File

@@ -2130,6 +2130,9 @@ generate_PCALL(
}
}
ret_type = type->tt_member;
if (ret_type == &t_unknown)
// return type not known yet, use a runtime check
ret_type = &t_any;
}
else
{