mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.2.1977: Vim9: error for using a string in a condition is confusing
Problem: Vim9: error for using a string in a condition is confusing. Solution: Give a more specific error. Also adjust the compile time type checking for || and &&.
This commit is contained in:
@@ -196,7 +196,7 @@ tv_get_bool_or_number_chk(typval_T *varp, int *denote, int want_bool)
|
||||
case VAR_STRING:
|
||||
if (in_vim9script())
|
||||
{
|
||||
emsg(_(e_using_string_as_number));
|
||||
emsg_using_string_as(varp, !want_bool);
|
||||
break;
|
||||
}
|
||||
if (varp->vval.v_string != NULL)
|
||||
|
Reference in New Issue
Block a user