Patch 8.2.3183
Problem:    Duplicate error numbers.
Solution:   Adjust the error numbers.
Files:      src/errors.h, src/testdir/test_vim9_builtin.vim


*** ../vim-8.2.3182/src/errors.h        2021-07-18 20:40:29.550272444 +0200
--- src/errors.h        2021-07-19 10:14:03.340548122 +0200
***************
*** 505,510 ****
  EXTERN char e_list_required_for_argument_nr[]
        INIT(= N_("E1211: List required for argument %d"));
  EXTERN char e_bool_required_for_argument_nr[]
!       INIT(= N_("E1211: Bool required for argument %d"));
  EXTERN char e_redefining_imported_item_str[]
!       INIT(= N_("E1212: Redefining imported item %s"));
--- 505,510 ----
  EXTERN char e_list_required_for_argument_nr[]
        INIT(= N_("E1211: List required for argument %d"));
  EXTERN char e_bool_required_for_argument_nr[]
!       INIT(= N_("E1212: Bool required for argument %d"));
  EXTERN char e_redefining_imported_item_str[]
!       INIT(= N_("E1213: Redefining imported item %s"));
*** ../vim-8.2.3182/src/testdir/test_vim9_builtin.vim   2021-07-18 
22:25:23.857692660 +0200
--- src/testdir/test_vim9_builtin.vim   2021-07-19 10:17:06.312113357 +0200
***************
*** 478,484 ****
  
    assert_fails('char2nr(true)', 'E1174:')
    CheckDefAndScriptFailure2(['char2nr(10)'], 'E1013: Argument 1: type 
mismatch, expected string but got number', 'E1174: String required for argument 
1')
!   CheckDefAndScriptFailure2(['char2nr("a", 2)'], 'E1013: Argument 2: type 
mismatch, expected bool but got number', 'E1211: Bool required for argument 2')
    assert_equal(97, char2nr('a', 1))
    assert_equal(97, char2nr('a', 0))
    assert_equal(97, char2nr('a', true))
--- 478,484 ----
  
    assert_fails('char2nr(true)', 'E1174:')
    CheckDefAndScriptFailure2(['char2nr(10)'], 'E1013: Argument 1: type 
mismatch, expected string but got number', 'E1174: String required for argument 
1')
!   CheckDefAndScriptFailure2(['char2nr("a", 2)'], 'E1013: Argument 2: type 
mismatch, expected bool but got number', 'E1212: Bool required for argument 2')
    assert_equal(97, char2nr('a', 1))
    assert_equal(97, char2nr('a', 0))
    assert_equal(97, char2nr('a', true))
***************
*** 2534,2540 ****
  
  def Test_str2list()
    CheckDefAndScriptFailure2(['str2list(10)'], 'E1013: Argument 1: type 
mismatch, expected string but got number', 'E1174: String required for argument 
1')
!   CheckDefAndScriptFailure2(['str2list("a", 2)'], 'E1013: Argument 2: type 
mismatch, expected bool but got number', 'E1211: Bool required for argument 2')
    assert_equal([97], str2list('a'))
    assert_equal([97], str2list('a', 1))
    assert_equal([97], str2list('a', true))
--- 2534,2540 ----
  
  def Test_str2list()
    CheckDefAndScriptFailure2(['str2list(10)'], 'E1013: Argument 1: type 
mismatch, expected string but got number', 'E1174: String required for argument 
1')
!   CheckDefAndScriptFailure2(['str2list("a", 2)'], 'E1013: Argument 2: type 
mismatch, expected bool but got number', 'E1212: Bool required for argument 2')
    assert_equal([97], str2list('a'))
    assert_equal([97], str2list('a', 1))
    assert_equal([97], str2list('a', true))
***************
*** 2560,2566 ****
  def Test_strchars()
    strchars("A\u20dd", true)->assert_equal(1)
    CheckDefAndScriptFailure2(['strchars(10)'], 'E1013: Argument 1: type 
mismatch, expected string but got number', 'E1174: String required for argument 
1')
!   CheckDefAndScriptFailure2(['strchars("a", 2)'], 'E1013: Argument 2: type 
mismatch, expected bool but got number', 'E1211: Bool required for argument 2')
    assert_equal(3, strchars('abc'))
    assert_equal(3, strchars('abc', 1))
    assert_equal(3, strchars('abc', true))
--- 2560,2566 ----
  def Test_strchars()
    strchars("A\u20dd", true)->assert_equal(1)
    CheckDefAndScriptFailure2(['strchars(10)'], 'E1013: Argument 1: type 
mismatch, expected string but got number', 'E1174: String required for argument 
1')
!   CheckDefAndScriptFailure2(['strchars("a", 2)'], 'E1013: Argument 2: type 
mismatch, expected bool but got number', 'E1212: Bool required for argument 2')
    assert_equal(3, strchars('abc'))
    assert_equal(3, strchars('abc', 1))
    assert_equal(3, strchars('abc', true))
*** ../vim-8.2.3182/src/version.c       2021-07-18 22:25:23.857692660 +0200
--- src/version.c       2021-07-19 10:16:52.672145697 +0200
***************
*** 757,758 ****
--- 757,760 ----
  {   /* Add new patch number below this line */
+ /**/
+     3183,
  /**/

-- 
Rule #1: Don't give somebody a tool that he's going to hurt himself with.

 /// 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/202107190839.16J8dOUb2959042%40masaka.moolenaar.net.

Raspunde prin e-mail lui