0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.1928: Vim9: constructor type checking bug

Problem:  Vim9: constructor type checking bug
Solution: Fix class constructor regression

closes: #13102
closes: #13113

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
This commit is contained in:
h-east
2023-09-24 15:46:31 +02:00
committed by Christian Brabandt
parent ceee7a808c
commit b895b0fabc
10 changed files with 98 additions and 42 deletions

View File

@@ -1200,7 +1200,8 @@ add_default_constructor(
garray_T lines_to_free;
ga_init2(&lines_to_free, sizeof(char_u *), 50);
ufunc_T *nf = define_function(&fea, NULL, &lines_to_free, CF_CLASS);
ufunc_T *nf = define_function(&fea, NULL, &lines_to_free, CF_CLASS,
cl->class_obj_members, cl->class_obj_member_count);
ga_clear_strings(&lines_to_free);
vim_free(fga.ga_data);
@@ -1679,7 +1680,7 @@ early_ret:
else
class_flags = CF_INTERFACE;
ufunc_T *uf = define_function(&ea, NULL, &lines_to_free,
class_flags);
class_flags, objmembers.ga_data, objmembers.ga_len);
ga_clear_strings(&lines_to_free);
if (uf != NULL)