mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
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.
This commit is contained in:
@@ -23455,7 +23455,8 @@ ex_function(exarg_T *eap)
|
|||||||
else
|
else
|
||||||
arg = fudi.fd_newkey;
|
arg = fudi.fd_newkey;
|
||||||
if (arg != NULL && (fudi.fd_di == NULL
|
if (arg != NULL && (fudi.fd_di == NULL
|
||||||
|| fudi.fd_di->di_tv.v_type != VAR_FUNC))
|
|| (fudi.fd_di->di_tv.v_type != VAR_FUNC
|
||||||
|
&& fudi.fd_di->di_tv.v_type != VAR_PARTIAL)))
|
||||||
{
|
{
|
||||||
if (*arg == K_SPECIAL)
|
if (*arg == K_SPECIAL)
|
||||||
j = 3;
|
j = 3;
|
||||||
|
@@ -193,3 +193,16 @@ func Test_tostring()
|
|||||||
call assert_true(v:false, v:exception)
|
call assert_true(v:false, v:exception)
|
||||||
endtry
|
endtry
|
||||||
endfunc
|
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
|
||||||
|
@@ -748,6 +748,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1645,
|
||||||
/**/
|
/**/
|
||||||
1644,
|
1644,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user