patch 9.0.1209: getting interface member does not always work
Problem: Getting interface member does not always work.
Solution: Convert the index on the interface to the index on the object.
(closes #11825)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 2b65ff9..77945fb 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2056,6 +2056,8 @@
if (generate_LOAD(cctx, ISN_LOAD, 0, NULL, lhs->lhs_type) == FAIL)
return FAIL;
+ if (cl->class_flags & CLASS_INTERFACE)
+ return generate_GET_ITF_MEMBER(cctx, cl, lhs->lhs_member_idx, type);
return generate_GET_OBJ_MEMBER(cctx, lhs->lhs_member_idx, type);
}