mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.3055: strange error for assigning to "x.key" on non-dictionary
Problem: Strange error for assigning to "x.key" on non-dictionary. Solution: Add a specific error message. (closes #8451)
This commit is contained in:
@@ -924,8 +924,14 @@ get_lval(
|
||||
lp->ll_tv = &v->di_tv;
|
||||
var1.v_type = VAR_UNKNOWN;
|
||||
var2.v_type = VAR_UNKNOWN;
|
||||
while (*p == '[' || (*p == '.' && lp->ll_tv->v_type == VAR_DICT))
|
||||
while (*p == '[' || (*p == '.' && p[1] != '=' && p[1] != '.'))
|
||||
{
|
||||
if (*p == '.' && lp->ll_tv->v_type != VAR_DICT)
|
||||
{
|
||||
if (!quiet)
|
||||
semsg(_(e_dot_can_only_be_used_on_dictionary_str), name);
|
||||
return NULL;
|
||||
}
|
||||
if (!(lp->ll_tv->v_type == VAR_LIST && lp->ll_tv->vval.v_list != NULL)
|
||||
&& !(lp->ll_tv->v_type == VAR_DICT)
|
||||
&& !(lp->ll_tv->v_type == VAR_BLOB
|
||||
|
Reference in New Issue
Block a user