Patch 7.4.1645
Problem:    When a dict contains a partial it can't be redefined as a
            function. (Nikolai Pavlov)
Solution:   Remove the partial when overwriting with a function.
Files:      src/eval.c, src/testdir/test_partial.vim


*** ../vim-7.4.1644/src/eval.c  2016-03-24 21:23:02.281875291 +0100
--- src/eval.c  2016-03-24 21:38:30.428338372 +0100
***************
*** 23455,23461 ****
        else
            arg = fudi.fd_newkey;
        if (arg != NULL && (fudi.fd_di == NULL
!                                    || fudi.fd_di->di_tv.v_type != VAR_FUNC))
        {
            if (*arg == K_SPECIAL)
                j = 3;
--- 23455,23462 ----
        else
            arg = fudi.fd_newkey;
        if (arg != NULL && (fudi.fd_di == NULL
!                                    || (fudi.fd_di->di_tv.v_type != VAR_FUNC
!                                && fudi.fd_di->di_tv.v_type != VAR_PARTIAL)))
        {
            if (*arg == K_SPECIAL)
                j = 3;
*** ../vim-7.4.1644/src/testdir/test_partial.vim        2016-03-24 
21:23:02.285875250 +0100
--- src/testdir/test_partial.vim        2016-03-24 21:29:30.569892823 +0100
***************
*** 193,195 ****
--- 193,208 ----
      call assert_true(v:false, v:exception)
    endtry
  endfunc
+ 
+ func Test_redefine_dict_func()
+   let d = {}
+   function d.test4()
+   endfunction
+   let d.test4 = d.test4
+   try
+     function! d.test4(name)
+     endfunction
+   catch
+     call assert_true(v:errmsg, v:exception)
+   endtry
+ endfunc
*** ../vim-7.4.1644/src/version.c       2016-03-24 21:23:02.285875250 +0100
--- src/version.c       2016-03-24 21:31:28.668681709 +0100
***************
*** 750,751 ****
--- 750,753 ----
  {   /* Add new patch number below this line */
+ /**/
+     1645,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
115. You are late picking up your kid from school and try to explain
     to the teacher you were stuck in Web traffic.

 /// 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