mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.1805: Vim9: problem compiling object method as function call arg
Problem: Vim9: problem compiling object method as function call arg Solution: After a object/class method call, remove the object/class from the stack. closes: #12081 closes: #12929 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
cd7293bf6c
commit
639751d218
@@ -1902,6 +1902,10 @@ generate_CALL(
|
||||
// drop the argument types
|
||||
cctx->ctx_type_stack.ga_len -= argcount;
|
||||
|
||||
// For an object or class method call, drop the object/class type
|
||||
if (ufunc->uf_class != NULL)
|
||||
cctx->ctx_type_stack.ga_len--;
|
||||
|
||||
// add return type
|
||||
return push_type_stack(cctx, ufunc->uf_ret_type);
|
||||
}
|
||||
|
Reference in New Issue
Block a user