Mercurial > vim
diff src/vim9expr.c @ 33611:de690130ba43 v9.0.2049
patch 9.0.2049: Vim9: not recognizing qualified class vars for infix ops
Commit: https://github.com/vim/vim/commit/d7b616d0ad006db06140729313b6217677cc4e80
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Thu Oct 19 10:47:53 2023 +0200
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 19 Oct 2023 11:00:04 +0200 |
parents | c470d4fd5eba |
children | 7d9d2404a3d4 |
line wrap: on
line diff
--- a/src/vim9expr.c +++ b/src/vim9expr.c @@ -379,6 +379,8 @@ compile_class_object_index(cctx_T *cctx, } 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, } *arg = name_end; + // Remove the class type from the stack + --cctx->ctx_type_stack.ga_len; return generate_CLASSMEMBER(cctx, TRUE, cl, idx); }