patch 8.2.2261: Vim9: boolean option gets string type

Problem:    Vim9: boolean option gets string type.
Solution:   Check for VAR_BOOL. (closes #7588)
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index c6a6829..e77c1f7 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -2417,6 +2417,11 @@
   &grepprg = test_null_string()
   assert_equal('', &grepprg)
   set grepprg&
+
+  # check matching type
+  var bval: bool = &tgc
+  var nval: number = &ts
+  var sval: string = &path
 enddef
 
 def Test_expr7_environment()