forked from aniani/vim
patch 9.0.1822: Vim9: no check for duplicate members in extended classes
Problem: Vim9: no check for duplicate members in extended classes Solution: Check for duplicate members in extended classes. Fix memory leak. closes: #12948 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
4b9777a1df
commit
e3b6c78ddc
@@ -372,7 +372,7 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (ufunc->uf_private && !inside_class_hierarchy(cctx, cl))
|
||||
if (*ufunc->uf_name == '_' && !inside_class_hierarchy(cctx, cl))
|
||||
{
|
||||
semsg(_(e_cannot_access_private_method_str), name);
|
||||
return FAIL;
|
||||
|
Reference in New Issue
Block a user