patch 8.2.3118: Vim9: "any" type not handled correctly in for loop
Problem: Vim9: "any" type not handled correctly in for loop.
Solution: Change compile time check into runtime check. (closes #8516)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 3a717e4..c1fc31e 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -7932,7 +7932,7 @@
if (lhs_type == &t_any)
lhs_type = item_type;
else if (item_type != &t_unknown
- && ((var_list && item_type == &t_any)
+ && (item_type == &t_any
? need_type(item_type, lhs_type,
-1, 0, cctx, FALSE, FALSE)
: check_type(lhs_type, item_type, TRUE, where))