mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.2078: several problems with type aliases
Problem: several problems with type aliases Solution: Check for more error conditions, add tests, fix issues Check for more error conditions and add additional tests fixes #13434 fixes #13437 fixes #13438 closes #13441 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
87ca5e86fa
commit
feaccd2395
@@ -1885,7 +1885,7 @@ set_var_lval(
|
||||
{
|
||||
if (di != NULL && di->di_tv.v_type == VAR_TYPEALIAS)
|
||||
{
|
||||
semsg(_(e_using_typealias_as_variable),
|
||||
semsg(_(e_cannot_modify_typealias),
|
||||
di->di_tv.vval.v_typealias->ta_name);
|
||||
clear_tv(&tv);
|
||||
return;
|
||||
@@ -4045,7 +4045,8 @@ eval8(
|
||||
|
||||
if (!equal_type(want_type, actual, 0))
|
||||
{
|
||||
if (want_type == &t_bool && actual != &t_bool
|
||||
if (want_type->tt_type == VAR_BOOL
|
||||
&& actual->tt_type != VAR_BOOL
|
||||
&& (actual->tt_flags & TTFLAG_BOOL_OK))
|
||||
{
|
||||
int n = tv2bool(rettv);
|
||||
|
Reference in New Issue
Block a user