diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-01-03 14:01:21 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-03 14:01:21 +0000 |
commit | 46ab925937d04c208d905cfb50bd8ffcae11e466 (patch) | |
tree | a53164b0853374c62ccea3afb4b07314d8fad66c /src/vim9type.c | |
parent | 36818a9daafbcb8e3b06be7b07f52b2d00a61746 (diff) |
patch 9.0.1139: cannot create a new object in a compiled functionv9.0.1139
Problem: Cannot create a new object in a compiled function.
Solution: Compile the instructins to create a new object.
Diffstat (limited to 'src/vim9type.c')
-rw-r--r-- | src/vim9type.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vim9type.c b/src/vim9type.c index 8ce5948163..c85c3f6c7d 100644 --- a/src/vim9type.c +++ b/src/vim9type.c @@ -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; |