0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.0.1139: cannot create a new object in a compiled function

Problem:    Cannot create a new object in a compiled function.
Solution:   Compile the instructins to create a new object.
This commit is contained in:
Bram Moolenaar
2023-01-03 14:01:21 +00:00
parent 36818a9daa
commit 46ab925937
4 changed files with 52 additions and 8 deletions

View File

@@ -581,6 +581,11 @@ typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int flags)
}
}
if (tv->v_type == VAR_CLASS)
member_type = (type_T *)tv->vval.v_class;
else if (tv->v_type == VAR_OBJECT && tv->vval.v_object != NULL)
member_type = (type_T *)tv->vval.v_object->obj_class;
type = get_type_ptr(type_gap);
if (type == NULL)
return NULL;