mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2012: Vim9: confusing error message when using bool wrongly
Problem: Vim9: confusing error message when using bool wrongly. Solution: Mention "Bool" instead of "Special". (closes #7323)
This commit is contained in:
@@ -213,7 +213,10 @@ tv_get_bool_or_number_chk(typval_T *varp, int *denote, int want_bool)
|
||||
case VAR_SPECIAL:
|
||||
if (!want_bool && in_vim9script())
|
||||
{
|
||||
emsg(_("E611: Using a Special as a Number"));
|
||||
if (varp->v_type == VAR_BOOL)
|
||||
emsg(_(e_using_bool_as_number));
|
||||
else
|
||||
emsg(_("E611: Using a Special as a Number"));
|
||||
break;
|
||||
}
|
||||
return varp->vval.v_number == VVAL_TRUE ? 1 : 0;
|
||||
|
Reference in New Issue
Block a user