mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.1211: storing value in interface member does not always work
Problem: Storing value in interface member does not always work. Solution: Convert the index on the interface to the index on the object.
This commit is contained in:
@@ -2178,7 +2178,22 @@ compile_assign_unlet(
|
||||
|
||||
if (isn == NULL)
|
||||
return FAIL;
|
||||
isn->isn_arg.vartype = dest_type;
|
||||
isn->isn_arg.storeindex.si_vartype = dest_type;
|
||||
isn->isn_arg.storeindex.si_class = NULL;
|
||||
|
||||
if (dest_type == VAR_OBJECT)
|
||||
{
|
||||
class_T *cl = (class_T *)lhs->lhs_type->tt_member;
|
||||
|
||||
if (cl->class_flags & CLASS_INTERFACE)
|
||||
{
|
||||
// "this.value": load "this" object and get the value
|
||||
// at index for an object or class member get the type
|
||||
// of the member
|
||||
isn->isn_arg.storeindex.si_class = cl;
|
||||
++cl->class_refcount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (range)
|
||||
|
Reference in New Issue
Block a user