1
0
forked from aniani/vim

patch 9.0.2049: Vim9: not recognizing qualified class vars for infix ops

Problem:  Vim9: not recognizing qualified class vars for infix ops
Solution: Drop the class type from the stack before generating the
          CLASSMEMBER instruction

closes: #13378
closes: #13379

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
Yegappan Lakshmanan
2023-10-19 10:47:53 +02:00
committed by Christian Brabandt
parent 982ef16059
commit d7b616d0ad
3 changed files with 78 additions and 0 deletions

View File

@@ -379,6 +379,8 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
}
if (type->tt_type == VAR_CLASS)
{
// Remove the class type from the stack
--cctx->ctx_type_stack.ga_len;
if (generate_CLASSMEMBER(cctx, TRUE, cl, m_idx) == FAIL)
return FAIL;
}
@@ -475,6 +477,8 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
}
*arg = name_end;
// Remove the class type from the stack
--cctx->ctx_type_stack.ga_len;
return generate_CLASSMEMBER(cctx, TRUE, cl, idx);
}