0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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)
This commit is contained in:
Bram Moolenaar
2023-01-16 19:43:47 +00:00
parent a41e221935
commit 29ac5df37b
11 changed files with 162 additions and 20 deletions

View File

@@ -2056,6 +2056,8 @@ compile_load_lhs_with_index(lhs_T *lhs, char_u *var_start, cctx_T *cctx)
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);
}