Patch 8.2.1606
Problem:    Vim9: cannot use "true" with has().
Solution:   Use tv_get_bool(). (closes #6876)
Files:      src/evalfunc.c, src/testdir/test_vim9_func.vim


*** ../vim-8.2.1605/src/evalfunc.c      2020-09-05 17:30:40.998542895 +0200
--- src/evalfunc.c      2020-09-05 18:44:06.515757252 +0200
***************
*** 4763,4769 ****
        }
      }
  
!     if (argvars[1].v_type != VAR_UNKNOWN && tv_get_number(&argvars[1]) != 0)
        // return whether feature could ever be enabled
        rettv->vval.v_number = x;
      else
--- 4763,4769 ----
        }
      }
  
!     if (argvars[1].v_type != VAR_UNKNOWN && tv_get_bool(&argvars[1]))
        // return whether feature could ever be enabled
        rettv->vval.v_number = x;
      else
*** ../vim-8.2.1605/src/testdir/test_vim9_func.vim      2020-09-05 
18:31:30.012880922 +0200
--- src/testdir/test_vim9_func.vim      2020-09-05 18:43:41.979804049 +0200
***************
*** 1516,1521 ****
--- 1516,1525 ----
    set wildignore&
  enddef
  
+ def Test_has()
+   assert_equal(1, has('eval', true))
+ enddef
+ 
  def Fibonacci(n: number): number
    if n < 2
      return n
*** ../vim-8.2.1605/src/version.c       2020-09-05 18:40:38.440139606 +0200
--- src/version.c       2020-09-05 18:45:07.683638863 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1606,
  /**/

-- 
No letters of the alphabet were harmed in the creation of this message.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202009051645.085GjuX3653883%40masaka.moolenaar.net.

Raspunde prin e-mail lui