mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.1890: Vim9: lookup code for class/object repaeated
Problem: Vim9: lookup code for class/object repaeated Solution: Refactor and make use of lookup functions closes: #13067 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
committed by
Christian Brabandt
parent
0661033075
commit
f36bbcd402
@@ -1837,17 +1837,12 @@ generate_CALL(
|
||||
if (class_constructor && expected->tt_type == VAR_ANY)
|
||||
{
|
||||
class_T *clp = mtype->tt_class;
|
||||
char_u *aname = ((char_u **)ufunc->uf_args.ga_data)[i];
|
||||
for (int om = 0; om < clp->class_obj_member_count; ++om)
|
||||
{
|
||||
if (STRCMP(aname, clp->class_obj_members[om].ocm_name)
|
||||
== 0)
|
||||
{
|
||||
expected = clp->class_obj_members[om].ocm_type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
char_u *aname = ((char_u **)ufunc->uf_args.ga_data)[i];
|
||||
int m_idx;
|
||||
ocmember_T *m = object_member_lookup(clp, aname, 0,
|
||||
&m_idx);
|
||||
if (m != NULL)
|
||||
expected = m->ocm_type;
|
||||
}
|
||||
}
|
||||
else if (ufunc->uf_va_type == NULL
|
||||
|
Reference in New Issue
Block a user