patch 8.2.2254: Vim9: bool option type is number

Problem:    Vim9: bool option type is number.
Solution:   Have get_option_value() return a different value for bool and
            number options. (closes #7583)
diff --git a/src/evalvars.c b/src/evalvars.c
index f7982f7..f9b3c48 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1354,7 +1354,7 @@
 	else
 	{
 	    long	n = 0;
-	    int		opt_type;
+	    getoption_T	opt_type;
 	    long	numval;
 	    char_u	*stringval = NULL;
 	    char_u	*s = NULL;
@@ -1364,7 +1364,10 @@
 	    *p = NUL;
 
 	    opt_type = get_option_value(arg, &numval, &stringval, opt_flags);
-	    if ((opt_type == 1 || opt_type == -1)
+	    if ((opt_type == gov_bool
+			|| opt_type == gov_number
+			|| opt_type == gov_hidden_bool
+			|| opt_type == gov_hidden_number)
 			     && (tv->v_type != VAR_STRING || !in_vim9script()))
 		// number, possibly hidden
 		n = (long)tv_get_number(tv);
@@ -1377,8 +1380,9 @@
 
 	    if (op != NULL && *op != '=')
 	    {
-		if ((opt_type == 1 && *op == '.')
-			|| (opt_type == 0 && *op != '.'))
+		if (((opt_type == gov_bool || opt_type == gov_number)
+								 && *op == '.')
+			|| (opt_type == gov_string && *op != '.'))
 		{
 		    semsg(_(e_letwrong), op);
 		    failed = TRUE;  // don't set the value
@@ -1386,7 +1390,9 @@
 		}
 		else
 		{
-		    if (opt_type == 1)  // number
+		    // number, in legacy script also bool
+		    if (opt_type == gov_number
+				 || (opt_type == gov_bool && !in_vim9script()))
 		    {
 			switch (*op)
 			{
@@ -1397,7 +1403,8 @@
 			    case '%': n = (long)num_modulus(numval, n); break;
 			}
 		    }
-		    else if (opt_type == 0 && stringval != NULL && s != NULL)
+		    else if (opt_type == gov_string
+					     && stringval != NULL && s != NULL)
 		    {
 			// string
 			s = concat_str(stringval, s);
@@ -1409,7 +1416,7 @@
 
 	    if (!failed)
 	    {
-		if (opt_type != 0 || s != NULL)
+		if (opt_type != gov_string || s != NULL)
 		{
 		    set_option_value(arg, n, s, opt_flags);
 		    arg_end = p;