1
0
forked from aniani/vim

patch 9.1.0160: Vim9: Add support for using a class type of itself in an object method

Problem:  Add support for using a class type of itself in an object
          method (thinca)
Solution: Vim9: Add support for using a class type of itself in an
          object method (Yegappan Lakshmanan)

fixes: #12369
closes: #14165

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan
2024-03-09 15:44:19 +01:00
committed by Christian Brabandt
parent b2ec0da080
commit 35b867b685
6 changed files with 126 additions and 54 deletions

View File

@@ -3830,7 +3830,7 @@ set_var(
* If the variable already exists and "is_const" is FALSE the value is updated.
* Otherwise the variable is created.
*/
void
int
set_var_const(
char_u *name,
scid_T sid,
@@ -3854,6 +3854,7 @@ set_var_const(
int var_in_autoload = FALSE;
int flags = flags_arg;
int free_tv_arg = !copy; // free tv_arg if not used
int rc = FAIL;
if (sid != 0)
{
@@ -4127,10 +4128,14 @@ set_var_const(
// values.
item_lock(dest_tv, DICT_MAXNEST, TRUE, TRUE);
rc = OK;
failed:
vim_free(name_tofree);
if (free_tv_arg)
clear_tv(tv_arg);
return rc;
}
/*