patch 8.2.1618: Vim9: cannot pass "true" to setloclist()

Problem:    Vim9: cannot pass "true" to setloclist().
Solution:   Use dict_get_bool(). (closes #6882)
diff --git a/src/quickfix.c b/src/quickfix.c
index 09d5d8f..c8858b4 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -7072,7 +7072,7 @@
 
     // If the 'valid' field is present it overrules the detected value.
     if ((dict_find(d, (char_u *)"valid", -1)) != NULL)
-	valid = (int)dict_get_number(d, (char_u *)"valid");
+	valid = (int)dict_get_bool(d, (char_u *)"valid", FALSE);
 
     status =  qf_add_entry(qfl,
 			NULL,		// dir
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index 3fb8402..47c37f0 100644
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -1614,6 +1614,13 @@
    assert_equal(123, getbufvar('%', 'myvar'))
 enddef
 
+def Test_setloclist()
+  let items = [#{filename: '/tmp/file', lnum: 1, valid: true}]
+  let what = #{items: items}
+  setqflist([], ' ', what)
+  setloclist(0, [], ' ', what)
+enddef
+
 def Test_setreg()
   setreg('a', ['aaa', 'bbb', 'ccc'])
   let reginfo = getreginfo('a')
diff --git a/src/version.c b/src/version.c
index d422465..5beab6d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1618,
+/**/
     1617,
 /**/
     1616,