mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2920: still a way to shadow a builtin function
Problem: Still a way to shadow a builtin function. (Yasuhiro Matsumoto) Solution: Check the key when using extend(). (issue #8302)
This commit is contained in:
@@ -1462,12 +1462,8 @@ set_var_lval(
|
||||
semsg(_(e_dictkey), lp->ll_newkey);
|
||||
return;
|
||||
}
|
||||
if ((lp->ll_tv->vval.v_dict == get_globvar_dict()
|
||||
|| lp->ll_tv->vval.v_dict ==
|
||||
&SCRIPT_ITEM(current_sctx.sc_sid)->sn_vars->sv_dict)
|
||||
&& (rettv->v_type == VAR_FUNC
|
||||
|| rettv->v_type == VAR_PARTIAL)
|
||||
&& var_wrong_func_name(lp->ll_newkey, TRUE))
|
||||
if (dict_wrong_func_name(lp->ll_tv->vval.v_dict, rettv,
|
||||
lp->ll_newkey))
|
||||
return;
|
||||
|
||||
// Need to add an item to the Dictionary.
|
||||
|
Reference in New Issue
Block a user