1
0
forked from aniani/vim

patch 9.1.1002: Vim9: unknown func error with interface declaring func var

Problem:  Vim9: unknown function error with interface declaring a
          function variable (lifepillar)
Solution: Use correct instruction for getting interface member variables
          (Yegappan Lakshmanan)

fixes: #16345
closes: #16421

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan
2025-01-11 09:39:01 +01:00
committed by Christian Brabandt
parent 668e9f2403
commit c10342da44
4 changed files with 61 additions and 2 deletions

View File

@@ -392,8 +392,15 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
}
else
{
if (generate_GET_OBJ_MEMBER(cctx, m_idx, ocm->ocm_type) ==
FAIL)
int status;
if (IS_INTERFACE(cl))
status = generate_GET_ITF_MEMBER(cctx, cl, m_idx,
ocm->ocm_type);
else
status = generate_GET_OBJ_MEMBER(cctx, m_idx,
ocm->ocm_type);
if (status == FAIL)
return FAIL;
}
}