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 &&.
diff --git a/src/typval.c b/src/typval.c
index 5151f72..7c55d3a 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -196,7 +196,7 @@
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)