On Sun, Jan 5, 2014 at 11:44 PM, Nikolay Pavlov <zyx....@gmail.com> wrote:

>
> On Jan 1, 2014 9:47 AM, "Yukihiro Nakadaira" <yukihiro.nakada...@gmail.com>
> wrote:
> >
> > Steps to reproduce:
> >   $ cat ~/.vim/autoload/Foo.vim
> >   let Foo#x = 0
> >   $ vim -u NONE -N
> >   :let Foo#x = function('tr')
> >   E685: Internal error: hash_add()
> >
> > eval.c:set_var()
> >   -> var_check_func_name()    Foo.vim is loaded and Foo#x is created.
> >   -> hash_add()               error, because Foo#x is already exists.
> >
> > Please check the following patch.
> >
> > diff -r 2f856c7c1d43 src/eval.c
> > --- a/src/eval.c    Sun Dec 15 10:02:33 2013 +0100
> > +++ b/src/eval.c    Wed Jan 01 13:44:46 2014 +0900
> > @@ -20718,6 +20718,8 @@
> >      char_u *name;    /* points to start of variable name */
> >      int    new_var;  /* TRUE when creating the variable */
> >  {
> > +    int err;
> > +
> >      if (!(vim_strchr((char_u *)"wbs", name[0]) != NULL && name[1] ==
> ':')
> >          && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':')
> >                               ? name[2] : name[0]))
> > @@ -20729,7 +20731,10 @@
> >      /* Don't allow hiding a function.  When "v" is not NULL we might be
> >       * assigning another function to the same var, the type is checked
> >       * below. */
> > -    if (new_var && function_exists(name))
> > +    no_autoload = TRUE;
> > +    err = new_var && function_exists(name);
> > +    no_autoload = FALSE;
>
> Are you sure that no_autoload variable may never be TRUE when callin this
> function?
>

Yes, I am.

-- 
Yukihiro Nakadaira - yukihiro.nakada...@gmail.com

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui