Patch 8.2.3277 (after 8.2.3276)
Problem:    Vim9: compiled has() does not work properly.
Solution:   Fix check for has() vs exists().
Files:      src/vim9compile.c


*** ../vim-8.2.3276/src/vim9compile.c   2021-08-02 20:06:44.351011164 +0200
--- src/vim9compile.c   2021-08-02 21:08:21.387630360 +0200
***************
*** 3402,3407 ****
--- 3402,3408 ----
      {
        char_u      *s = skipwhite(*arg + varlen + 1);
        typval_T    argvars[2];
+       int         is_has = **arg == 'h';
  
        argvars[0].v_type = VAR_UNKNOWN;
        if (*s == '"')
***************
*** 3410,3417 ****
            (void)eval_lit_string(&s, &argvars[0], TRUE);
        s = skipwhite(s);
        if (*s == ')' && argvars[0].v_type == VAR_STRING
!              && ((**arg == 'h' && !dynamic_feature(argvars[0].vval.v_string))
!                   || (**arg == 'e' && (*argvars[0].vval.v_string == '+'
                            || *argvars[0].vval.v_string == '&'))))
        {
            typval_T    *tv = &ppconst->pp_tv[ppconst->pp_used];
--- 3411,3418 ----
            (void)eval_lit_string(&s, &argvars[0], TRUE);
        s = skipwhite(s);
        if (*s == ')' && argvars[0].v_type == VAR_STRING
!              && ((is_has && !dynamic_feature(argvars[0].vval.v_string))
!                   || (!is_has && (*argvars[0].vval.v_string == '+'
                            || *argvars[0].vval.v_string == '&'))))
        {
            typval_T    *tv = &ppconst->pp_tv[ppconst->pp_used];
***************
*** 3420,3426 ****
            argvars[1].v_type = VAR_UNKNOWN;
            tv->v_type = VAR_NUMBER;
            tv->vval.v_number = 0;
!           if (**arg == 'h')
                f_has(argvars, tv);
            else
                f_exists(argvars, tv);
--- 3421,3427 ----
            argvars[1].v_type = VAR_UNKNOWN;
            tv->v_type = VAR_NUMBER;
            tv->vval.v_number = 0;
!           if (is_has)
                f_has(argvars, tv);
            else
                f_exists(argvars, tv);
***************
*** 7096,7102 ****
        if (oplen > 0 && *op != '=')
        {
            type_T          *expected;
!           type_T          *stacktype;
  
            if (*op == '.')
            {
--- 7097,7103 ----
        if (oplen > 0 && *op != '=')
        {
            type_T          *expected;
!           type_T          *stacktype = NULL;
  
            if (*op == '.')
            {
*** ../vim-8.2.3276/src/version.c       2021-08-02 20:06:44.355011158 +0200
--- src/version.c       2021-08-02 21:10:39.591352127 +0200
***************
*** 757,758 ****
--- 757,760 ----
  {   /* Add new patch number below this line */
+ /**/
+     3277,
  /**/

-- 
What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics'
meaning 'bloodsucking creatures'.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/202108021912.172JCipR589886%40masaka.moolenaar.net.

Raspunde prin e-mail lui