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

@@ -34,10 +34,11 @@ typedef enum {
ISN_INSTR, // instructions compiled from expression
ISN_CONSTRUCT, // construct an object, using contstruct_T
ISN_GET_OBJ_MEMBER, // object member, index is isn_arg.number
ISN_GET_ITF_MEMBER, // interface member, index is isn_arg.classmember
ISN_STORE_THIS, // store value in "this" object member, index is
// isn_arg.number
ISN_LOAD_CLASSMEMBER, // load class member, using classmember_T
ISN_STORE_CLASSMEMBER, // store in class member, using classmember_T
ISN_LOAD_CLASSMEMBER, // load class member, using isn_arg.classmember
ISN_STORE_CLASSMEMBER, // store in class member, using isn_arg.classmember
// get and set variables
ISN_LOAD, // push local variable isn_arg.number
@@ -480,7 +481,7 @@ typedef struct {
class_T *construct_class; // class the object is created from
} construct_T;
// arguments to ISN_STORE_CLASSMEMBER and ISN_LOAD_CLASSMEMBER
// arguments to ISN_STORE_CLASSMEMBER, ISN_LOAD_CLASSMEMBER, ISN_GET_ITF_MEMBER
typedef struct {
class_T *cm_class;
int cm_idx;