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

patch 9.0.1254: calling a method on an interface does not work

Problem:    Calling a method on an interface does not work.
Solution:   At runtime figure out what method to call. (closes #11901)
This commit is contained in:
Bram Moolenaar
2023-01-28 15:19:40 +00:00
parent 192e24d974
commit d0200c8631
10 changed files with 236 additions and 39 deletions

View File

@@ -1484,15 +1484,17 @@ typedef struct {
char_u *ocm_init; // allocated
} ocmember_T;
// used for the lookup table of a class member index
// used for the lookup table of a class member index and object method index
typedef struct itf2class_S itf2class_T;
struct itf2class_S {
itf2class_T *i2c_next;
class_T *i2c_class;
int i2c_is_method; // TRUE for method indexes
// array with ints follows
};
#define CLASS_INTERFACE 1
#define CLASS_INTERFACE 1
#define CLASS_EXTENDED 2 // another class extends this one
// "class_T": used for v_class of typval of VAR_CLASS
// Also used for an interface (class_flags has CLASS_INTERFACE).