0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 7.4.1546

Problem:    Sticky type checking is more annoying than useful.
Solution:   Remove the error for changing a variable type.
This commit is contained in:
Bram Moolenaar
2016-03-12 19:03:59 +01:00
parent b4ebf9ae3b
commit f6f32c38bf
5 changed files with 26 additions and 29 deletions

View File

@@ -22091,22 +22091,6 @@ set_var(
if (var_check_ro(v->di_flags, name, FALSE)
|| tv_check_lock(v->di_tv.v_lock, name, FALSE))
return;
if (v->di_tv.v_type != tv->v_type
&& !((v->di_tv.v_type == VAR_STRING
|| v->di_tv.v_type == VAR_NUMBER)
&& (tv->v_type == VAR_STRING
|| tv->v_type == VAR_NUMBER))
#ifdef FEAT_FLOAT
&& !((v->di_tv.v_type == VAR_NUMBER
|| v->di_tv.v_type == VAR_FLOAT)
&& (tv->v_type == VAR_NUMBER
|| tv->v_type == VAR_FLOAT))
#endif
)
{
EMSG2(_("E706: Variable type mismatch for: %s"), name);
return;
}
/*
* Handle setting internal v: variables separately where needed to