summaryrefslogtreecommitdiffstats
path: root/src/vim9type.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-09 21:41:48 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-09 21:41:48 +0000
commitffdaca9e6f3d39af6857ac52ced9385df203a152 (patch)
tree04ed8cbe05e072413dd394828d7661167ad63b6c /src/vim9type.c
parent148bcd361097f85a1a51c408e7412d60c76df14d (diff)
patch 9.0.1041: cannot define a method in a classv9.0.1041
Problem: Cannot define a method in a class. Solution: Implement defining an object method. Make calling an object method work.
Diffstat (limited to 'src/vim9type.c')
-rw-r--r--src/vim9type.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/vim9type.c b/src/vim9type.c
index b255411222..f36fa5eea4 100644
--- a/src/vim9type.c
+++ b/src/vim9type.c
@@ -1585,10 +1585,7 @@ f_typename(typval_T *argvars, typval_T *rettv)
if (tofree != NULL)
rettv->vval.v_string = (char_u *)tofree;
else
- {
rettv->vval.v_string = vim_strsave((char_u *)name);
- vim_free(tofree);
- }
clear_type_list(&type_list);
}