Patch 7.4.1606
Problem:    Having type() handle a Funcref that is or isn't a partial
            differently causes problems for existing scripts.
Solution:   Make type() return the same value. (Thinca)
Files:      src/eval.c, src/testdir/test_viml.vim


*** ../vim-7.4.1605/src/eval.c  2016-03-19 14:22:05.472232285 +0100
--- src/eval.c  2016-03-19 18:45:19.898953733 +0100
***************
*** 20398,20403 ****
--- 20398,20404 ----
      {
        case VAR_NUMBER: n = 0; break;
        case VAR_STRING: n = 1; break;
+       case VAR_PARTIAL:
        case VAR_FUNC:   n = 2; break;
        case VAR_LIST:   n = 3; break;
        case VAR_DICT:   n = 4; break;
***************
*** 20411,20417 ****
             break;
        case VAR_JOB:     n = 8; break;
        case VAR_CHANNEL: n = 9; break;
-       case VAR_PARTIAL: n = 10; break;
        case VAR_UNKNOWN:
             EMSG2(_(e_intern2), "f_type(UNKNOWN)");
             n = -1;
--- 20412,20417 ----
*** ../vim-7.4.1605/src/testdir/test_viml.vim   2016-02-07 19:27:46.375210904 
+0100
--- src/testdir/test_viml.vim   2016-03-19 18:48:06.301202910 +0100
***************
*** 942,947 ****
--- 942,948 ----
      call assert_equal(0, type(0))
      call assert_equal(1, type(""))
      call assert_equal(2, type(function("tr")))
+     call assert_equal(2, type(function("tr", [8])))
      call assert_equal(3, type([]))
      call assert_equal(4, type({}))
      call assert_equal(5, type(0.0))
*** ../vim-7.4.1605/src/version.c       2016-03-19 18:44:02.131772030 +0100
--- src/version.c       2016-03-19 18:46:26.558252348 +0100
***************
*** 750,751 ****
--- 750,753 ----
  {   /* Add new patch number below this line */
+ /**/
+     1606,
  /**/

-- 
>From "know your smileys":
 ;-0    Can't find shift key
 ,-9    Kann Umschalttaste nicht finden

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui