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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user