Ken Takata wrote:

> 2016/3/17 Thu 1:39:40 UTC+9 Ken Takata wrote:
> > Hi,
> > 
> > 2016/3/16 Wed 3:33:55 UTC+9 Bram Moolenaar wrote:
> > > Patch 7.4.1577
> > > Problem:    Cannot pass "dict.Myfunc" around as a partial.
> > > Solution:   Create a partial when expected.
> > > Files:      src/eval.c, src/testdir/test_partial.vim
> > 
> > 
> > > +     if (rettv->v_type == VAR_FUNC && selfdict != NULL)
> > > +     {
> > > +         partial_T       *pt = (partial_T 
> > > *)alloc_clear(sizeof(partial_T));
> > > + 
> > > +         /* Turn "dict.Func" into a partial for "Func" with "dict". */
> > > +         if (pt != NULL)
> > > +         {
> > > +             pt->pt_dict = selfdict;
> > > +             selfdict = NULL;
> > > +             pt->pt_name = rettv->vval.v_string;
> > > +             func_ref(pt->pt_name);
> > > +             rettv->v_type = VAR_PARTIAL;
> > > +             rettv->vval.v_partial = pt;
> > > +         }
> > > +     }
> > 
> > I'm not sure, but it seems that this if block has some problems.
> > When I comment out this block, the issue #690 disappears (even without 
> > mattn's
> > patch).
> 
> Ah! How about this.
> 
> --- a/src/eval.c
> +++ b/src/eval.c
> @@ -21733,6 +21733,7 @@ handle_subscript(
>           pt->pt_dict = selfdict;
>           selfdict = NULL;
>           pt->pt_name = rettv->vval.v_string;
> +         pt->pt_refcount = 1;
>           func_ref(pt->pt_name);
>           rettv->v_type = VAR_PARTIAL;
>           rettv->vval.v_partial = pt;

Thanks.  Let me include this fix first.

-- 
ERROR 047: Keyboard not found.  Press RETURN to continue.

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