patch 9.1.1267: Vim9: no support for type list/dict<object<any>>
Problem: Vim9: no support for type list/dict<object<any>>
Solution: add proper support for t_object_any
(Yegappan Lakshmanan)
closes: #17025
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 34a78da..0a4c3fa 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2498,7 +2498,8 @@
: get_type_on_stack(cctx, 0);
if (lhs->lhs_type->tt_type == VAR_CLASS
- || lhs->lhs_type->tt_type == VAR_OBJECT)
+ || (lhs->lhs_type->tt_type == VAR_OBJECT
+ && lhs->lhs_type != &t_object_any))
{
// Check whether the class or object variable is modifiable
if (!lhs_class_member_modifiable(lhs, var_start, cctx))
@@ -2522,7 +2523,7 @@
return OK;
}
- return generate_loadvar(cctx, lhs);
+ return generate_loadvar(cctx, lhs);
}
/*