patch 8.2.1996: Vim9: invalid error for argument of extend()
Problem: Vim9: invalid error for argument of extend().
Solution: Check if the type could match. (closes #7299)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 9a38f05..8dc9744 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -820,7 +820,7 @@
* Return TRUE if "actual" could be "expected" and a runtime typecheck is to be
* used. Return FALSE if the types will never match.
*/
- static int
+ int
use_typecheck(type_T *actual, type_T *expected)
{
if (actual->tt_type == VAR_ANY