Patch 8.2.1183
Problem:    assert_fails() checks the last error message.
Solution:   Check the first error, it is more relevant.  Fix all the tests
            that rely on the old behavior.
Files:      runtime/doc/testing.txt, src/message.c, src/globals.h,
            src/testing.c, src/testdir/test_autocmd.vim,
            src/testdir/test_buffer.vim, src/testdir/test_cd.vim,
            src/testdir/test_channel.vim, src/testdir/test_clientserver.vim,
            src/testdir/test_cmdline.vim, src/testdir/test_cpoptions.vim,
            src/testdir/test_cscope.vim, src/if_cscope.c,
            src/testdir/test_excmd.vim, src/evalvars.c,
            src/testdir/test_expr.vim, src/testdir/test_functions.vim,
            src/testdir/test_json.vim, src/testdir/test_let.vim,
            src/testdir/test_listdict.vim, src/testdir/test_listener.vim,
            src/testdir/test_match.vim, src/testdir/test_menu.vim,
            src/testdir/test_method.vim, src/testdir/test_normal.vim,
            src/testdir/test_popup.vim, src/testdir/test_python2.vim,
            src/testdir/test_python3.vim, src/testdir/test_quickfix.vim,
            src/testdir/test_random.vim, src/testdir/test_search.vim,
            src/testdir/test_signs.vim, src/testdir/test_spell.vim,
            src/testdir/test_substitute.vim, src/testdir/test_syntax.vim,
            src/testdir/test_tagjump.vim, src/testdir/test_taglist.vim,
            src/testdir/test_terminal.vim, src/testdir/test_textprop.vim,
            src/testdir/test_trycatch.vim,
            src/testdir/test_vim9_disassemble.vim,
            src/testdir/test_vim9_func.vim, src/vim9compile.c,
            src/testdir/test_vim9_script.vim, src/testdir/test_viminfo.vim,
            src/testdir/test_winbuf_close.vim,
            src/testdir/test_window_cmd.vim, src/testdir/test_writefile.vim,
            src/testdir/test_regexp_latin.vim, src/testdir/test_utf8.vim,
            src/testdir/test_global.vim, src/testdir/test_tagfunc.vim


*** ../vim-8.2.1182/runtime/doc/testing.txt     2020-06-15 19:51:52.637404472 
+0200
--- runtime/doc/testing.txt     2020-07-11 16:00:43.442347575 +0200
***************
*** 294,301 ****
  
  assert_fails({cmd} [, {error} [, {msg}]])                     *assert_fails()*
                Run {cmd} and add an error message to |v:errors| if it does
!               NOT produce an error.  Also see |assert-return|.
!               When {error} is given it must match in |v:errmsg|.
                Note that beeping is not considered an error, and some failing
                commands only beep.  Use |assert_beeps()| for those.
  
--- 295,317 ----
  
  assert_fails({cmd} [, {error} [, {msg}]])                     *assert_fails()*
                Run {cmd} and add an error message to |v:errors| if it does
!               NOT produce an error or when {error} is not found in the
!               error message.  Also see |assert-return|.
! 
!               When {error} is a string it must be found literally in the
!               first reported error. Most often this will be the error code,
!               including the colon, e.g. "E123:". >
!                       assert_fails('bad cmd', 'E987:')
! <
!               When {error} is a |List| with one or two strings, these are
!               used as patterns.  The first pattern is matched against the
!               first reported error: >
!                       assert_fails('cmd', ['E987:.*expected bool'])
! <             The second pattern, if present, is matched against the last
!               reported error.  To only match the last error use an empty
!               string for the first error: >
!                       assert_fails('cmd', ['', 'E987:'])
! <
                Note that beeping is not considered an error, and some failing
                commands only beep.  Use |assert_beeps()| for those.
  
*** ../vim-8.2.1182/src/message.c       2020-07-06 21:24:53.097898730 +0200
--- src/message.c       2020-07-11 15:38:51.361652604 +0200
***************
*** 654,659 ****
--- 654,662 ----
            return TRUE;
        }
  
+       if (emsg_assert_fails_used && emsg_assert_fails_msg == NULL)
+           emsg_assert_fails_msg = vim_strsave(s);
+ 
        // set "v:errmsg", also when using ":silent! cmd"
        set_vim_var_string(VV_ERRMSG, s, -1);
  #endif
*** ../vim-8.2.1182/src/globals.h       2020-07-08 22:36:11.906706804 +0200
--- src/globals.h       2020-07-11 15:44:47.484774297 +0200
***************
*** 220,225 ****
--- 220,229 ----
                                            // expression that is skipped
  EXTERN int    emsg_severe INIT(= FALSE);  // use message of next of several
                                            // emsg() calls for throw
+ // used by assert_fails()
+ EXTERN int    emsg_assert_fails_used INIT(= FALSE);
+ EXTERN char_u *emsg_assert_fails_msg INIT(= NULL);
+ 
  EXTERN int    did_endif INIT(= FALSE);    // just had ":endif"
  #endif
  EXTERN int    did_emsg;                   // set by emsg() when the message
*** ../vim-8.2.1182/src/testing.c       2020-06-15 19:51:52.633404482 +0200
--- src/testing.c       2020-07-11 19:36:40.731379852 +0200
***************
*** 546,556 ****
--- 546,558 ----
      garray_T  ga;
      int               save_trylevel = trylevel;
      int               called_emsg_before = called_emsg;
+     int               wrong_arg = FALSE;
  
      // trylevel must be zero for a ":throw" command to be considered failed
      trylevel = 0;
      suppress_errthrow = TRUE;
      emsg_silent = TRUE;
+     emsg_assert_fails_used = TRUE;
  
      do_cmdline_cmd(cmd);
      if (called_emsg == called_emsg_before)
***************
*** 565,578 ****
      else if (argvars[1].v_type != VAR_UNKNOWN)
      {
        char_u  buf[NUMBUFLEN];
!       char    *error = (char *)tv_get_string_buf_chk(&argvars[1], buf);
  
!       if (error == NULL
!                 || strstr((char *)get_vim_var_str(VV_ERRMSG), error) == NULL)
        {
            prepare_assert_error(&ga);
            fill_assert_error(&ga, &argvars[2], NULL, &argvars[1],
!                                     get_vim_var_tv(VV_ERRMSG), ASSERT_OTHER);
            ga_concat(&ga, (char_u *)": ");
            assert_append_cmd_or_arg(&ga, argvars, cmd);
            assert_error(&ga);
--- 567,624 ----
      else if (argvars[1].v_type != VAR_UNKNOWN)
      {
        char_u  buf[NUMBUFLEN];
!       char_u  *expected;
!       int     error_found = FALSE;
!       char_u  *actual = emsg_assert_fails_msg == NULL ? (char_u *)"[unknown]"
!                                                      : emsg_assert_fails_msg;
  
!       if (argvars[1].v_type == VAR_STRING)
        {
+           expected = tv_get_string_buf_chk(&argvars[1], buf);
+           error_found = expected == NULL
+                          || strstr((char *)actual, (char *)expected) == NULL;
+       }
+       else if (argvars[1].v_type == VAR_LIST)
+       {
+           list_T      *list = argvars[1].vval.v_list;
+           typval_T    *tv;
+ 
+           if (list == NULL || list->lv_len < 1 || list->lv_len > 2)
+           {
+               wrong_arg = TRUE;
+               goto theend;
+           }
+           CHECK_LIST_MATERIALIZE(list);
+           tv = &list->lv_first->li_tv;
+           expected = tv_get_string_buf_chk(tv, buf);
+           if (!pattern_match(expected, actual, FALSE))
+           {
+               error_found = TRUE;
+           }
+           else if (list->lv_len == 2)
+           {
+               tv = &list->lv_u.mat.lv_last->li_tv;
+               actual = get_vim_var_str(VV_ERRMSG);
+               expected = tv_get_string_buf_chk(tv, buf);
+               if (!pattern_match(expected, actual, FALSE))
+                   error_found = TRUE;
+           }
+       }
+       else
+       {
+           wrong_arg = TRUE;
+           goto theend;
+       }
+ 
+       if (error_found)
+       {
+           typval_T actual_tv;
+ 
            prepare_assert_error(&ga);
+           actual_tv.v_type = VAR_STRING;
+           actual_tv.vval.v_string = actual;
            fill_assert_error(&ga, &argvars[2], NULL, &argvars[1],
!                                                    &actual_tv, ASSERT_OTHER);
            ga_concat(&ga, (char_u *)": ");
            assert_append_cmd_or_arg(&ga, argvars, cmd);
            assert_error(&ga);
***************
*** 581,591 ****
--- 627,642 ----
        }
      }
  
+ theend:
      trylevel = save_trylevel;
      suppress_errthrow = FALSE;
      emsg_silent = FALSE;
      emsg_on_display = FALSE;
+     emsg_assert_fails_used = FALSE;
+     VIM_CLEAR(emsg_assert_fails_msg);
      set_vim_var_string(VV_ERRMSG, NULL, 0);
+     if (wrong_arg)
+       emsg(_("E856: assert_fails() second argument must be a string or a list 
with one or two strings"));
  }
  
  /*
*** ../vim-8.2.1182/src/testdir/test_autocmd.vim        2020-06-26 
19:44:02.976305905 +0200
--- src/testdir/test_autocmd.vim        2020-07-11 17:39:02.261816771 +0200
***************
*** 168,176 ****
      exe 'autocmd BufUnload <buffer> ' . (lastbuf + 1) . 'bwipeout!'
    augroup END
  
!   " Todo: check for E937 generated first
!   " call assert_fails('edit bb.txt', 'E937:')
!   call assert_fails('edit bb.txt', 'E517:')
  
    autocmd! test_autocmd_bufunload
    augroup! test_autocmd_bufunload
--- 168,174 ----
      exe 'autocmd BufUnload <buffer> ' . (lastbuf + 1) . 'bwipeout!'
    augroup END
  
!   call assert_fails('edit bb.txt', ['E937:', 'E517:'])
  
    autocmd! test_autocmd_bufunload
    augroup! test_autocmd_bufunload
***************
*** 1745,1753 ****
  func Test_nocatch_wipe_all_buffers()
    " Real nasty autocommand: wipe all buffers on any event.
    au * * bwipe *
!   " Get E93 first?
!   " call assert_fails('next x', 'E93:')
!   call assert_fails('next x', 'E517:')
    bwipe
    au!
  endfunc
--- 1743,1749 ----
  func Test_nocatch_wipe_all_buffers()
    " Real nasty autocommand: wipe all buffers on any event.
    au * * bwipe *
!   call assert_fails('next x', ['E94:', 'E517:'])
    bwipe
    au!
  endfunc
***************
*** 1756,1762 ****
    if has('quickfix')
      " Nasty autocommand: wipe buffer on any event.
      au * x bwipe
!     call assert_fails('lv½ /x', 'E480')
      au!
    endif
  endfunc
--- 1752,1758 ----
    if has('quickfix')
      " Nasty autocommand: wipe buffer on any event.
      au * x bwipe
!     call assert_fails('lv½ /x', 'E937')
      au!
    endif
  endfunc
***************
*** 2570,2576 ****
    augroup END
    let save_cpo = &cpo
    set cpo+=f
!   call assert_fails('r Xfile', 'E484:')
    call assert_equal('somefile', @%)
    let &cpo = save_cpo
    augroup TestAuCmd
--- 2566,2572 ----
    augroup END
    let save_cpo = &cpo
    set cpo+=f
!   call assert_fails('r Xfile', ['E812:', 'E484:'])
    call assert_equal('somefile', @%)
    let &cpo = save_cpo
    augroup TestAuCmd
*** ../vim-8.2.1182/src/testdir/test_buffer.vim 2020-06-24 13:37:03.162425194 
+0200
--- src/testdir/test_buffer.vim 2020-07-11 16:34:19.765249125 +0200
***************
*** 76,82 ****
      let caught_E90 = 1
    endtry
    call assert_equal(1, caught_E90)
!   call assert_fails('$bunload', 'E515:')
  endfunc
  
  " Test for :buffer, :bnext, :bprevious, :brewind, :blast and :bmodified
--- 76,82 ----
      let caught_E90 = 1
    endtry
    call assert_equal(1, caught_E90)
!   call assert_fails('$bunload', 'E90:')
  endfunc
  
  " Test for :buffer, :bnext, :bprevious, :brewind, :blast and :bmodified
***************
*** 278,284 ****
    call assert_equal(1, &modified)
    call assert_equal('', @%)
    call feedkeys('y', 'L')
!   call assert_fails('confirm b Xfile', 'E37:')
    call assert_equal(1, &modified)
    call assert_equal('', @%)
    call feedkeys('n', 'L')
--- 278,284 ----
    call assert_equal(1, &modified)
    call assert_equal('', @%)
    call feedkeys('y', 'L')
!   call assert_fails('confirm b Xfile', ['', 'E37:'])
    call assert_equal(1, &modified)
    call assert_equal('', @%)
    call feedkeys('n', 'L')
*** ../vim-8.2.1182/src/testdir/test_cd.vim     2020-06-14 13:50:51.743717732 
+0200
--- src/testdir/test_cd.vim     2020-07-11 16:36:11.304964507 +0200
***************
*** 4,10 ****
  
  func Test_cd_large_path()
    " This used to crash with a heap write overflow.
!   call assert_fails('cd ' . repeat('x', 5000), 'E472:')
  endfunc
  
  func Test_cd_up_and_down()
--- 4,10 ----
  
  func Test_cd_large_path()
    " This used to crash with a heap write overflow.
!   call assert_fails('cd ' . repeat('x', 5000), 'E344:')
  endfunc
  
  func Test_cd_up_and_down()
***************
*** 93,99 ****
    call assert_equal('testdir', fnamemodify(getcwd(1, 1), ':t'))
  
    " Error case
!   call assert_fails("call chdir('dir-abcd')", 'E472:')
    silent! let d = chdir("dir_abcd")
    call assert_equal("", d)
    " Should not crash
--- 93,99 ----
    call assert_equal('testdir', fnamemodify(getcwd(1, 1), ':t'))
  
    " Error case
!   call assert_fails("call chdir('dir-abcd')", 'E344:')
    silent! let d = chdir("dir_abcd")
    call assert_equal("", d)
    " Should not crash
*** ../vim-8.2.1182/src/testdir/test_channel.vim        2020-06-19 
19:10:55.477199015 +0200
--- src/testdir/test_channel.vim        2020-07-11 17:40:55.097498393 +0200
***************
*** 559,565 ****
    call assert_equal(1, found)
  
    call assert_fails("call job_stop('abc')", 'E475:')
!   call assert_fails("call job_stop(job, [])", 'E474:')
    call assert_fails("call job_stop(test_null_job())", 'E916:')
  
    " Try to use the job and channel where a number is expected. This is not
--- 559,565 ----
    call assert_equal(1, found)
  
    call assert_fails("call job_stop('abc')", 'E475:')
!   call assert_fails("call job_stop(job, [])", 'E730:')
    call assert_fails("call job_stop(test_null_job())", 'E916:')
  
    " Try to use the job and channel where a number is expected. This is not
***************
*** 1641,1655 ****
    call assert_fails("call job_start('ls', {'in_top' : -1})", 'E475:')
    call assert_fails("call job_start('ls', {'in_bot' : -1})", 'E475:')
    call assert_fails("call job_start('ls', {'channel' : -1})", 'E475:')
!   call assert_fails("call job_start('ls', {'callback' : -1})", 'E475:')
!   call assert_fails("call job_start('ls', {'out_cb' : -1})", 'E475:')
!   call assert_fails("call job_start('ls', {'err_cb' : -1})", 'E475:')
!   call assert_fails("call job_start('ls', {'close_cb' : -1})", 'E475:')
!   call assert_fails("call job_start('ls', {'exit_cb' : -1})", 'E475:')
    call assert_fails("call job_start('ls', {'term_name' : []})", 'E475:')
    call assert_fails("call job_start('ls', {'term_finish' : 'run'})", 'E475:')
    call assert_fails("call job_start('ls', {'term_api' : []})", 'E475:')
!   call assert_fails("call job_start('ls', {'stoponexit' : []})", 'E475:')
    call assert_fails("call job_start('ls', {'in_io' : 'file'})", 'E920:')
    call assert_fails("call job_start('ls', {'out_io' : 'file'})", 'E920:')
    call assert_fails("call job_start('ls', {'err_io' : 'file'})", 'E920:')
--- 1641,1655 ----
    call assert_fails("call job_start('ls', {'in_top' : -1})", 'E475:')
    call assert_fails("call job_start('ls', {'in_bot' : -1})", 'E475:')
    call assert_fails("call job_start('ls', {'channel' : -1})", 'E475:')
!   call assert_fails("call job_start('ls', {'callback' : -1})", 'E921:')
!   call assert_fails("call job_start('ls', {'out_cb' : -1})", 'E921:')
!   call assert_fails("call job_start('ls', {'err_cb' : -1})", 'E921:')
!   call assert_fails("call job_start('ls', {'close_cb' : -1})", 'E921:')
!   call assert_fails("call job_start('ls', {'exit_cb' : -1})", 'E921:')
    call assert_fails("call job_start('ls', {'term_name' : []})", 'E475:')
    call assert_fails("call job_start('ls', {'term_finish' : 'run'})", 'E475:')
    call assert_fails("call job_start('ls', {'term_api' : []})", 'E475:')
!   call assert_fails("call job_start('ls', {'stoponexit' : []})", 'E730:')
    call assert_fails("call job_start('ls', {'in_io' : 'file'})", 'E920:')
    call assert_fails("call job_start('ls', {'out_io' : 'file'})", 'E920:')
    call assert_fails("call job_start('ls', {'err_io' : 'file'})", 'E920:')
*** ../vim-8.2.1182/src/testdir/test_clientserver.vim   2020-04-26 
15:59:51.202952140 +0200
--- src/testdir/test_clientserver.vim   2020-07-11 16:43:51.035522790 +0200
***************
*** 84,90 ****
    call remote_send(v:servername, ":let g:testvar2 = 75\<CR>")
    call feedkeys('', 'x')
    call assert_equal(75, g:testvar2)
!   call assert_fails('let v = remote_expr(v:servername, "/2")', 'E449:')
  
    call remote_send(name, ":call server2client(expand('<client>'), 'got 
it')\<CR>", 'g:myserverid')
    call assert_equal('got it', g:myserverid->remote_read(2))
--- 84,90 ----
    call remote_send(v:servername, ":let g:testvar2 = 75\<CR>")
    call feedkeys('', 'x')
    call assert_equal(75, g:testvar2)
!   call assert_fails('let v = remote_expr(v:servername, "/2")', ['E15:.*/2'])
  
    call remote_send(name, ":call server2client(expand('<client>'), 'got 
it')\<CR>", 'g:myserverid')
    call assert_equal('got it', g:myserverid->remote_read(2))
***************
*** 166,173 ****
  
    call assert_fails('call remote_startserver([])', 'E730:')
    call assert_fails("let x = remote_peek([])", 'E730:')
!   call assert_fails("let x = remote_read('vim10')", 'E277:')
!   call assert_fails("call server2client('abc', 'xyz')", 'E258:')
  endfunc
  
  " Uncomment this line to get a debugging log
--- 166,173 ----
  
    call assert_fails('call remote_startserver([])', 'E730:')
    call assert_fails("let x = remote_peek([])", 'E730:')
!   call assert_fails("let x = remote_read('vim10')", ['E573:.*vim10'])
!   call assert_fails("call server2client('abc', 'xyz')", ['E573:.*abc'])
  endfunc
  
  " Uncomment this line to get a debugging log
*** ../vim-8.2.1182/src/testdir/test_cmdline.vim        2020-07-03 
18:15:02.830048103 +0200
--- src/testdir/test_cmdline.vim        2020-07-11 17:42:00.189315096 +0200
***************
*** 855,861 ****
    call assert_equal('B', getline(2))
  
    let @/ = 'apple'
!   call assert_fails('\/print', 'E486:')
  
    bwipe!
  endfunc
--- 855,861 ----
    call assert_equal('B', getline(2))
  
    let @/ = 'apple'
!   call assert_fails('\/print', ['E486:.*apple'])
  
    bwipe!
  endfunc
***************
*** 972,978 ****
    call assert_match("foo\nbar", join(log, "\n"))
    call delete('Xlog')
    call mkdir('Xdir')
!   call assert_fails('set verbosefile=Xdir', 'E474:')
    call delete('Xdir', 'd')
  endfunc
  
--- 972,978 ----
    call assert_match("foo\nbar", join(log, "\n"))
    call delete('Xlog')
    call mkdir('Xdir')
!   call assert_fails('set verbosefile=Xdir', ['E484:.*Xdir', 'E474:'])
    call delete('Xdir', 'd')
  endfunc
  
***************
*** 1208,1214 ****
    call assert_fails('call feedkeys("q:\<C-W>\<C-W>\<CR>", "xt")', 'E11:')
    new
    set modified
!   call assert_fails('call feedkeys("q/:qall\<CR>", "xt")', 'E162:')
    close!
    call feedkeys("q/:close\<CR>", "xt")
    call assert_equal(1, winnr('$'))
--- 1208,1214 ----
    call assert_fails('call feedkeys("q:\<C-W>\<C-W>\<CR>", "xt")', 'E11:')
    new
    set modified
!   call assert_fails('call feedkeys("q/:qall\<CR>", "xt")', ['E37:', 'E162:'])
    close!
    call feedkeys("q/:close\<CR>", "xt")
    call assert_equal(1, winnr('$'))
*** ../vim-8.2.1182/src/testdir/test_cpoptions.vim      2020-06-20 
16:05:29.012185251 +0200
--- src/testdir/test_cpoptions.vim      2020-07-11 16:48:19.394745994 +0200
***************
*** 104,110 ****
    source Xfile
    call assert_equal([1, 2], g:l)
    set cpo+=C
!   call assert_fails('source Xfile', 'E10:')
    call delete('Xfile')
    let &cpo = save_cpo
  endfunc
--- 104,110 ----
    source Xfile
    call assert_equal([1, 2], g:l)
    set cpo+=C
!   call assert_fails('source Xfile', ['E697:', 'E10:'])
    call delete('Xfile')
    let &cpo = save_cpo
  endfunc
*** ../vim-8.2.1182/src/testdir/test_cscope.vim 2020-07-05 14:10:09.745447442 
+0200
--- src/testdir/test_cscope.vim 2020-07-11 16:49:54.682477219 +0200
***************
*** 189,195 ****
  
      " Test: 'cst' option
      set nocst
!     call assert_fails('tag TEST_COUNT', 'E426:')
      set cst
      let a = execute('tag TEST_COUNT')
      call assert_match('(1 of 1): <<TEST_COUNT>> #define TEST_COUNT 50000', a)
--- 189,195 ----
  
      " Test: 'cst' option
      set nocst
!     call assert_fails('tag TEST_COUNT', 'E433:')
      set cst
      let a = execute('tag TEST_COUNT')
      call assert_match('(1 of 1): <<TEST_COUNT>> #define TEST_COUNT 50000', a)
*** ../vim-8.2.1182/src/if_cscope.c     2019-12-04 21:02:31.000000000 +0100
--- src/if_cscope.c     2020-07-11 16:52:18.906075507 +0200
***************
*** 2152,2158 ****
                ch = getc(csinfo[i].fr_fp);
            if (ch == EOF)
            {
-               PERROR("cs_read_prompt EOF");
                if (buf != NULL && buf[0] != NUL)
                    (void)semsg(cs_emsg, buf);
                else if (p_csverbose)
--- 2152,2157 ----
*** ../vim-8.2.1182/src/testdir/test_excmd.vim  2020-07-06 21:24:53.097898730 
+0200
--- src/testdir/test_excmd.vim  2020-07-11 17:53:03.399173462 +0200
***************
*** 335,342 ****
    call assert_fails('redir abc', 'E475:')
    call assert_fails('redir => 1abc', 'E474:')
    call assert_fails('redir => a b', 'E488:')
!   call assert_fails('redir => abc[1]', 'E474:')
!   let b=0zFF
    call assert_fails('redir =>> b', 'E734:')
    unlet b
  
--- 335,342 ----
    call assert_fails('redir abc', 'E475:')
    call assert_fails('redir => 1abc', 'E474:')
    call assert_fails('redir => a b', 'E488:')
!   call assert_fails('redir => abc[1]', 'E121:')
!   let b = 0zFF
    call assert_fails('redir =>> b', 'E734:')
    unlet b
  
*** ../vim-8.2.1182/src/evalvars.c      2020-07-08 15:16:15.534128895 +0200
--- src/evalvars.c      2020-07-11 19:44:56.282111571 +0200
***************
*** 3388,3394 ****
      int
  var_redir_start(char_u *name, int append)
  {
!     int               save_emsg;
      int               err;
      typval_T  tv;
  
--- 3388,3394 ----
      int
  var_redir_start(char_u *name, int append)
  {
!     int               called_emsg_before;
      int               err;
      typval_T  tv;
  
***************
*** 3432,3439 ****
  
      // check if we can write to the variable: set it to or append an empty
      // string
!     save_emsg = did_emsg;
!     did_emsg = FALSE;
      tv.v_type = VAR_STRING;
      tv.vval.v_string = (char_u *)"";
      if (append)
--- 3432,3438 ----
  
      // check if we can write to the variable: set it to or append an empty
      // string
!     called_emsg_before = called_emsg;
      tv.v_type = VAR_STRING;
      tv.vval.v_string = (char_u *)"";
      if (append)
***************
*** 3441,3449 ****
      else
        set_var_lval(redir_lval, redir_endp, &tv, TRUE, 0, (char_u *)"=");
      clear_lval(redir_lval);
!     err = did_emsg;
!     did_emsg |= save_emsg;
!     if (err)
      {
        redir_endp = NULL;  // don't store a value, only cleanup
        var_redir_stop();
--- 3440,3446 ----
      else
        set_var_lval(redir_lval, redir_endp, &tv, TRUE, 0, (char_u *)"=");
      clear_lval(redir_lval);
!     if (called_emsg > called_emsg_before)
      {
        redir_endp = NULL;  // don't store a value, only cleanup
        var_redir_stop();
*** ../vim-8.2.1182/src/testdir/test_expr.vim   2020-06-27 13:11:46.863462713 
+0200
--- src/testdir/test_expr.vim   2020-07-11 21:07:51.277821992 +0200
***************
*** 478,484 ****
    endif
    eval set->setmatches()
    call assert_equal(exp, getmatches())
!   call assert_fails('let m = setmatches([], [])', 'E957:')
  endfunc
  
  func Test_empty_concatenate()
--- 478,484 ----
    endif
    eval set->setmatches()
    call assert_equal(exp, getmatches())
!   call assert_fails('let m = setmatches([], [])', 'E745:')
  endfunc
  
  func Test_empty_concatenate()
*** ../vim-8.2.1182/src/testdir/test_functions.vim      2020-06-22 
21:34:24.331583419 +0200
--- src/testdir/test_functions.vim      2020-07-11 21:10:20.409362393 +0200
***************
*** 224,230 ****
    if has('float')
      call assert_fails('call str2nr(1.2)', 'E806:')
    endif
!   call assert_fails('call str2nr(10, [])', 'E474:')
  endfunc
  
  func Test_strftime()
--- 224,230 ----
    if has('float')
      call assert_fails('call str2nr(1.2)', 'E806:')
    endif
!   call assert_fails('call str2nr(10, [])', 'E745:')
  endfunc
  
  func Test_strftime()
***************
*** 1702,1712 ****
    call assert_equal(4, 'abcd'->libcallnr(libc, 'strlen'))
    call assert_equal(char2nr('A'), char2nr('a')->libcallnr(libc, 'toupper'))
  
!   call assert_fails("call libcall(libc, 'Xdoesnotexist_', '')", 'E364:')
!   call assert_fails("call libcallnr(libc, 'Xdoesnotexist_', '')", 'E364:')
  
!   call assert_fails("call libcall('Xdoesnotexist_', 'getenv', 'HOME')", 
'E364:')
!   call assert_fails("call libcallnr('Xdoesnotexist_', 'strlen', 'abcd')", 
'E364:')
  endfunc
  
  sandbox function Fsandbox()
--- 1702,1712 ----
    call assert_equal(4, 'abcd'->libcallnr(libc, 'strlen'))
    call assert_equal(char2nr('A'), char2nr('a')->libcallnr(libc, 'toupper'))
  
!   call assert_fails("call libcall(libc, 'Xdoesnotexist_', '')", ['', 'E364:'])
!   call assert_fails("call libcallnr(libc, 'Xdoesnotexist_', '')", ['', 
'E364:'])
  
!   call assert_fails("call libcall('Xdoesnotexist_', 'getenv', 'HOME')", ['', 
'E364:'])
!   call assert_fails("call libcallnr('Xdoesnotexist_', 'strlen', 'abcd')", 
['', 'E364:'])
  endfunc
  
  sandbox function Fsandbox()
*** ../vim-8.2.1182/src/testdir/test_json.vim   2020-07-11 14:26:03.760458189 
+0200
--- src/testdir/test_json.vim   2020-07-11 21:13:03.952699846 +0200
***************
*** 181,187 ****
    call assert_fails('call json_decode("{\"n\",1}")', "E491:")
    call assert_fails('call json_decode("{-}")', "E491:")
    if has('float')
!     call assert_fails('call json_decode("{3.14:1}")', "E474:")
    endif
  
    call assert_fails('call json_decode("[foobar]")', "E491:")
--- 181,187 ----
    call assert_fails('call json_decode("{\"n\",1}")', "E491:")
    call assert_fails('call json_decode("{-}")', "E491:")
    if has('float')
!     call assert_fails('call json_decode("{3.14:1}")', "E806:")
    endif
  
    call assert_fails('call json_decode("[foobar]")', "E491:")
***************
*** 292,316 ****
    call assert_equal({'n': 1}, js_decode('{"n":1,}'))
    call assert_equal({'n': '1'}, js_decode("{'n':'1',}"))
  
!   call assert_fails('call js_decode("\"")', "E474:")
!   call assert_fails('call js_decode("blah")', "E474:")
!   call assert_fails('call js_decode("true blah")', "E474:")
!   call assert_fails('call js_decode("<foobar>")', "E474:")
! 
!   call assert_fails('call js_decode("{")', "E474:")
!   call assert_fails('call js_decode("{foobar}")', "E474:")
!   call assert_fails('call js_decode("{\"n\",")', "E474:")
!   call assert_fails('call js_decode("{\"n\":")', "E474:")
!   call assert_fails('call js_decode("{\"n\":1")', "E474:")
!   call assert_fails('call js_decode("{\"n\":1,")', "E474:")
!   call assert_fails('call js_decode("{\"n\",1}")', "E474:")
!   call assert_fails('call js_decode("{-}")', "E474:")
! 
!   call assert_fails('call js_decode("[foobar]")', "E474:")
!   call assert_fails('call js_decode("[")', "E474:")
!   call assert_fails('call js_decode("[1")', "E474:")
!   call assert_fails('call js_decode("[1,")', "E474:")
!   call assert_fails('call js_decode("[1 2]")', "E474:")
  
    call assert_equal(s:varl5, js_decode(s:jsl5))
  endfunc
--- 292,316 ----
    call assert_equal({'n': 1}, js_decode('{"n":1,}'))
    call assert_equal({'n': '1'}, js_decode("{'n':'1',}"))
  
!   call assert_fails('call js_decode("\"")', "E491:")
!   call assert_fails('call js_decode("blah")', "E491:")
!   call assert_fails('call js_decode("true blah")', "E488:")
!   call assert_fails('call js_decode("<foobar>")', "E491:")
! 
!   call assert_fails('call js_decode("{")', "E491:")
!   call assert_fails('call js_decode("{foobar}")', "E491:")
!   call assert_fails('call js_decode("{\"n\",")', "E491:")
!   call assert_fails('call js_decode("{\"n\":")', "E491:")
!   call assert_fails('call js_decode("{\"n\":1")', "E491:")
!   call assert_fails('call js_decode("{\"n\":1,")', "E491:")
!   call assert_fails('call js_decode("{\"n\",1}")', "E491:")
!   call assert_fails('call js_decode("{-}")', "E491:")
! 
!   call assert_fails('call js_decode("[foobar]")', "E491:")
!   call assert_fails('call js_decode("[")', "E491:")
!   call assert_fails('call js_decode("[1")', "E491:")
!   call assert_fails('call js_decode("[1,")', "E491:")
!   call assert_fails('call js_decode("[1 2]")', "E491:")
  
    call assert_equal(s:varl5, js_decode(s:jsl5))
  endfunc
*** ../vim-8.2.1182/src/testdir/test_let.vim    2020-04-24 22:47:26.775359283 
+0200
--- src/testdir/test_let.vim    2020-07-11 21:13:45.144543412 +0200
***************
*** 279,285 ****
    let l = [1, 2, 3]
    call assert_fails('let l[:] = 5', 'E709:')
  
!   call assert_fails('let x:lnum=5', 'E488:')
    call assert_fails('let v:=5', 'E461:')
    call assert_fails('let [a]', 'E474:')
    call assert_fails('let [a, b] = [', 'E697:')
--- 279,285 ----
    let l = [1, 2, 3]
    call assert_fails('let l[:] = 5', 'E709:')
  
!   call assert_fails('let x:lnum=5', ['E121:', 'E488:'])
    call assert_fails('let v:=5', 'E461:')
    call assert_fails('let [a]', 'E474:')
    call assert_fails('let [a, b] = [', 'E697:')
*** ../vim-8.2.1182/src/testdir/test_listdict.vim       2020-06-29 
20:09:33.266762870 +0200
--- src/testdir/test_listdict.vim       2020-07-11 21:15:32.248152566 +0200
***************
*** 674,683 ****
    endif
  
    call assert_fails('call reverse("")', 'E899:')
!   call assert_fails('call uniq([1, 2], {x, y -> []})', 'E882:')
    call assert_fails("call sort([1, 2], function('min'), 1)", "E715:")
    call assert_fails("call sort([1, 2], function('invalid_func'))", "E700:")
!   call assert_fails("call sort([1, 2], function('min'))", "E702:")
  endfunc
  
  " reduce a list or a blob
--- 674,683 ----
    endif
  
    call assert_fails('call reverse("")', 'E899:')
!   call assert_fails('call uniq([1, 2], {x, y -> []})', 'E745:')
    call assert_fails("call sort([1, 2], function('min'), 1)", "E715:")
    call assert_fails("call sort([1, 2], function('invalid_func'))", "E700:")
!   call assert_fails("call sort([1, 2], function('min'))", "E118:")
  endfunc
  
  " reduce a list or a blob
***************
*** 960,966 ****
    call assert_fails('echo d[1:2]', 'E719:')
    call assert_fails("let v = [4, 6][{-> 1}]", 'E729:')
    call assert_fails("let v = range(5)[2:[]]", 'E730:')
!   call assert_fails("let v = range(5)[2:{-> 2}(]", 'E116:')
    call assert_fails("let v = range(5)[2:3", 'E111:')
    call assert_fails("let l = insert([1,2,3], 4, 10)", 'E684:')
    call assert_fails("let l = insert([1,2,3], 4, -10)", 'E684:')
--- 960,966 ----
    call assert_fails('echo d[1:2]', 'E719:')
    call assert_fails("let v = [4, 6][{-> 1}]", 'E729:')
    call assert_fails("let v = range(5)[2:[]]", 'E730:')
!   call assert_fails("let v = range(5)[2:{-> 2}(]", ['E15:', 'E116:'])
    call assert_fails("let v = range(5)[2:3", 'E111:')
    call assert_fails("let l = insert([1,2,3], 4, 10)", 'E684:')
    call assert_fails("let l = insert([1,2,3], 4, -10)", 'E684:')
*** ../vim-8.2.1182/src/testdir/test_listener.vim       2020-04-26 
15:59:51.206952132 +0200
--- src/testdir/test_listener.vim       2020-07-11 21:16:15.743999728 +0200
***************
*** 210,217 ****
  
    " Invalid arguments
    call assert_fails('call listener_add([])', 'E921:')
!   call assert_fails('call listener_add("s:StoreListArgs", [])', 'E158:')
!   call assert_fails('call listener_flush([])', 'E158:')
  endfunc
  
  func s:StoreBufList(buf, start, end, added, list)
--- 210,217 ----
  
    " Invalid arguments
    call assert_fails('call listener_add([])', 'E921:')
!   call assert_fails('call listener_add("s:StoreListArgs", [])', 'E730:')
!   call assert_fails('call listener_flush([])', 'E730:')
  endfunc
  
  func s:StoreBufList(buf, start, end, added, list)
*** ../vim-8.2.1182/src/testdir/test_match.vim  2020-06-28 13:10:17.546125326 
+0200
--- src/testdir/test_match.vim  2020-07-11 21:20:30.107157944 +0200
***************
*** 160,166 ****
  
  func Test_matchadd_error()
    call assert_fails("call matchadd('GroupDoesNotExist', 'X')", 'E28:')
!   call assert_fails("call matchadd('Search', '\\(')", 'E475:')
    call assert_fails("call matchadd('Search', 'XXX', 1, 123, 1)", 'E715:')
    call assert_fails("call matchadd('Error', 'XXX', 1, 3)", 'E798:')
    call assert_fails("call matchadd('Error', 'XXX', 1, 0)", 'E799:')
--- 160,166 ----
  
  func Test_matchadd_error()
    call assert_fails("call matchadd('GroupDoesNotExist', 'X')", 'E28:')
!   call assert_fails("call matchadd('Search', '\\(')", 'E54:')
    call assert_fails("call matchadd('Search', 'XXX', 1, 123, 1)", 'E715:')
    call assert_fails("call matchadd('Error', 'XXX', 1, 3)", 'E798:')
    call assert_fails("call matchadd('Error', 'XXX', 1, 0)", 'E799:')
*** ../vim-8.2.1182/src/testdir/test_menu.vim   2020-04-26 15:59:51.206952132 
+0200
--- src/testdir/test_menu.vim   2020-07-11 21:21:12.639024138 +0200
***************
*** 153,159 ****
    call assert_fails('menu Test.Foo.Bar', 'E327:')
    call assert_fails('cmenu Test.Foo', 'E328:')
    call assert_fails('emenu x Test.Foo', 'E475:')
!   call assert_fails('emenu Test.Foo.Bar', 'E334:')
    call assert_fails('menutranslate Test', 'E474:')
  
    silent! unmenu Foo
--- 153,159 ----
    call assert_fails('menu Test.Foo.Bar', 'E327:')
    call assert_fails('cmenu Test.Foo', 'E328:')
    call assert_fails('emenu x Test.Foo', 'E475:')
!   call assert_fails('emenu Test.Foo.Bar', 'E327:')
    call assert_fails('menutranslate Test', 'E474:')
  
    silent! unmenu Foo
*** ../vim-8.2.1182/src/testdir/test_method.vim 2020-03-26 14:11:52.903001238 
+0100
--- src/testdir/test_method.vim 2020-07-11 21:22:18.494820076 +0200
***************
*** 131,139 ****
    eval [1, 2, 3]  
        \ ->sort(
        \ )
!   call assert_fails('eval [1, 2, 3]-> sort()', 'E260:')
    call assert_fails('eval [1, 2, 3]->sort ()', 'E274:')
!   call assert_fails('eval [1, 2, 3]-> sort ()', 'E260:')
  endfunc
  
  func Test_method_lambda()
--- 131,139 ----
    eval [1, 2, 3]  
        \ ->sort(
        \ )
!   call assert_fails('eval [1, 2, 3]-> sort()', 'E15:')
    call assert_fails('eval [1, 2, 3]->sort ()', 'E274:')
!   call assert_fails('eval [1, 2, 3]-> sort ()', 'E15:')
  endfunc
  
  func Test_method_lambda()
*** ../vim-8.2.1182/src/testdir/test_normal.vim 2020-06-24 13:37:03.162425194 
+0200
--- src/testdir/test_normal.vim 2020-07-11 21:23:13.986650769 +0200
***************
*** 1384,1390 ****
    call setline(1, '---')
    call assert_fails('normal! ggv2lK', 'E349:')
    call setline(1, ['abc', 'xyz'])
!   call assert_fails("normal! gg2lv2h\<C-]>", 'E426:')
    call assert_beeps("normal! ggVjK")
  
    " clean up
--- 1384,1390 ----
    call setline(1, '---')
    call assert_fails('normal! ggv2lK', 'E349:')
    call setline(1, ['abc', 'xyz'])
!   call assert_fails("normal! gg2lv2h\<C-]>", 'E433:')
    call assert_beeps("normal! ggVjK")
  
    " clean up
*** ../vim-8.2.1182/src/testdir/test_popup.vim  2020-04-30 22:29:36.630024126 
+0200
--- src/testdir/test_popup.vim  2020-07-11 21:24:20.262451358 +0200
***************
*** 367,373 ****
    setlocal completefunc=DummyCompleteTwo
    call setline(1, 'two')
    /^two
!   call assert_fails('call feedkeys("A\<C-X>\<C-U>\<C-N>\<Esc>", "x")', 
'E764:')
    call assert_notequal(winid, win_getid())
    q!
    call assert_equal(winid, win_getid())
--- 367,373 ----
    setlocal completefunc=DummyCompleteTwo
    call setline(1, 'two')
    /^two
!   call assert_fails('call feedkeys("A\<C-X>\<C-U>\<C-N>\<Esc>", "x")', 
'E839:')
    call assert_notequal(winid, win_getid())
    q!
    call assert_equal(winid, win_getid())
*** ../vim-8.2.1182/src/testdir/test_python2.vim        2020-07-07 
20:50:35.570759730 +0200
--- src/testdir/test_python2.vim        2020-07-11 21:25:32.050238381 +0200
***************
*** 73,79 ****
  
    " Try modifying a buffer with 'nomodifiable' set
    set nomodifiable
!   call assert_fails('pydo toupper(line)', 'cannot save undo information')
    set modifiable
  
    " Invalid command
--- 73,79 ----
  
    " Try modifying a buffer with 'nomodifiable' set
    set nomodifiable
!   call assert_fails('pydo toupper(line)', 'E21:')
    set modifiable
  
    " Invalid command
*** ../vim-8.2.1182/src/testdir/test_python3.vim        2020-07-07 
20:50:35.570759730 +0200
--- src/testdir/test_python3.vim        2020-07-11 21:28:28.609725303 +0200
***************
*** 90,96 ****
  
    " Try modifying a buffer with 'nomodifiable' set
    set nomodifiable
!   call assert_fails('py3do toupper(line)', 'cannot save undo information')
    set modifiable
  
    " Invalid command
--- 90,96 ----
  
    " Try modifying a buffer with 'nomodifiable' set
    set nomodifiable
!   call assert_fails('py3do toupper(line)', 'E21:')
    set modifiable
  
    " Invalid command
***************
*** 290,296 ****
    call assert_equal("\nNone",          execute('py3 
print(vim.eval("v:none"))'))
    call assert_equal("\nb'\\xab\\x12'", execute('py3 
print(vim.eval("0zab12"))'))
  
!   call assert_fails('py3 vim.eval("1+")', 'vim.error: invalid expression')
  endfunc
  
  " Test range objects, see :help python-range
--- 290,296 ----
    call assert_equal("\nNone",          execute('py3 
print(vim.eval("v:none"))'))
    call assert_equal("\nb'\\xab\\x12'", execute('py3 
print(vim.eval("0zab12"))'))
  
!   call assert_fails('py3 vim.eval("1+")', 'E15: Invalid expression')
  endfunc
  
  " Test range objects, see :help python-range
***************
*** 305,314 ****
    call assert_equal('3', py3eval('b[2]'))
    call assert_equal('4', py3eval('r[2]'))
  
!   call assert_fails('py3 r[3] = "x"', 'IndexError: line number out of range')
!   call assert_fails('py3 x = r[3]', 'IndexError: line number out of range')
!   call assert_fails('py3 r["a"] = "x"', 'TypeError: index must be int or 
slice, not str')
!   call assert_fails('py3 x = r["a"]', 'TypeError: index must be int or slice, 
not str')
  
    py3 del r[:]
    call assert_equal(['1', '5', '6'], getline(1, '$'))
--- 305,314 ----
    call assert_equal('3', py3eval('b[2]'))
    call assert_equal('4', py3eval('r[2]'))
  
!   call assert_fails('py3 r[3] = "x"', ['Traceback', 'IndexError: line number 
out of range'])
!   call assert_fails('py3 x = r[3]', ['Traceback', 'IndexError: line number 
out of range'])
!   call assert_fails('py3 r["a"] = "x"', ['Traceback', 'TypeError: index must 
be int or slice, not str'])
!   call assert_fails('py3 x = r["a"]', ['Traceback', 'TypeError: index must be 
int or slice, not str'])
  
    py3 del r[:]
    call assert_equal(['1', '5', '6'], getline(1, '$'))
*** ../vim-8.2.1182/src/testdir/test_quickfix.vim       2020-06-30 
22:11:40.962938410 +0200
--- src/testdir/test_quickfix.vim       2020-07-11 21:29:57.493471680 +0200
***************
*** 693,699 ****
    " Search for non existing help string
    call assert_fails('Xhelpgrep a1b2c3', 'E480:')
    " Invalid regular expression
!   call assert_fails('Xhelpgrep \@<!', 'E480:')
  endfunc
  
  func Test_helpgrep()
--- 693,699 ----
    " Search for non existing help string
    call assert_fails('Xhelpgrep a1b2c3', 'E480:')
    " Invalid regular expression
!   call assert_fails('Xhelpgrep \@<!', 'E866:')
  endfunc
  
  func Test_helpgrep()
***************
*** 3748,3755 ****
  
  func Test_lvimgrep_crash2()
    au BufNewFile x sfind
!   call assert_fails('lvimgrep x x', 'E480:')
!   call assert_fails('lvimgrep x x x', 'E480:')
  
    au! BufNewFile
  endfunc
--- 3748,3755 ----
  
  func Test_lvimgrep_crash2()
    au BufNewFile x sfind
!   call assert_fails('lvimgrep x x', 'E471:')
!   call assert_fails('lvimgrep x x x', 'E471:')
  
    au! BufNewFile
  endfunc
*** ../vim-8.2.1182/src/testdir/test_random.vim 2020-02-08 16:39:45.423835674 
+0100
--- src/testdir/test_random.vim 2020-07-11 21:30:31.417375587 +0200
***************
*** 31,41 ****
    endif
    call assert_fails('echo srand([1])', 'E745:')
    call assert_fails('echo rand("burp")', 'E475:')
!   call assert_fails('echo rand([1, 2, 3])', 'E475:')
!   call assert_fails('echo rand([[1], 2, 3, 4])', 'E475:')
!   call assert_fails('echo rand([1, [2], 3, 4])', 'E475:')
!   call assert_fails('echo rand([1, 2, [3], 4])', 'E475:')
!   call assert_fails('echo rand([1, 2, 3, [4]])', 'E475:')
  
    call test_settime(0)
  endfunc
--- 31,41 ----
    endif
    call assert_fails('echo srand([1])', 'E745:')
    call assert_fails('echo rand("burp")', 'E475:')
!   call assert_fails('echo rand([1, 2, 3])', 'E730:')
!   call assert_fails('echo rand([[1], 2, 3, 4])', 'E730:')
!   call assert_fails('echo rand([1, [2], 3, 4])', 'E730:')
!   call assert_fails('echo rand([1, 2, [3], 4])', 'E730:')
!   call assert_fails('echo rand([1, 2, 3, [4]])', 'E730:')
  
    call test_settime(0)
  endfunc
*** ../vim-8.2.1182/src/testdir/test_search.vim 2020-06-07 17:19:57.822773778 
+0200
--- src/testdir/test_search.vim 2020-07-11 21:34:08.612767493 +0200
***************
*** 1494,1501 ****
      call assert_fails(";//p", 'E35:')
      call assert_fails("??p", 'E35:')
      call assert_fails(";??p", 'E35:')
!     call assert_fails('g//p', 'E476:')
!     call assert_fails('v//p', 'E476:')
      call writefile(v:errors, 'Xresult')
      qall!
    [SCRIPT]
--- 1494,1501 ----
      call assert_fails(";//p", 'E35:')
      call assert_fails("??p", 'E35:')
      call assert_fails(";??p", 'E35:')
!     call assert_fails('g//p', ['E35:', 'E476:'])
!     call assert_fails('v//p', ['E35:', 'E476:'])
      call writefile(v:errors, 'Xresult')
      qall!
    [SCRIPT]
***************
*** 1516,1523 ****
      call assert_fails('exe "normal /~\<CR>"', 'E33:')
      call assert_fails('exe "normal ?~\<CR>"', 'E33:')
      set regexpengine=2
!     call assert_fails('exe "normal /~\<CR>"', 'E383:')
!     call assert_fails('exe "normal ?~\<CR>"', 'E383:')
      set regexpengine&
      call writefile(v:errors, 'Xresult')
      qall!
--- 1516,1523 ----
      call assert_fails('exe "normal /~\<CR>"', 'E33:')
      call assert_fails('exe "normal ?~\<CR>"', 'E33:')
      set regexpengine=2
!     call assert_fails('exe "normal /~\<CR>"', ['E33:', 'E383:'])
!     call assert_fails('exe "normal ?~\<CR>"', ['E33:', 'E383:'])
      set regexpengine&
      call writefile(v:errors, 'Xresult')
      qall!
*** ../vim-8.2.1182/src/testdir/test_signs.vim  2020-05-31 21:27:58.335221898 
+0200
--- src/testdir/test_signs.vim  2020-07-11 21:35:33.680531957 +0200
***************
*** 458,470 ****
    call assert_fails('call sign_place(5, "", "sign1", "@", {"lnum" : 10})',
              \ 'E158:')
    call assert_fails('call sign_place(5, "", "sign1", [], {"lnum" : 10})',
!             \ 'E158:')
    call assert_fails('call sign_place(21, "", "sign1", "Xsign",
              \ {"lnum" : -1})', 'E474:')
    call assert_fails('call sign_place(22, "", "sign1", "Xsign",
              \ {"lnum" : 0})', 'E474:')
    call assert_fails('call sign_place(22, "", "sign1", "Xsign",
!             \ {"lnum" : []})', 'E474:')
    call assert_equal(-1, sign_place(1, "*", "sign1", "Xsign", {"lnum" : 10}))
  
    " Tests for sign_getplaced()
--- 458,470 ----
    call assert_fails('call sign_place(5, "", "sign1", "@", {"lnum" : 10})',
              \ 'E158:')
    call assert_fails('call sign_place(5, "", "sign1", [], {"lnum" : 10})',
!             \ 'E730:')
    call assert_fails('call sign_place(21, "", "sign1", "Xsign",
              \ {"lnum" : -1})', 'E474:')
    call assert_fails('call sign_place(22, "", "sign1", "Xsign",
              \ {"lnum" : 0})', 'E474:')
    call assert_fails('call sign_place(22, "", "sign1", "Xsign",
!             \ {"lnum" : []})', 'E745:')
    call assert_equal(-1, sign_place(1, "*", "sign1", "Xsign", {"lnum" : 10}))
  
    " Tests for sign_getplaced()
***************
*** 1724,1730 ****
    call assert_fails("call sign_jump(5, 'g5', 'foo')", 'E157:')
    call assert_fails('call sign_jump([], "", "foo")', 'E745:')
    call assert_fails('call sign_jump(2, [], "foo")', 'E730:')
!   call assert_fails('call sign_jump(2, "", {})', 'E158:')
    call assert_fails('call sign_jump(2, "", "baz")', 'E158:')
  
    sign unplace * group=*
--- 1724,1730 ----
    call assert_fails("call sign_jump(5, 'g5', 'foo')", 'E157:')
    call assert_fails('call sign_jump([], "", "foo")', 'E745:')
    call assert_fails('call sign_jump(2, [], "foo")', 'E730:')
!   call assert_fails('call sign_jump(2, "", {})', 'E731:')
    call assert_fails('call sign_jump(2, "", "baz")', 'E158:')
  
    sign unplace * group=*
*** ../vim-8.2.1182/src/testdir/test_spell.vim  2020-06-10 21:46:56.391670009 
+0200
--- src/testdir/test_spell.vim  2020-07-11 21:36:00.424458140 +0200
***************
*** 334,340 ****
      return [[{}, {}]]
    endfunc
    set spellsuggest=expr:MySuggest3()
!   call assert_fails("call spellsuggest('baord')", 'E728:')
  
    set nospell spellsuggest&
    delfunc MySuggest
--- 334,340 ----
      return [[{}, {}]]
    endfunc
    set spellsuggest=expr:MySuggest3()
!   call assert_fails("call spellsuggest('baord')", 'E731:')
  
    set nospell spellsuggest&
    delfunc MySuggest
*** ../vim-8.2.1182/src/testdir/test_substitute.vim     2020-04-11 
17:09:28.324426586 +0200
--- src/testdir/test_substitute.vim     2020-07-11 21:37:37.168192093 +0200
***************
*** 235,241 ****
  
    call assert_fails('s/FOO/bar/', 'E486:')
    call assert_fails('s/foo/bar/@', 'E488:')
!   call assert_fails('s/\(/bar/', 'E476:')
    call assert_fails('s afooabara', 'E146:')
    call assert_fails('s\\a', 'E10:')
  
--- 235,241 ----
  
    call assert_fails('s/FOO/bar/', 'E486:')
    call assert_fails('s/foo/bar/@', 'E488:')
!   call assert_fails('s/\(/bar/', 'E54:')
    call assert_fails('s afooabara', 'E146:')
    call assert_fails('s\\a', 'E10:')
  
***************
*** 817,825 ****
  func Test_sub_with_no_last_pat()
    let lines =<< trim [SCRIPT]
      call assert_fails('~', 'E33:')
!     call assert_fails('s//abc/g', 'E476:')
!     call assert_fails('s\/bar', 'E476:')
!     call assert_fails('s\&bar&', 'E476:')
      call writefile(v:errors, 'Xresult')
      qall!
    [SCRIPT]
--- 817,825 ----
  func Test_sub_with_no_last_pat()
    let lines =<< trim [SCRIPT]
      call assert_fails('~', 'E33:')
!     call assert_fails('s//abc/g', 'E35:')
!     call assert_fails('s\/bar', 'E35:')
!     call assert_fails('s\&bar&', 'E33:')
      call writefile(v:errors, 'Xresult')
      qall!
    [SCRIPT]
*** ../vim-8.2.1182/src/testdir/test_syntax.vim 2020-06-06 18:37:47.860138513 
+0200
--- src/testdir/test_syntax.vim 2020-07-11 21:38:07.476109003 +0200
***************
*** 348,354 ****
    call assert_fails('syntax sync x', 'E404:')
    call assert_fails('syntax keyword Abc a[', 'E789:')
    call assert_fails('syntax keyword Abc a[bc]d', 'E890:')
!   call assert_fails('syntax cluster Abc add=A add=', 'E475:')
  
    " Test for too many \z\( and unmatched \z\(
    " Not able to use assert_fails() here because both E50:/E879: and E475:
--- 348,354 ----
    call assert_fails('syntax sync x', 'E404:')
    call assert_fails('syntax keyword Abc a[', 'E789:')
    call assert_fails('syntax keyword Abc a[bc]d', 'E890:')
!   call assert_fails('syntax cluster Abc add=A add=', 'E406:')
  
    " Test for too many \z\( and unmatched \z\(
    " Not able to use assert_fails() here because both E50:/E879: and E475:
*** ../vim-8.2.1182/src/testdir/test_tagjump.vim        2020-06-26 
20:41:35.628844696 +0200
--- src/testdir/test_tagjump.vim        2020-07-11 21:39:38.279860627 +0200
***************
*** 8,14 ****
    CheckFeature quickfix
  
    set notagstack
!   call assert_fails('ptag does_not_exist_tag_name', 'E426')
    set tagstack&vim
  endfunc
  
--- 8,14 ----
    CheckFeature quickfix
  
    set notagstack
!   call assert_fails('ptag does_not_exist_tag_name', 'E433')
    set tagstack&vim
  endfunc
  
***************
*** 345,351 ****
          \ "Xmain.c,64",
          \ ";;;;\x7f1,0",
        \ ], 'Xtags')
!   call assert_fails('tag foo', 'E426:')
  
    call delete('Xtags')
    call delete('Xtags2')
--- 345,351 ----
          \ "Xmain.c,64",
          \ ";;;;\x7f1,0",
        \ ], 'Xtags')
!   call assert_fails('tag foo', 'E431:')
  
    call delete('Xtags')
    call delete('Xtags2')
*** ../vim-8.2.1182/src/testdir/test_taglist.vim        2020-03-25 
22:23:41.898363595 +0100
--- src/testdir/test_taglist.vim        2020-07-11 21:40:39.911692568 +0200
***************
*** 84,90 ****
  endfunc
  
  func Test_tags_too_long()
!   call assert_fails('tag ' . repeat('x', 1020), 'E426')
    tags
  endfunc
  
--- 84,90 ----
  endfunc
  
  func Test_tags_too_long()
!   call assert_fails('tag ' . repeat('x', 1020), ['E433', 'E426'])
    tags
  endfunc
  
*** ../vim-8.2.1182/src/testdir/test_terminal.vim       2020-07-11 
13:09:17.377971831 +0200
--- src/testdir/test_terminal.vim       2020-07-11 21:47:42.106627264 +0200
***************
*** 65,71 ****
  
    setlocal modifiable
    exe "normal Axxx\<Esc>"
!   call assert_fails(buf . 'bwipe', 'E517')
    undo
  
    exe buf . 'bwipe'
--- 65,71 ----
  
    setlocal modifiable
    exe "normal Axxx\<Esc>"
!   call assert_fails(buf . 'bwipe', ['E89:', 'E517'])
    undo
  
    exe buf . 'bwipe'
***************
*** 89,95 ****
  
  func Test_terminal_wipe_buffer()
    let buf = Run_shell_in_terminal({})
!   call assert_fails(buf . 'bwipe', 'E517')
    exe buf . 'bwipe!'
    call WaitForAssert({-> assert_equal('dead', job_status(g:job))})
    call assert_equal("", bufname(buf))
--- 89,95 ----
  
  func Test_terminal_wipe_buffer()
    let buf = Run_shell_in_terminal({})
!   call assert_fails(buf . 'bwipe', ['E89', 'E517'])
    exe buf . 'bwipe!'
    call WaitForAssert({-> assert_equal('dead', job_status(g:job))})
    call assert_equal("", bufname(buf))
***************
*** 635,641 ****
  
  func Test_terminal_list_args()
    let buf = term_start([&shell, &shellcmdflag, 'echo "123"'])
!   call assert_fails(buf . 'bwipe', 'E517')
    exe buf . 'bwipe!'
    call assert_equal("", bufname(buf))
  endfunction
--- 635,641 ----
  
  func Test_terminal_list_args()
    let buf = term_start([&shell, &shellcmdflag, 'echo "123"'])
!   call assert_fails(buf . 'bwipe', ['E89', 'E517'])
    exe buf . 'bwipe!'
    call assert_equal("", bufname(buf))
  endfunction
***************
*** 981,999 ****
    let cmd = "call term_start(0, {'curwin' : 1, 'term_finish' : 'close'})"
    call assert_fails(cmd, 'E474')
    let cmd = "call term_start('', {'term_name' : []})"
!   call assert_fails(cmd, 'E475')
    let cmd = "call term_start('', {'term_finish' : 'axby'})"
    call assert_fails(cmd, 'E475')
    let cmd = "call term_start('', {'eof_chars' : []})"
!   call assert_fails(cmd, 'E475:')
    let cmd = "call term_start('', {'term_kill' : []})"
!   call assert_fails(cmd, 'E475:')
    let cmd = "call term_start('', {'tty_type' : []})"
!   call assert_fails(cmd, 'E475:')
    let cmd = "call term_start('', {'tty_type' : 'abc'})"
    call assert_fails(cmd, 'E475:')
    let cmd = "call term_start('', {'term_highlight' : []})"
!   call assert_fails(cmd, 'E475:')
    if has('gui') || has('termguicolors')
      let cmd = "call term_start('', {'ansi_colors' : 'abc'})"
      call assert_fails(cmd, 'E475:')
--- 981,999 ----
    let cmd = "call term_start(0, {'curwin' : 1, 'term_finish' : 'close'})"
    call assert_fails(cmd, 'E474')
    let cmd = "call term_start('', {'term_name' : []})"
!   call assert_fails(cmd, 'E730')
    let cmd = "call term_start('', {'term_finish' : 'axby'})"
    call assert_fails(cmd, 'E475')
    let cmd = "call term_start('', {'eof_chars' : []})"
!   call assert_fails(cmd, 'E730:')
    let cmd = "call term_start('', {'term_kill' : []})"
!   call assert_fails(cmd, 'E730:')
    let cmd = "call term_start('', {'tty_type' : []})"
!   call assert_fails(cmd, 'E730:')
    let cmd = "call term_start('', {'tty_type' : 'abc'})"
    call assert_fails(cmd, 'E475:')
    let cmd = "call term_start('', {'term_highlight' : []})"
!   call assert_fails(cmd, 'E730:')
    if has('gui') || has('termguicolors')
      let cmd = "call term_start('', {'ansi_colors' : 'abc'})"
      call assert_fails(cmd, 'E475:')
***************
*** 1242,1248 ****
    let closedbuf = winbufnr('')
    quit
    call assert_fails("call term_dumpload('dumps/Test_popup_command_01.dump', 
{'bufnr': closedbuf})", 'E475:')
!   call assert_fails('call term_dumpload([])', 'E474:')
    call assert_fails('call term_dumpload("xabcy.dump")', 'E485:')
  
    quit
--- 1242,1248 ----
    let closedbuf = winbufnr('')
    quit
    call assert_fails("call term_dumpload('dumps/Test_popup_command_01.dump', 
{'bufnr': closedbuf})", 'E475:')
!   call assert_fails('call term_dumpload([])', 'E730:')
    call assert_fails('call term_dumpload("xabcy.dump")', 'E485:')
  
    quit
***************
*** 1272,1278 ****
    call assert_equal('           bbbbbbbbbbbbbbbbbb ', getline(26)[0:29])
    quit
  
!   call assert_fails('call term_dumpdiff("X1.dump", [])', 'E474:')
    call assert_fails('call term_dumpdiff("X1.dump", "X2.dump")', 'E485:')
    call writefile([], 'X1.dump')
    call assert_fails('call term_dumpdiff("X1.dump", "X2.dump")', 'E485:')
--- 1272,1278 ----
    call assert_equal('           bbbbbbbbbbbbbbbbbb ', getline(26)[0:29])
    quit
  
!   call assert_fails('call term_dumpdiff("X1.dump", [])', 'E730:')
    call assert_fails('call term_dumpdiff("X1.dump", "X2.dump")', 'E485:')
    call writefile([], 'X1.dump')
    call assert_fails('call term_dumpdiff("X1.dump", "X2.dump")', 'E485:')
***************
*** 1555,1561 ****
    call assert_equal(['hello', 123], g:called_arg2)
    call StopVimInTerminal(buf)
  
!   call assert_fails("call term_start('ls', {'term_api' : []})", 'E475:')
  
    unlet! g:called_bufnum2
    unlet! g:called_arg2
--- 1555,1561 ----
    call assert_equal(['hello', 123], g:called_arg2)
    call StopVimInTerminal(buf)
  
!   call assert_fails("call term_start('ls', {'term_api' : []})", 'E730:')
  
    unlet! g:called_bufnum2
    unlet! g:called_arg2
***************
*** 1761,1767 ****
    eval buf->term_setansicolors(colors)
  
    let colors[4] = 'Invalid'
!   call assert_fails('call term_setansicolors(buf, colors)', 'E474:')
    call assert_fails('call term_setansicolors(buf, {})', 'E714:')
  
    call StopShellInTerminal(buf)
--- 1761,1767 ----
    eval buf->term_setansicolors(colors)
  
    let colors[4] = 'Invalid'
!   call assert_fails('call term_setansicolors(buf, colors)', 'E254:')
    call assert_fails('call term_setansicolors(buf, {})', 'E714:')
  
    call StopShellInTerminal(buf)
*** ../vim-8.2.1182/src/testdir/test_textprop.vim       2020-05-30 
15:31:57.854700879 +0200
--- src/testdir/test_textprop.vim       2020-07-11 21:48:44.718474056 +0200
***************
*** 1214,1220 ****
    call assert_fails('call prop_clear(1, 2, [])', 'E715:')
    call assert_fails('call prop_clear(-1, 2)', 'E16:')
    call assert_fails('call prop_find(test_null_dict())', 'E474:')
!   call assert_fails('call prop_find({"bufnr" : []})', 'E158:')
    call assert_fails('call prop_find({})', 'E968:')
    call assert_fails('call prop_find({}, "x")', 'E474:')
    call assert_fails('call prop_find({"lnum" : -2})', 'E16:')
--- 1214,1220 ----
    call assert_fails('call prop_clear(1, 2, [])', 'E715:')
    call assert_fails('call prop_clear(-1, 2)', 'E16:')
    call assert_fails('call prop_find(test_null_dict())', 'E474:')
!   call assert_fails('call prop_find({"bufnr" : []})', 'E730:')
    call assert_fails('call prop_find({})', 'E968:')
    call assert_fails('call prop_find({}, "x")', 'E474:')
    call assert_fails('call prop_find({"lnum" : -2})', 'E16:')
***************
*** 1223,1233 ****
    call assert_fails('call prop_remove([])', 'E474:')
    call assert_fails('call prop_remove({}, -2)', 'E16:')
    call assert_fails('call prop_remove({})', 'E968:')
!   call assert_fails('call prop_type_add([], {})', 'E474:')
    call assert_fails("call prop_type_change('long', {'xyz' : 10})", 'E971:')
!   call assert_fails("call prop_type_delete([])", 'E474:')
    call assert_fails("call prop_type_delete('xyz', [])", 'E715:')
!   call assert_fails("call prop_type_get([])", 'E474:')
    call assert_fails("call prop_type_get('', [])", 'E474:')
    call assert_fails("call prop_type_list([])", 'E715:')
  endfunc
--- 1223,1233 ----
    call assert_fails('call prop_remove([])', 'E474:')
    call assert_fails('call prop_remove({}, -2)', 'E16:')
    call assert_fails('call prop_remove({})', 'E968:')
!   call assert_fails('call prop_type_add([], {})', 'E730:')
    call assert_fails("call prop_type_change('long', {'xyz' : 10})", 'E971:')
!   call assert_fails("call prop_type_delete([])", 'E730:')
    call assert_fails("call prop_type_delete('xyz', [])", 'E715:')
!   call assert_fails("call prop_type_get([])", 'E730:')
    call assert_fails("call prop_type_get('', [])", 'E474:')
    call assert_fails("call prop_type_list([])", 'E715:')
  endfunc
*** ../vim-8.2.1182/src/testdir/test_trycatch.vim       2020-04-04 
14:00:34.197098267 +0200
--- src/testdir/test_trycatch.vim       2020-07-11 21:49:51.798308440 +0200
***************
*** 2000,2006 ****
  func Test_try_catch_errors()
    call assert_fails('throw |', 'E471:')
    call assert_fails("throw \n ", 'E471:')
!   call assert_fails('catch abc', 'E603:')
    call assert_fails('try | let i = 1| finally | catch | endtry', 'E604:')
    call assert_fails('finally', 'E606:')
    call assert_fails('try | finally | finally | endtry', 'E607:')
--- 2000,2006 ----
  func Test_try_catch_errors()
    call assert_fails('throw |', 'E471:')
    call assert_fails("throw \n ", 'E471:')
!   call assert_fails('catch abc', 'E654:')
    call assert_fails('try | let i = 1| finally | catch | endtry', 'E604:')
    call assert_fails('finally', 'E606:')
    call assert_fails('try | finally | finally | endtry', 'E607:')
*** ../vim-8.2.1182/src/testdir/test_vim9_disassemble.vim       2020-07-09 
21:20:41.912126818 +0200
--- src/testdir/test_vim9_disassemble.vim       2020-07-11 21:50:42.294182823 
+0200
***************
*** 34,41 ****
    assert_fails('disass NotCompiled', 'E1062:')
    assert_fails('disass', 'E471:')
    assert_fails('disass [', 'E475:')
!   assert_fails('disass 234', 'E475:')
!   assert_fails('disass <XX>foo', 'E475:')
  
    let res = execute('disass s:ScriptFuncLoad')
    assert_match('<SNR>\d*_ScriptFuncLoad.*' ..
--- 34,41 ----
    assert_fails('disass NotCompiled', 'E1062:')
    assert_fails('disass', 'E471:')
    assert_fails('disass [', 'E475:')
!   assert_fails('disass 234', 'E129:')
!   assert_fails('disass <XX>foo', 'E129:')
  
    let res = execute('disass s:ScriptFuncLoad')
    assert_match('<SNR>\d*_ScriptFuncLoad.*' ..
*** ../vim-8.2.1182/src/testdir/test_vim9_func.vim      2020-07-11 
15:20:43.776269437 +0200
--- src/testdir/test_vim9_func.vim      2020-07-11 21:57:49.741096940 +0200
***************
*** 746,752 ****
  def Test_unknown_function()
    CheckDefExecFailure([
        'let Ref: func = function("NotExist")',
!       'delfunc g:NotExist'], 'E130:')
  enddef
  
  def RefFunc(Ref: func(string): string): string
--- 746,752 ----
  def Test_unknown_function()
    CheckDefExecFailure([
        'let Ref: func = function("NotExist")',
!       'delfunc g:NotExist'], 'E700:')
  enddef
  
  def RefFunc(Ref: func(string): string): string
*** ../vim-8.2.1182/src/vim9compile.c   2020-07-11 13:40:40.412931858 +0200
--- src/vim9compile.c   2020-07-11 21:57:21.277170194 +0200
***************
*** 912,918 ****
   * - return FAIL.
   */
      static int
! need_type(type_T *actual, type_T *expected, int offset, cctx_T *cctx)
  {
      if (check_type(expected, actual, FALSE) == OK)
        return OK;
--- 912,923 ----
   * - return FAIL.
   */
      static int
! need_type(
!       type_T  *actual,
!       type_T  *expected,
!       int     offset,
!       cctx_T  *cctx,
!       int     silent)
  {
      if (check_type(expected, actual, FALSE) == OK)
        return OK;
***************
*** 921,927 ****
            && !(actual->tt_type == VAR_FUNC
                && (actual->tt_member == &t_any || actual->tt_argcount < 0)))
      {
!       type_mismatch(expected, actual);
        return FAIL;
      }
      generate_TYPECHECK(cctx, expected, offset);
--- 926,933 ----
            && !(actual->tt_type == VAR_FUNC
                && (actual->tt_member == &t_any || actual->tt_argcount < 0)))
      {
!       if (!silent)
!           type_mismatch(expected, actual);
        return FAIL;
      }
      generate_TYPECHECK(cctx, expected, offset);
***************
*** 1538,1544 ****
            else
                expected = ufunc->uf_va_type->tt_member;
            actual = ((type_T **)stack->ga_data)[stack->ga_len - argcount + i];
!           if (need_type(actual, expected, -argcount + i, cctx) == FAIL)
            {
                arg_type_mismatch(expected, actual, i + 1);
                return FAIL;
--- 1544,1550 ----
            else
                expected = ufunc->uf_va_type->tt_member;
            actual = ((type_T **)stack->ga_data)[stack->ga_len - argcount + i];
!           if (need_type(actual, expected, -argcount + i, cctx, TRUE) == FAIL)
            {
                arg_type_mismatch(expected, actual, i + 1);
                return FAIL;
***************
*** 4640,4647 ****
                emsg(_("E1096: Returning a value in a function without a return 
type"));
                return NULL;
            }
!           if (need_type(stack_type, cctx->ctx_ufunc->uf_ret_type, -1, cctx)
!                                                                      == FAIL)
            return NULL;
        }
      }
--- 4646,4653 ----
                emsg(_("E1096: Returning a value in a function without a return 
type"));
                return NULL;
            }
!           if (need_type(stack_type, cctx->ctx_ufunc->uf_ret_type, -1,
!                                                         cctx, FALSE) == FAIL)
            return NULL;
        }
      }
***************
*** 4942,4948 ****
                emsg(_(e_cannot_use_void));
                goto theend;
            }
!           if (need_type(stacktype, &t_list_any, -1, cctx) == FAIL)
                goto theend;
            generate_CHECKLEN(cctx, semicolon ? var_count - 1 : var_count,
                                                                    semicolon);
--- 4948,4954 ----
                emsg(_(e_cannot_use_void));
                goto theend;
            }
!           if (need_type(stacktype, &t_list_any, -1, cctx, FALSE) == FAIL)
                goto theend;
            generate_CHECKLEN(cctx, semicolon ? var_count - 1 : var_count,
                                                                    semicolon);
***************
*** 5356,5368 ****
                            if (use_type == NULL)
                                use_type = &t_void;
                        }
!                       if (need_type(stacktype, use_type, -1, cctx)
                                                                   == FAIL)
                            goto theend;
                    }
                }
                else if (*p != '=' && need_type(stacktype, member_type, -1,
!                                                            cctx) == FAIL)
                    goto theend;
            }
            else if (cmdidx == CMD_const)
--- 5362,5374 ----
                            if (use_type == NULL)
                                use_type = &t_void;
                        }
!                       if (need_type(stacktype, use_type, -1, cctx, FALSE)
                                                                   == FAIL)
                            goto theend;
                    }
                }
                else if (*p != '=' && need_type(stacktype, member_type, -1,
!                                                         cctx, FALSE) == FAIL)
                    goto theend;
            }
            else if (cmdidx == CMD_const)
***************
*** 5439,5445 ****
            if (*op == '.')
                expected = &t_string;
            stacktype = ((type_T **)stack->ga_data)[stack->ga_len - 1];
!           if (need_type(stacktype, expected, -1, cctx) == FAIL)
                goto theend;
  
            if (*op == '.')
--- 5445,5451 ----
            if (*op == '.')
                expected = &t_string;
            stacktype = ((type_T **)stack->ga_data)[stack->ga_len - 1];
!           if (need_type(stacktype, expected, -1, cctx, FALSE) == FAIL)
                goto theend;
  
            if (*op == '.')
***************
*** 6128,6134 ****
      // Now that we know the type of "var", check that it is a list, now or at
      // runtime.
      vartype = ((type_T **)stack->ga_data)[stack->ga_len - 1];
!     if (need_type(vartype, &t_list_any, -1, cctx) == FAIL)
      {
        drop_scope(cctx);
        return NULL;
--- 6134,6140 ----
      // Now that we know the type of "var", check that it is a list, now or at
      // runtime.
      vartype = ((type_T **)stack->ga_data)[stack->ga_len - 1];
!     if (need_type(vartype, &t_list_any, -1, cctx, FALSE) == FAIL)
      {
        drop_scope(cctx);
        return NULL;
*** ../vim-8.2.1182/src/testdir/test_vim9_script.vim    2020-07-08 
18:38:05.649287913 +0200
--- src/testdir/test_vim9_script.vim    2020-07-11 22:01:29.080529554 +0200
***************
*** 305,311 ****
    call CheckDefFailure(['let true = 1'], 'E1034:')
    call CheckDefFailure(['let false = 1'], 'E1034:')
  
!   call CheckDefFailure(['[a; b; c] = g:list'], 'E1001:')
    call CheckDefExecFailure(['let a: number',
                              '[a] = test_null_list()'], 'E1093:')
    call CheckDefExecFailure(['let a: number',
--- 305,311 ----
    call CheckDefFailure(['let true = 1'], 'E1034:')
    call CheckDefFailure(['let false = 1'], 'E1034:')
  
!   call CheckDefFailure(['[a; b; c] = g:list'], 'E452:')
    call CheckDefExecFailure(['let a: number',
                              '[a] = test_null_list()'], 'E1093:')
    call CheckDefExecFailure(['let a: number',
***************
*** 897,903 ****
    CheckScriptFailure(['vim9script', 'scriptversion 2'], 'E1040:')
    CheckScriptFailure(['export let some = 123'], 'E1042:')
    CheckScriptFailure(['import some from "./Xexport.vim"'], 'E1048:')
!   CheckScriptFailure(['vim9script', 'export let g:some'], 'E1044:')
    CheckScriptFailure(['vim9script', 'export echo 134'], 'E1043:')
  
    CheckScriptFailure(['vim9script', 'let str: string', 'str = 1234'], 
'E1013:')
--- 897,903 ----
    CheckScriptFailure(['vim9script', 'scriptversion 2'], 'E1040:')
    CheckScriptFailure(['export let some = 123'], 'E1042:')
    CheckScriptFailure(['import some from "./Xexport.vim"'], 'E1048:')
!   CheckScriptFailure(['vim9script', 'export let g:some'], 'E1022:')
    CheckScriptFailure(['vim9script', 'export echo 134'], 'E1043:')
  
    CheckScriptFailure(['vim9script', 'let str: string', 'str = 1234'], 
'E1013:')
***************
*** 1723,1729 ****
        '  echo "yes"',
        'catch',
        'endtry# comment',
!       ], 'E600:')
  
    CheckScriptSuccess([
        'vim9script',
--- 1723,1729 ----
        '  echo "yes"',
        'catch',
        'endtry# comment',
!       ], 'E488:')
  
    CheckScriptSuccess([
        'vim9script',
*** ../vim-8.2.1182/src/testdir/test_viminfo.vim        2020-06-20 
16:05:29.016185239 +0200
--- src/testdir/test_viminfo.vim        2020-07-11 22:02:49.880319475 +0200
***************
*** 705,717 ****
  
    " Too many errors in viminfo file
    call writefile(repeat(["a 123"], 15), 'Xviminfo')
!   call assert_fails('rv Xviminfo', 'E136:')
  
    call writefile(['>'] + repeat(['@'], 10), 'Xviminfo')
!   call assert_fails('rv Xviminfo', 'E136:')
  
    call writefile(repeat(['"@'], 15), 'Xviminfo')
!   call assert_fails('rv Xviminfo', 'E136:')
  
    call delete('Xviminfo')
  endfunc
--- 705,717 ----
  
    " Too many errors in viminfo file
    call writefile(repeat(["a 123"], 15), 'Xviminfo')
!   call assert_fails('rv Xviminfo', 'E575:')
  
    call writefile(['>'] + repeat(['@'], 10), 'Xviminfo')
!   call assert_fails('rv Xviminfo', 'E576:')
  
    call writefile(repeat(['"@'], 15), 'Xviminfo')
!   call assert_fails('rv Xviminfo', 'E577:')
  
    call delete('Xviminfo')
  endfunc
*** ../vim-8.2.1182/src/testdir/test_winbuf_close.vim   2020-04-15 
20:05:42.740054643 +0200
--- src/testdir/test_winbuf_close.vim   2020-07-11 22:03:27.912220422 +0200
***************
*** 115,121 ****
    call assert_equal('Xtest2', bufname('%'))
    quit!
    call assert_equal('Xtest3', bufname('%'))
!   call assert_fails('silent! quit!', 'E162')
    call assert_equal('Xtest1', bufname('%'))
  
    call delete('Xtest1')
--- 115,121 ----
    call assert_equal('Xtest2', bufname('%'))
    quit!
    call assert_equal('Xtest3', bufname('%'))
!   call assert_fails('silent! quit!', 'E37')
    call assert_equal('Xtest1', bufname('%'))
  
    call delete('Xtest1')
*** ../vim-8.2.1182/src/testdir/test_window_cmd.vim     2020-06-26 
20:41:35.628844696 +0200
--- src/testdir/test_window_cmd.vim     2020-07-11 22:04:12.960102981 +0200
***************
*** 569,575 ****
    au * 0 vs xxx
    arg 0
    argadd
!   call assert_fails("all", "E249:")
    au!
    bwipe xxx
    call assert_equal(&columns, winwidth(0))
--- 569,575 ----
    au * 0 vs xxx
    arg 0
    argadd
!   call assert_fails("all", "E242:")
    au!
    bwipe xxx
    call assert_equal(&columns, winwidth(0))
*** ../vim-8.2.1182/src/testdir/test_writefile.vim      2020-06-15 
19:51:52.637404472 +0200
--- src/testdir/test_writefile.vim      2020-07-11 22:06:39.731719577 +0200
***************
*** 310,316 ****
      autocmd BufWritePre Xfile enew | write
    augroup END
    e Xfile
!   call assert_fails('lockmarks write', 'E203:')
    augroup WriteTest
      au!
    augroup END
--- 310,316 ----
      autocmd BufWritePre Xfile enew | write
    augroup END
    e Xfile
!   call assert_fails('lockmarks write', ['E32', 'E203:'])
    augroup WriteTest
      au!
    augroup END
*** ../vim-8.2.1182/src/testdir/test_regexp_latin.vim   2020-04-11 
17:09:28.324426586 +0200
--- src/testdir/test_regexp_latin.vim   2020-07-11 22:08:11.207480188 +0200
***************
*** 83,89 ****
    set re=2
    call assert_fails('/a**', 'E871:')
    call assert_fails('/a*\+', 'E871:')
!   call assert_fails('/a\{a}', 'E870:')
    set re=0
  endfunc
  
--- 83,89 ----
    set re=2
    call assert_fails('/a**', 'E871:')
    call assert_fails('/a*\+', 'E871:')
!   call assert_fails('/a\{a}', 'E554:')
    set re=0
  endfunc
  
*** ../vim-8.2.1182/src/testdir/test_utf8.vim   2020-04-20 16:49:56.705830066 
+0200
--- src/testdir/test_utf8.vim   2020-07-11 22:08:41.983399573 +0200
***************
*** 20,26 ****
      call assert_equal(exp[i][1], inp[i]->strchars(0))
      call assert_equal(exp[i][2], strchars(inp[i], 1))
    endfor
!   call assert_fails("let v=strchars('abc', [])", 'E474:')
    call assert_fails("let v=strchars('abc', 2)", 'E474:')
  endfunc
  
--- 20,26 ----
      call assert_equal(exp[i][1], inp[i]->strchars(0))
      call assert_equal(exp[i][2], strchars(inp[i], 1))
    endfor
!   call assert_fails("let v=strchars('abc', [])", 'E745:')
    call assert_fails("let v=strchars('abc', 2)", 'E474:')
  endfunc
  
*** ../vim-8.2.1182/src/testdir/test_global.vim 2020-06-05 20:03:07.461321471 
+0200
--- src/testdir/test_global.vim 2020-07-11 22:09:33.315265065 +0200
***************
*** 36,42 ****
  func Test_global_error()
    call assert_fails('g\\a', 'E10:')
    call assert_fails('g', 'E148:')
!   call assert_fails('g/\(/y', 'E476:')
  endfunc
  
  " Test for printing lines using :g with different search patterns
--- 36,42 ----
  func Test_global_error()
    call assert_fails('g\\a', 'E10:')
    call assert_fails('g', 'E148:')
!   call assert_fails('g/\(/y', 'E54:')
  endfunc
  
  " Test for printing lines using :g with different search patterns
*** ../vim-8.2.1182/src/testdir/test_tagfunc.vim        2020-01-05 
20:35:39.967830421 +0100
--- src/testdir/test_tagfunc.vim        2020-07-11 22:10:04.879182294 +0200
***************
*** 73,79 ****
      return v:null
    endfunc
    set tags= tfu=NullTagFunc
!   call assert_fails('tag nothing', 'E426')
    delf NullTagFunc
  
    bwipe!
--- 73,79 ----
      return v:null
    endfunc
    set tags= tfu=NullTagFunc
!   call assert_fails('tag nothing', 'E433')
    delf NullTagFunc
  
    bwipe!
*** ../vim-8.2.1182/src/version.c       2020-07-11 15:20:43.776269437 +0200
--- src/version.c       2020-07-11 15:58:16.598723236 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1183,
  /**/

-- 
The goal of science is to build better mousetraps.
The goal of nature is to build better mice.

 /// 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/202007112015.06BKFUpx2305810%40masaka.moolenaar.net.

Raspunde prin e-mail lui