1
0
forked from aniani/vim

patch 9.0.1045: in a class object members cannot be initialized

Problem:    In a class object members cannot be initialized.
Solution:   Support initializing object members. Make "dissassemble" work on
            an object method.
This commit is contained in:
Bram Moolenaar
2022-12-10 18:42:12 +00:00
parent 6c87bbb4e4
commit 7ce7daf6cd
13 changed files with 280 additions and 74 deletions

View File

@@ -253,7 +253,6 @@ compile_member(int is_slice, int *keeping_dict, cctx_T *cctx)
/*
* Compile ".member" coming after an object or class.
*/
static int
compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
{
@@ -282,7 +281,7 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
objmember_T *m = &cl->class_obj_members[i];
if (STRNCMP(name, m->om_name, len) == 0 && m->om_name[len] == NUL)
{
generate_OBJ_MEMBER(cctx, i, m->om_type);
generate_GET_OBJ_MEMBER(cctx, i, m->om_type);
*arg = name_end;
return OK;