mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.1895: Vim9: finding object method/member is inefficient
Problem: Vim9: finding method/member is inefficient Solution: Use lookups closes: #13073 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ernie Rael <errael@raelity.com>
This commit is contained in:
committed by
Christian Brabandt
parent
f787ee8451
commit
4d00b835c4
@@ -394,10 +394,10 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
|
||||
|
||||
if (type->tt_type == VAR_OBJECT)
|
||||
{
|
||||
int m_idx = object_member_idx(cl, name, len);
|
||||
int m_idx;
|
||||
ocmember_T *m = object_member_lookup(cl, name, len, &m_idx);
|
||||
if (m_idx >= 0)
|
||||
{
|
||||
ocmember_T *m = &cl->class_obj_members[m_idx];
|
||||
if (*name == '_' && !inside_class(cctx, cl))
|
||||
{
|
||||
semsg(_(e_cannot_access_private_member_str), m->ocm_name);
|
||||
|
Reference in New Issue
Block a user